aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichael F. Lamb <mike@datagrok.org>2019-06-11 15:27:17 -0700
committerDrashna Jaelre <drashna@live.com>2019-06-11 15:27:17 -0700
commite6a81133dd3d0d4076a08be76340f905fdbf7c7f (patch)
tree41fbbc4143b915596d5bccd5bd94a3ee74d66048 /docs
parentb92387b7499e21603e241d136db92c6e716b0cba (diff)
downloadqmk_firmware-e6a81133dd3d0d4076a08be76340f905fdbf7c7f.tar.gz
qmk_firmware-e6a81133dd3d0d4076a08be76340f905fdbf7c7f.zip
Add SH1106 OLED support (#5787)
* modify oled_driver to support SH1106 also: - improve mechanism to specify which OLED IC we use - comment calc_bounds() - give OLED_COLUMN_OFFSET a default value - inline comment re: OLED MEMORY_MODE and SH1106 - update docs/feature_oled_driver.h for SH1106 support and related changes - docs: OLED: note we have tested SSD1306 on ARM boards (per @XScorpion2) - define out MEMORY_MODE when using SH1106 OLED driver * document that SSD1306 128x64 on AVR works Per @XScorpion2: https://github.com/qmk/qmk_firmware/pull/5787#discussion_r291837842
Diffstat (limited to 'docs')
-rw-r--r--docs/feature_oled_driver.md38
1 files changed, 26 insertions, 12 deletions
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md
index 144b695b7..155dfa9d2 100644
--- a/docs/feature_oled_driver.md
+++ b/docs/feature_oled_driver.md
@@ -2,7 +2,17 @@
2 2
3## OLED Supported Hardware 3## OLED Supported Hardware
4 4
5128x32 OLED modules using SSD1306 driver IC over I2C. Supported on AVR based keyboards. Possible but untested hardware includes ARM based keyboards and other sized OLED modules using SSD1306 over I2C, such as 128x64. 5OLED modules using SSD1306 or SH1106 driver ICs, communicating over I2C.
6Tested combinations:
7
8| IC driver | Size | Keyboard Platform | Notes |
9|-----------|--------|-------------------|--------------------------|
10| SSD1306 | 128x32 | AVR | Primary support |
11| SSD1306 | 128x64 | AVR | Verified working |
12| SSD1306 | 128x32 | ARM | |
13| SH1106 | 128x64 | AVR | No rotation or scrolling |
14
15Hardware configurations using ARM-based microcontrollers or different sizes of OLED modules may be compatible, but are untested.
6 16
7!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses i2c to communication between sides this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. 17!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses i2c to communication between sides this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this.
8 18
@@ -86,17 +96,17 @@ void oled_task_user(void) {
86 96
87 ## Basic Configuration 97 ## Basic Configuration
88 98
89|Define |Default |Description | 99| Define | Default | Description |
90|-----------------------|---------------|------------------------------------------------| 100|------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
91|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display | 101| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display |
92|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts | 102| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts |
93|`OLED_FONT_START` |`0` |The starting characer index for custom fonts | 103| `OLED_FONT_START` | `0` | The starting characer index for custom fonts |
94|`OLED_FONT_END` |`224` |The ending characer index for custom fonts | 104| `OLED_FONT_END` | `224` | The ending characer index for custom fonts |
95|`OLED_FONT_WIDTH` |`6` |The font width | 105| `OLED_FONT_WIDTH` | `6` | The font width |
96|`OLED_FONT_HEIGHT` |`8` |The font height (untested) | 106| `OLED_FONT_HEIGHT` | `8` | The font height (untested) |
97|`OLED_DISABLE_TIMEOUT` |*Not defined* |Disables the built in OLED timeout feature. Useful when implementing custom timeout rules.| 107| `OLED_DISABLE_TIMEOUT` | *Not defined* | Disables the built in OLED timeout feature. Useful when implementing custom timeout rules. |
98 108| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
99 109| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
100 110
101 ## 128x64 & Custom sized OLED Displays 111 ## 128x64 & Custom sized OLED Displays
102 112
@@ -119,6 +129,8 @@ void oled_task_user(void) {
119 129
120### 90 Degree Rotation - Technical Mumbo Jumbo 130### 90 Degree Rotation - Technical Mumbo Jumbo
121 131
132!> Rotation is unsupported on the SH1106.
133
122```C 134```C
123// OLED Rotation enum values are flags 135// OLED Rotation enum values are flags
124typedef enum { 136typedef enum {
@@ -250,6 +262,8 @@ uint8_t oled_max_chars(void);
250uint8_t oled_max_lines(void); 262uint8_t oled_max_lines(void);
251``` 263```
252 264
265!> Scrolling and rotation are unsupported on the SH1106.
266
253## SSD1306.h driver conversion guide 267## SSD1306.h driver conversion guide
254 268
255|Old API |Recommended New API | 269|Old API |Recommended New API |