Pinconfig types draft

unicod 2 days ago
parent 6e41a5154f
commit 22ea72ef67

@ -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…
Cancel
Save