add button stuff and timer stuff

This commit is contained in:
Wolfgang Hottgenroth
2016-09-08 14:05:57 +02:00
parent 7c854e7353
commit 8e08c2045e
13 changed files with 238 additions and 26 deletions

View File

@ -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);