add button stuff and timer stuff
This commit is contained in:
11
src/gpio.h
11
src/gpio.h
@ -24,9 +24,16 @@ typedef enum {
|
||||
HIGH,
|
||||
} tPinState;
|
||||
|
||||
typedef enum {
|
||||
PIN_OUT,
|
||||
PIN_IN,
|
||||
PIN_IN_PULLUP
|
||||
} tPinDirection;
|
||||
|
||||
typedef struct {
|
||||
tPort portId;
|
||||
uint16_t bit;
|
||||
tPinDirection direction;
|
||||
tPinState defaultOut;
|
||||
} tPinCfg;
|
||||
|
||||
@ -42,13 +49,13 @@ typedef enum {
|
||||
SEG_G,
|
||||
DIGIT_0,
|
||||
DIGIT_1,
|
||||
TESTPIN1,
|
||||
TESTPIN2,
|
||||
BUTTON_1,
|
||||
PINS_END
|
||||
} tPin;
|
||||
|
||||
void gpioInitPins();
|
||||
void gpioSetPin(tPin p, tPinState v);
|
||||
tPinState gpioGetPin(tPin p);
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user