@@ -68,12 +68,13 @@ int main(void)
ssd1306_Init();
ssd1306_block_write();
ssd1306_DrawString("Hello World!", 0, 10);
// ssd1306_block_write();
uint8_t toggle = 0;
while(1)
{
//ssd1306_block_write();
// Process sensor inputs [TODO: 5hz?]
process();
@@ -88,13 +89,20 @@ int main(void)
uint8_t sw_down = GPIO_ReadInputDataBit(SW_DOWN);
uint8_t sw_left = GPIO_ReadInputDataBit(SW_LEFT);
uint8_t sw_right = GPIO_ReadInputDataBit(SW_RIGHT);
if(!sw_btn) {
GPIO_ToggleBits(LED_STAT);
ssd1306_DrawString("Douche!", 2, 10);
if(!toggle) {
ssd1306_DrawString("I freaking work!", 2, 10);
toggle = ! toggle;
}
else {
GPIO_SetBits(LED_POWER);
Delay(50);
GPIO_ResetBits(LED_POWER);
Status change: