Firmware SDK
|
Driver for SSD1306 Monochrome OLED graphic display. More...
Data Structures | |
struct | twr_ssd1306_framebuffer_t |
struct | twr_ssd1306_t |
Instance. More... | |
Macros | |
#define | TWR_SSD1306_ADDRESS_I2C_ADDRESS_DEFAULT 0x3C |
#define | TWR_SSD1306_ADDRESS_I2C_ADDRESS_ALTERNATE 0x3D |
#define | TWR_SSD1306_FRAMEBUFFER(NAME, WIDTH, HEIGHT) |
Functions | |
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. More... | |
twr_gfx_caps_t | twr_ssd1306_get_caps (twr_ssd1306_t *self) |
Get capabilities. More... | |
bool | twr_ssd1306_is_ready (twr_ssd1306_t *self) |
Check if lcd is ready for commands. More... | |
void | twr_ssd1306_clear (twr_ssd1306_t *self) |
Clear. More... | |
void | twr_ssd1306_draw_pixel (twr_ssd1306_t *self, int x, int y, uint32_t color) |
Lcd draw pixel. More... | |
uint32_t | twr_ssd1306_get_pixel (twr_ssd1306_t *self, int x, int y) |
Lcd get pixel. More... | |
bool | twr_ssd1306_update (twr_ssd1306_t *self) |
Lcd update, send data. More... | |
const twr_gfx_driver_t * | twr_ssd1306_get_driver (void) |
Get Lcd driver. | |
Driver for SSD1306 Monochrome OLED graphic display.
#define TWR_SSD1306_FRAMEBUFFER | ( | NAME, | |
WIDTH, | |||
HEIGHT | |||
) |
Definition at line 15 of file twr_ssd1306.h.
void twr_ssd1306_clear | ( | twr_ssd1306_t * | self | ) |
Clear.
[in] | self | Instance |
Definition at line 68 of file twr_ssd1306.c.
Referenced by twr_ssd1306_get_driver().
void twr_ssd1306_draw_pixel | ( | twr_ssd1306_t * | self, |
int | x, | ||
int | y, | ||
uint32_t | color | ||
) |
Lcd draw pixel.
[in] | self | Instance |
[in] | left | Pixels from left edge |
[in] | top | Pixels from top edge |
[in] | color | Pixels state |
Definition at line 73 of file twr_ssd1306.c.
Referenced by twr_ssd1306_get_driver().
twr_gfx_caps_t twr_ssd1306_get_caps | ( | twr_ssd1306_t * | self | ) |
Get capabilities.
[in] | self | Instance |
Definition at line 51 of file twr_ssd1306.c.
Referenced by twr_ssd1306_get_driver().
uint32_t twr_ssd1306_get_pixel | ( | twr_ssd1306_t * | self, |
int | x, | ||
int | y | ||
) |
Lcd get pixel.
[in] | self | Instance |
[in] | left | Pixels from left edge |
[in] | top | Pixels from top edge |
[in] | color | Pixels state |
Definition at line 94 of file twr_ssd1306.c.
Referenced by twr_ssd1306_get_driver().
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.
[in] | self | Instance |
[in] | i2c_channel | I2C channel |
[in] | i2c_address | I2C device address |
[in] | framebuffer |
Definition at line 34 of file twr_ssd1306.c.
bool twr_ssd1306_is_ready | ( | twr_ssd1306_t * | self | ) |
Check if lcd is ready for commands.
[in] | self | Instance |
Definition at line 58 of file twr_ssd1306.c.
Referenced by twr_ssd1306_get_driver().
bool twr_ssd1306_update | ( | twr_ssd1306_t * | self | ) |
Lcd update, send data.
[in] | self | Instance |
Definition at line 103 of file twr_ssd1306.c.
Referenced by twr_ssd1306_get_driver().