5 #include <twr_scheduler.h>
12 #define TWR_SSD1306_ADDRESS_I2C_ADDRESS_DEFAULT 0x3C
13 #define TWR_SSD1306_ADDRESS_I2C_ADDRESS_ALTERNATE 0x3D
15 #define TWR_SSD1306_FRAMEBUFFER(NAME, WIDTH, HEIGHT) \
16 uint8_t NAME##_buffer[WIDTH * HEIGHT / 8]; \
17 twr_ssd1306_framebuffer_t NAME = { \
18 .buffer = NAME##_buffer, \
21 .length = sizeof(NAME##_buffer), \
twr_i2c_channel_t
I2C channels.
bool twr_ssd1306_init(twr_ssd1306_t *self, twr_i2c_channel_t i2c_channel, uint8_t i2c_address, const twr_ssd1306_framebuffer_t *framebuffer)
Initialize lcd driver.
void twr_ssd1306_clear(twr_ssd1306_t *self)
Clear.
bool twr_ssd1306_update(twr_ssd1306_t *self)
Lcd update, send data.
const twr_gfx_driver_t * twr_ssd1306_get_driver(void)
Get Lcd driver.
bool twr_ssd1306_is_ready(twr_ssd1306_t *self)
Check if lcd is ready for commands.
uint32_t twr_ssd1306_get_pixel(twr_ssd1306_t *self, int x, int y)
Lcd get pixel.
twr_gfx_caps_t twr_ssd1306_get_caps(twr_ssd1306_t *self)
Get capabilities.
void twr_ssd1306_draw_pixel(twr_ssd1306_t *self, int x, int y, uint32_t color)
Lcd draw pixel.
Display driver interface.