diff options
Diffstat (limited to 'src/debug.c')
-rw-r--r-- | src/debug.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/debug.c b/src/debug.c index d7babda..49e1f01 100644 --- a/src/debug.c +++ b/src/debug.c @@ -16,6 +16,13 @@ #define I2C_WRITE 0 #define I2C_READ 1 +void debug_crash() { + for(;;) { + LED_DEBUG_PORT ^= _BV(LED_DEBUG); + _delay_ms(500); + } +} + void scroll_test() { //sets scroll area to whole screen i2c_write_reg_multi(SSD1306_ADDR, SSD1306_CMD_REG, 3, (uint8_t[]){0xa3, 0x00, 0x20}); @@ -92,10 +99,11 @@ void test_timer() { } void eeprom_testbyte() { - uint8_t data_in = 0xde; + uint8_t data_in = 0xdf; uint8_t data_out = 0; printf("writing 0x%x to eeprom...\r\n", data_in); EEPROM_WRITEBYTE(0x0000, data_in); + _delay_ms(10); //max write cycle time data_out = EEPROM_READBYTE(0x0000); printf("byte read from eeprom: 0x%x\r\n", data_out); } |