Pinconfig types draft
parent
6d788b992e
commit
db4745d90d
@ -0,0 +1,36 @@
|
|||||||
|
#ifndef __PINCFG_H__
|
||||||
|
#define __PINCFG_H__
|
||||||
|
|
||||||
|
typedef enum: uint8_t {
|
||||||
|
PIN_MODE_DIG_IN,
|
||||||
|
PIN_MODE_ANA_IN,
|
||||||
|
PIN_MODE_DIG_OUT,
|
||||||
|
PIN_MODE_ANA_OUT
|
||||||
|
} PIN_MODES;
|
||||||
|
|
||||||
|
typedef enum: uint8_t {
|
||||||
|
PULLUP_OFF,
|
||||||
|
PULLUP_ON
|
||||||
|
} PULLUP_MODES;
|
||||||
|
|
||||||
|
struct PinCfg {
|
||||||
|
PIN_MODES Mode;
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
PULLUP_MODES Pullup;
|
||||||
|
} CfgDigIn;
|
||||||
|
struct {
|
||||||
|
uint8_t todo;
|
||||||
|
} CfgAnaIn;
|
||||||
|
struct {
|
||||||
|
uint8_t todo;
|
||||||
|
} CfgDigOut;
|
||||||
|
struct {
|
||||||
|
uint8_t todo;
|
||||||
|
} CfgAnaOut;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue