Skip to content
Snippets Groups Projects
Commit 5f0edac9 authored by Lennard Karger's avatar Lennard Karger
Browse files

Merge branch 'main' into 'Developement_Karger'

Update 20221113

See merge request !6
parents 18c0c8a4 f3a997e7
No related branches found
No related tags found
2 merge requests!7Developement karger,!6Update 20221113
......@@ -30,10 +30,12 @@ typedef enum _ifPortNumber
ifPort9
} ifPortNumber;
// Fehler bei der Parameterübergabe (Konfiguration)
//
typedef enum
{
GEnoError,
GEcdictPar
GEnoError, // Kein Fehler
GEcdictPar // Widersprüchliche Parameter
} GpioError;
typedef struct _GpioMask
......@@ -68,17 +70,17 @@ typedef struct _GpioExtVal
_GpioExtVal *next;
} GpioExtVal, *GpioExtValPtr;
// Spezifikation der Schnittstellentreiber
// Spezifikation der Schnittstellentreiber (Konfiguration)
//
#define IfDrvInput 0x0000
#define IfDrvOutput 0x0001
#define IfDrvStrongHigh 0x0002
#define IfDrvStrongLow 0x0004
#define IfDrvOpenDrain 0x0008
#define IfDrvOpenSource 0x0010
#define IfDrvPullUp 0x0020
#define IfDrvPullDown 0x0040
#define IfDrvPullStrong 0x0080
#define IfDrvInput 0x0000 // Pin ist ein Eingang (Default)
#define IfDrvOutput 0x0001 // Pin ist ein Ausgnag
#define IfDrvStrongHigh 0x0002 // Großer Strom bei High (VCC)
#define IfDrvStrongLow 0x0004 // Großer Strom bei Low (0)
#define IfDrvOpenDrain 0x0008 // Open-Drain-Anschluss
#define IfDrvOpenSource 0x0010 // Open-Source-Anschluss
#define IfDrvPullUp 0x0020 // Pull-Up-Widerstand aktiv
#define IfDrvPullDown 0x0040 // Pull-Down-Widerstand aktiv
#define IfDrvPullStrong 0x0080 // Niederohmige Pull-Widerstände
typedef enum
{
......@@ -102,13 +104,16 @@ public:
//
virtual GpioError config(int nr, unsigned int cnfBits, GpioExtRefPtr refPtr);
virtual GpioError config(int nrFrom, int nrTo, unsigned int cnfBits, GpioExtRefPtr refPtr);
virtual GpioError config(GpioExtMask mask, unsigned int cnfBits, GpioExtRefPtr refPtr);
virtual GpioError config(GpioExtMaskPtr maskPtr, unsigned int cnfBits, GpioExtRefPtr refPtr);
virtual GpioError configArd(ArdMask ardMask, unsigned int cnfBits);
// --------------------------------------------------------------------------
// Anwendungsfunktionen
// --------------------------------------------------------------------------
//
virtual bool isSet(GpioExtRefPtr refPtr);
virtual bool allSet(GpioExtRefPtr refPtr);
virtual bool anySet(GpioExtRefPtr refPtr);
virtual void read(GpioExtRefPtr refPtr, GpioExtValPtr valPtr);
virtual dword readArd(ArdMask ardMask);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment