diff options
author | ishtob <ishtob@gmail.com> | 2017-07-12 12:10:28 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2017-07-12 12:10:28 -0400 |
commit | 087af43dee545792f486069481460ed5997bc41b (patch) | |
tree | 94466dfcf27bca408c94ce1703cf8ac1e1511216 /drivers | |
parent | cc468523dfec8175939f575a214714eea8aaa7a3 (diff) | |
download | firmware-087af43dee545792f486069481460ed5997bc41b.tar.gz firmware-087af43dee545792f486069481460ed5997bc41b.tar.bz2 firmware-087af43dee545792f486069481460ed5997bc41b.zip |
fix implementation issues from SSD1306 clean up, added rotation (#1494)
* moved OLED update task to keymap
* fix splitting render display to keymap
* Added rotation option for OLED, fixed splitting display render update to keymap
* issues with attribute
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) { send_cmd2(SetChargePump, 0x14 /* Enable */); send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); -/// Flips the display orientation 0 degrees - send_cmd1(SegRemap | 0x1); - send_cmd1(ComScanDec); -/* +#ifdef OLED_ROTATE180 // the following Flip the display orientation 180 degrees send_cmd1(SegRemap); send_cmd1(ComScanInc); -// end flip */ +#endif +#ifndef OLED_ROTATE180 +// Flips the display orientation 0 degrees + send_cmd1(SegRemap | 0x1); + send_cmd1(ComScanDec); +#endif + send_cmd2(SetComPins, 0x2); send_cmd2(SetContrast, 0x8f); send_cmd2(SetPreCharge, 0xf1); @@ -304,9 +307,8 @@ void iota_gfx_flush(void) { matrix_render(&display); } -__attribute__((weak)) +__attribute__ ((weak)) void iota_gfx_task_user(void) { - } 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); void iota_gfx_write_P(const char *data); void iota_gfx_clear_screen(void); -__attribute__((weak)) void iota_gfx_task_user(void); void matrix_clear(struct CharacterMatrix *matrix); |