diff --git a/libraries/environment/IntrfGpio.h b/libraries/environment/IntrfGpio.h index d37fdf6765d077ac1bc20944080dc257f55e0a8a..51642d8e1c00a1ca5d20cb58b5370a9a9fc33918 100644 --- a/libraries/environment/IntrfGpio.h +++ b/libraries/environment/IntrfGpio.h @@ -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);