You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
532 B
C

#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