summaryrefslogtreecommitdiff
path: root/src/debug.c
diff options
context:
space:
mode:
authorBrett Weiland <brett_weiland@bpcsapce.com>2023-01-12 13:41:48 -0600
committerBrett Weiland <brett_weiland@bpcsapce.com>2023-01-12 13:41:48 -0600
commitb666668d0e6b67e4632e65486cae814ab5abbc39 (patch)
tree0cf0c2d689799c5e98d505e632248fdc5ed5a072 /src/debug.c
parent94304b11e7220f060dbc345de5fa1952d0465016 (diff)
updating for linkedin
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c10
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);
}