37 static const uint8_t PROGMEM s_oled128x64_initData[] =
45 SSD1306_SETSTARTLINE | 0x00,
46 SSD1306_SETCONTRAST, 0x7F,
47 SSD1306_SEGREMAP | 0x01,
48 SSD1306_NORMALDISPLAY,
49 SSD1306_SETMULTIPLEX, 63,
50 SSD1306_SETDISPLAYOFFSET, 0x00,
51 SSD1306_SETDISPLAYCLOCKDIV, 0x80,
52 SSD1306_SETPRECHARGE, 0x22,
53 SSD1306_SETCOMPINS, 0x12,
54 SSD1306_SETVCOMDETECT, 0x20,
55 SSD1306_CHARGEPUMP, 0x14,
56 SSD1306_DISPLAYALLON_RESUME,
60 static uint8_t s_column;
61 static uint8_t s_page;
63 static void sh1106_setBlock(lcduint_t x, lcduint_t y, lcduint_t w)
87 static void sh1106_nextPage(
void)
90 sh1106_setBlock(s_column,s_page+1,0);
107 for( uint8_t i=0; i<
sizeof(s_oled128x64_initData); i++)
void sh1106_128x64_init()
Inits 128x64 OLED display (based on SH1106 controller).
void(* send)(uint8_t data)
void(* set_block)(lcduint_t x, lcduint_t y, lcduint_t w)
Sets block in RAM of lcd display controller to write data to.
void ssd1306_spiDataMode(uint8_t mode)
void(* send_pixels_buffer1)(const uint8_t *buffer, uint16_t len)
void ssd1306_resetController(int8_t rstPin, uint8_t delayMs)
Does hardware reset for oled controller.
void(* send_pixels1)(uint8_t data)
void ssd1306_spiInit(int8_t cesPin, int8_t dcPin)
ssd1306_lcd_t ssd1306_lcd
ssd1306_interface_t ssd1306_intf
void ssd1306_sendCommand(uint8_t command)
void sh1106_128x64_spi_init(int8_t rstPin, int8_t cesPin, int8_t dcPin)
Inits 128x64 OLED display over spi (based on SH1106 controller).
void sh1106_128x64_i2c_init(void)
Inits 128x64 OLED display over i2c (based on SH1106 controller).
void(* send_buffer)(const uint8_t *buffer, uint16_t size)
Sends bytes to SSD1306 device.
void(* set_mode)(lcd_mode_t mode)
Sets library display mode for direct draw functions.