25 #include "oled_ssd1327.h" 34 extern uint16_t ssd1306_color;
36 static const PROGMEM uint8_t s_oled_128x128_initData[] =
40 SDL_LCD_SSD1327_GENERIC,
47 0xA0, 0x40 | 0x10 | 0x04 | (0x02 | 0x01),
66 static uint8_t __s_column;
68 static uint8_t __s_w2;
69 static uint8_t __s_page;
70 static uint8_t __s_leftPixel;
71 static uint8_t __s_pos;
73 static void set_block_compat(lcduint_t x, lcduint_t y, lcduint_t w)
94 static void ssd1327_sendPixels(uint8_t data);
96 static void next_page_compat(
void)
99 set_block_compat(__s_column,__s_page + 1, __s_w);
104 static void ssd1327_sendPixels(uint8_t data)
106 if (!(__s_pos & 0x01))
108 __s_leftPixel = data;
111 if ((__s_pos & 0x01) || (__s_pos == __s_column + __s_w2 - 1))
113 for (uint8_t i=8; i>0; i--)
115 uint8_t color = (__s_leftPixel & 0x01) ? (ssd1306_color & 0x0F) : 0;
116 color |= (((data & 0x01) ? (ssd1306_color & 0x0F): 0) << 4);
125 static void ssd1327_sendPixels8(uint8_t data)
130 static void ssd1327_sendPixelsBuffer(
const uint8_t *buffer, uint16_t len)
134 ssd1327_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 ssd1327_128x128_init()
Inits 128x128 SSD1327 OLED display (based on SSD1327 controller).
void ssd1306_spiInit(int8_t cesPin, int8_t dcPin)
ssd1306_lcd_t ssd1306_lcd
void ssd1327_128x128_spi_init(int8_t rstPin, int8_t cesPin, int8_t dcPin)
Inits 128x128 SSD1327 OLED display over spi (based on SSD1327 controller).
ssd1306_interface_t ssd1306_intf
void(* set_mode)(lcd_mode_t mode)
Sets library display mode for direct draw functions.