34 extern uint16_t ssd1306_color;
36 static const PROGMEM uint8_t s_oled_128x64_initData[] =
40 SDL_LCD_SSD1325_GENERIC,
48 0xA0, 0x40 | 0x10 | 0x04 | 0x02 | 0x01,
63 static uint8_t __s_column;
65 static uint8_t __s_w2;
66 static uint8_t __s_page;
67 static uint8_t __s_leftPixel;
68 static uint8_t __s_pos;
70 static void set_block_compat(lcduint_t x, lcduint_t y, lcduint_t w)
91 static void next_page_compat(
void)
94 set_block_compat(__s_column,__s_page + 1, __s_w);
97 static void ssd1325_sendPixels(uint8_t data)
99 if (!(__s_pos & 0x01))
101 __s_leftPixel = data;
104 if ((__s_pos & 0x01) || (__s_pos == __s_column + __s_w2 - 1))
106 for (uint8_t i=8; i>0; i--)
108 uint8_t color = (__s_leftPixel & 0x01) ? (ssd1306_color & 0x0F) : 0;
109 color |= (((data & 0x01) ? (ssd1306_color & 0x0F): 0) << 4);
118 static void ssd1325_sendPixelsBuffer(
const uint8_t *buffer, uint16_t len)
122 ssd1325_sendPixels(*buffer);
#define CONTROLLER_NATIVE_SPI_BLOCK_8BIT_CMDS(column_cmd, row_cmd)
void(* send)(uint8_t data)
void ssd1306_configureI2cDisplay(const uint8_t *config, uint8_t configSize)
Sends configuration being passed to lcd display i2c/spi controller.
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(* send_pixels8)(uint8_t data)
Sends RGB pixel encoded in 3-3-2 format to OLED driver. Sends RGB pixel encoded in 3-3-2 format to OL...
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
void ssd1325_128x64_init(void)
Inits 128x64 SSD1325 OLED display (based on SSD1325 controller).
ssd1306_interface_t ssd1306_intf
void ssd1325_setMode(lcd_mode_t mode)
Sets GDRAM autoincrement mode.
void(* set_mode)(lcd_mode_t mode)
Sets library display mode for direct draw functions.
void ssd1325_128x64_spi_init(int8_t rstPin, int8_t cesPin, int8_t dcPin)
Inits 128x64 SSD1325 OLED display over spi (based on SSD1325 controller).