Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SOAAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Streitenberger
SOAAP
Commits
f3a997e7
Commit
f3a997e7
authored
2 years ago
by
RobertPatzke
Browse files
Options
Downloads
Patches
Plain Diff
Update 20221113
parent
e8f2b561
No related branches found
No related tags found
1 merge request
!6
Update 20221113
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/environment/IntrfGpio.h
+18
-13
18 additions, 13 deletions
libraries/environment/IntrfGpio.h
with
18 additions
and
13 deletions
libraries/environment/IntrfGpio.h
+
18
−
13
View file @
f3a997e7
...
@@ -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
(
GpioExtMask
Ptr
mask
Ptr
,
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment