Complete init sh1106

update cmkae file for test
This commit is contained in:
2022-06-18 11:22:32 +02:00
parent 2663ee6e2a
commit 55f54a2d4a
5 changed files with 68 additions and 26 deletions

View File

@@ -18,9 +18,10 @@ void SSD1306_Init(OLED_HandleTypeDef *hOled)
contrast = 0xAF;
}
oled_SendCommand(hOled, SSD1306_DISPLAYOFF, 1);
uint8_t display = SSD1306_DISPLAYOFF;
oled_SendCommand(hOled, &display, 1);
const uint8_t config[] = {
uint8_t config[] = {
SSD1306_SETMULTIPLEX, hOled->Height -1,
SSD1306_SETDISPLAYOFFSET, 0x00,
SSD1306_SETSTARTLINE | 0x00,
@@ -40,7 +41,8 @@ void SSD1306_Init(OLED_HandleTypeDef *hOled)
oled_SendCommand(hOled, config, sizeof(config));
oled_SendCommand(hOled, SSD1306_DISPLAYON, 1);
display = SSD1306_DISPLAYOFF;
oled_SendCommand(hOled, &display, 1);
}