diff options
Diffstat (limited to 'src/ssd1306_display_driver.c')
-rw-r--r-- | src/ssd1306_display_driver.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ssd1306_display_driver.c b/src/ssd1306_display_driver.c index 0bff3b0..9155e1e 100644 --- a/src/ssd1306_display_driver.c +++ b/src/ssd1306_display_driver.c @@ -73,6 +73,7 @@ void screen_init() { } + void screen_off() { i2c_write_reg(SSD1306_ADDR, SSD1306_CMD_REG, 0xaf); } void screen_on() { i2c_write_reg(SSD1306_ADDR, SSD1306_CMD_REG, 0xae); } @@ -86,3 +87,10 @@ void screen_update() { } } +void screen_test() { + printf("testing screen\n"); + for(int on_pix = 0; on_pix < (SCREEN_RES_X * SCREEN_RES_Y) / 8; on_pix++) + screen_buffer[on_pix] = 0b10101010; + printf("done testing screen\n"); + screen_update(); +} |