Started with game logic, implemented some draw stuff.

This commit is contained in:
T-moe
2016-01-18 16:15:51 +01:00
parent 6a136923d2
commit 91d6b2af96
8 changed files with 248 additions and 64 deletions

17
src/io.h Normal file
View File

@@ -0,0 +1,17 @@
#include <stdbool.h>
#include <stm32f4xx.h>
typedef struct pin_s {
GPIO_TypeDef* GPIO;
uint16_t pinmask;
bool input;
} pin_t;
void pin_create(pin_t* pin, GPIO_TypeDef* GPIO, uint8_t pinnr, bool input);
bool pin_get(pin_t* pin);
void pin_set(pin_t* pin, bool status);
void pin_toggle(pin_t* pin);