diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/avr/ssd1306.c | 16 | ||||
| -rw-r--r-- | drivers/avr/ssd1306.h | 1 |
2 files changed, 9 insertions, 8 deletions
diff --git a/drivers/avr/ssd1306.c b/drivers/avr/ssd1306.c index 03a909e9d..bb8938bba 100644 --- a/drivers/avr/ssd1306.c +++ b/drivers/avr/ssd1306.c | |||
| @@ -134,14 +134,17 @@ bool iota_gfx_init(void) { | |||
| 134 | send_cmd2(SetChargePump, 0x14 /* Enable */); | 134 | send_cmd2(SetChargePump, 0x14 /* Enable */); |
| 135 | send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); | 135 | send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); |
| 136 | 136 | ||
| 137 | /// Flips the display orientation 0 degrees | 137 | #ifdef OLED_ROTATE180 |
| 138 | send_cmd1(SegRemap | 0x1); | ||
| 139 | send_cmd1(ComScanDec); | ||
| 140 | /* | ||
| 141 | // the following Flip the display orientation 180 degrees | 138 | // the following Flip the display orientation 180 degrees |
| 142 | send_cmd1(SegRemap); | 139 | send_cmd1(SegRemap); |
| 143 | send_cmd1(ComScanInc); | 140 | send_cmd1(ComScanInc); |
| 144 | // end flip */ | 141 | #endif |
| 142 | #ifndef OLED_ROTATE180 | ||
| 143 | // Flips the display orientation 0 degrees | ||
| 144 | send_cmd1(SegRemap | 0x1); | ||
| 145 | send_cmd1(ComScanDec); | ||
| 146 | #endif | ||
| 147 | |||
| 145 | send_cmd2(SetComPins, 0x2); | 148 | send_cmd2(SetComPins, 0x2); |
| 146 | send_cmd2(SetContrast, 0x8f); | 149 | send_cmd2(SetContrast, 0x8f); |
| 147 | send_cmd2(SetPreCharge, 0xf1); | 150 | send_cmd2(SetPreCharge, 0xf1); |
| @@ -304,9 +307,8 @@ void iota_gfx_flush(void) { | |||
| 304 | matrix_render(&display); | 307 | matrix_render(&display); |
| 305 | } | 308 | } |
| 306 | 309 | ||
| 307 | __attribute__((weak)) | 310 | __attribute__ ((weak)) |
| 308 | void iota_gfx_task_user(void) { | 311 | void iota_gfx_task_user(void) { |
| 309 | |||
| 310 | } | 312 | } |
| 311 | 313 | ||
| 312 | void iota_gfx_task(void) { | 314 | void iota_gfx_task(void) { |
diff --git a/drivers/avr/ssd1306.h b/drivers/avr/ssd1306.h index 1b6f8a493..df6a75359 100644 --- a/drivers/avr/ssd1306.h +++ b/drivers/avr/ssd1306.h | |||
| @@ -79,7 +79,6 @@ void iota_gfx_write(const char *data); | |||
| 79 | void iota_gfx_write_P(const char *data); | 79 | void iota_gfx_write_P(const char *data); |
| 80 | void iota_gfx_clear_screen(void); | 80 | void iota_gfx_clear_screen(void); |
| 81 | 81 | ||
| 82 | __attribute__((weak)) | ||
| 83 | void iota_gfx_task_user(void); | 82 | void iota_gfx_task_user(void); |
| 84 | 83 | ||
| 85 | void matrix_clear(struct CharacterMatrix *matrix); | 84 | void matrix_clear(struct CharacterMatrix *matrix); |
