36 uint8_t s_ssd1306_startLine = 0;
38 static const uint8_t PROGMEM s_oled128x64_initData[] =
45 SSD1306_MEMORYMODE, HORIZONTAL_ADDRESSING_MODE,
47 SSD1306_SETSTARTLINE | 0x00,
48 SSD1306_SETCONTRAST, 0x7F,
49 SSD1306_SEGREMAP | 0x01,
50 SSD1306_NORMALDISPLAY,
51 SSD1306_SETMULTIPLEX, 63,
52 SSD1306_SETDISPLAYOFFSET, 0x00,
53 SSD1306_SETDISPLAYCLOCKDIV, 0x80,
54 SSD1306_SETPRECHARGE, 0x22,
55 SSD1306_SETCOMPINS, 0x12,
56 SSD1306_SETVCOMDETECT, 0x20,
57 SSD1306_CHARGEPUMP, 0x14,
58 SSD1306_DISPLAYALLON_RESUME,
62 static const uint8_t PROGMEM s_oled128x32_initData[] =
69 SSD1306_SETDISPLAYCLOCKDIV, 0x80,
70 SSD1306_SETMULTIPLEX, 31,
71 SSD1306_SETDISPLAYOFFSET, 0x00,
72 SSD1306_SETSTARTLINE | 0x00,
73 SSD1306_CHARGEPUMP, 0x14,
74 SSD1306_SEGREMAP | 0x01,
76 SSD1306_SETCOMPINS, 0x02,
77 SSD1306_SETCONTRAST, 0x7F,
78 SSD1306_SETPRECHARGE, 0x22,
79 SSD1306_SETVCOMDETECT, 0x40,
80 SSD1306_MEMORYMODE, HORIZONTAL_ADDRESSING_MODE,
81 SSD1306_DISPLAYALLON_RESUME,
82 SSD1306_NORMALDISPLAY,
86 static void ssd1306_setBlock(lcduint_t x, lcduint_t y, lcduint_t w)
111 static void ssd1306_nextPage(
void)
115 static void ssd1306_setMode_int(
lcd_mode_t mode)
160 s_ssd1306_startLine = line;
166 return s_ssd1306_startLine;
189 for( uint8_t i=0; i<
sizeof(s_oled128x64_initData); i++)
234 for( uint8_t i=0; i <
sizeof(s_oled128x32_initData); i++)
uint8_t ssd1306_getStartLine(void)
void ssd1306_flipVertical(uint8_t mode)
performs vertical flip
void ssd1306_invertMode(void)
void ssd1306_setContrast(uint8_t contrast)
void(* send)(uint8_t data)
void ssd1306_128x32_init(void)
Inits 128x32 OLED display (based on ssd1306 controller).
void ssd1306_128x64_spi_init(int8_t rstPin, int8_t cesPin, int8_t dcPin)
Inits 128x64 OLED display over spi (based on SSD1306 controller).
void ssd1306_displayOff(void)
void ssd1306_flipHorizontal(uint8_t mode)
performs horizontal flip
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 ssd1306_128x64_init()
Inits 128x64 OLED display (based on SSD1306 controller).
void(* send_pixels1)(uint8_t data)
void ssd1306_128x64_i2c_initEx(int8_t scl, int8_t sda, int8_t sa)
Inits 128x64 OLED display over i2c (based on SSD1306 controller).
void ssd1306_spiInit(int8_t cesPin, int8_t dcPin)
ssd1306_lcd_t ssd1306_lcd
void ssd1306_128x32_i2c_init(void)
Inits 128x32 OLED display over i2c (based on SSD1306 controller).
ssd1306_interface_t ssd1306_intf
void ssd1306_128x64_i2c_init(void)
Inits 128x64 OLED display over i2c (based on SSD1306 controller).
void ssd1306_i2cInitEx(int8_t scl, int8_t sda, int8_t sa)
void ssd1306_displayOn(void)
void ssd1306_setStartLine(uint8_t line)
void ssd1306_128x32_spi_init(int8_t rstPin, int8_t cesPin, int8_t dcPin)
Inits 128x32 OLED display over spi (based on SSD1306 controller).
void ssd1306_commandStart(void)
void ssd1306_sendCommand(uint8_t command)
void(* send_buffer)(const uint8_t *buffer, uint16_t size)
Sends bytes to SSD1306 device.
void ssd1306_normalMode(void)
void ssd1306_init(void) __attribute__((deprecated))
Inits 128x64 OLED display over i2c (based on SSD1306 controller).
void(* set_mode)(lcd_mode_t mode)
Sets library display mode for direct draw functions.