Skip to content
Snippets Groups Projects
Commit f3a997e7 authored by RobertPatzke's avatar RobertPatzke
Browse files

Update 20221113

parent e8f2b561
No related branches found
No related tags found
1 merge request!6Update 20221113
...@@ -30,10 +30,12 @@ typedef enum _ifPortNumber ...@@ -30,10 +30,12 @@ typedef enum _ifPortNumber
ifPort9 ifPort9
} ifPortNumber; } ifPortNumber;
// Fehler bei der Parameterübergabe (Konfiguration)
//
typedef enum typedef enum
{ {
GEnoError, GEnoError, // Kein Fehler
GEcdictPar GEcdictPar // Widersprüchliche Parameter
} GpioError; } GpioError;
typedef struct _GpioMask typedef struct _GpioMask
...@@ -68,17 +70,17 @@ typedef struct _GpioExtVal ...@@ -68,17 +70,17 @@ typedef struct _GpioExtVal
_GpioExtVal *next; _GpioExtVal *next;
} GpioExtVal, *GpioExtValPtr; } GpioExtVal, *GpioExtValPtr;
// Spezifikation der Schnittstellentreiber // Spezifikation der Schnittstellentreiber (Konfiguration)
// //
#define IfDrvInput 0x0000 #define IfDrvInput 0x0000 // Pin ist ein Eingang (Default)
#define IfDrvOutput 0x0001 #define IfDrvOutput 0x0001 // Pin ist ein Ausgnag
#define IfDrvStrongHigh 0x0002 #define IfDrvStrongHigh 0x0002 // Großer Strom bei High (VCC)
#define IfDrvStrongLow 0x0004 #define IfDrvStrongLow 0x0004 // Großer Strom bei Low (0)
#define IfDrvOpenDrain 0x0008 #define IfDrvOpenDrain 0x0008 // Open-Drain-Anschluss
#define IfDrvOpenSource 0x0010 #define IfDrvOpenSource 0x0010 // Open-Source-Anschluss
#define IfDrvPullUp 0x0020 #define IfDrvPullUp 0x0020 // Pull-Up-Widerstand aktiv
#define IfDrvPullDown 0x0040 #define IfDrvPullDown 0x0040 // Pull-Down-Widerstand aktiv
#define IfDrvPullStrong 0x0080 #define IfDrvPullStrong 0x0080 // Niederohmige Pull-Widerstände
typedef enum typedef enum
{ {
...@@ -102,13 +104,16 @@ public: ...@@ -102,13 +104,16 @@ public:
// //
virtual GpioError config(int nr, unsigned int cnfBits, GpioExtRefPtr refPtr); 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(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); virtual GpioError configArd(ArdMask ardMask, unsigned int cnfBits);
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Anwendungsfunktionen // Anwendungsfunktionen
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// //
virtual bool isSet(GpioExtRefPtr refPtr);
virtual bool allSet(GpioExtRefPtr refPtr);
virtual bool anySet(GpioExtRefPtr refPtr);
virtual void read(GpioExtRefPtr refPtr, GpioExtValPtr valPtr); virtual void read(GpioExtRefPtr refPtr, GpioExtValPtr valPtr);
virtual dword readArd(ArdMask ardMask); 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