Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_ssd1306

Driver for SSD1306 Monochrome OLED graphic display. More...

Data Structures

struct  bc_ssd1306_framebuffer_t
 
struct  bc_ssd1306_t
 Instance. More...
 

Macros

#define BC_SSD1306_ADDRESS_I2C_ADDRESS_DEFAULT   0x3C
 
#define BC_SSD1306_ADDRESS_I2C_ADDRESS_ALTERNATE   0x3D
 
#define BC_SSD1306_FRAMEBUFFER(NAME, WIDTH, HEIGHT)
 

Functions

bool bc_ssd1306_init (bc_ssd1306_t *self, bc_i2c_channel_t i2c_channel, uint8_t i2c_address, const bc_ssd1306_framebuffer_t *framebuffer)
 Initialize lcd driver. More...
 
bc_gfx_caps_t bc_ssd1306_get_caps (bc_ssd1306_t *self)
 Get capabilities. More...
 
bool bc_ssd1306_is_ready (bc_ssd1306_t *self)
 Check if lcd is ready for commands. More...
 
void bc_ssd1306_clear (bc_ssd1306_t *self)
 Clear. More...
 
void bc_ssd1306_draw_pixel (bc_ssd1306_t *self, int x, int y, uint32_t color)
 Lcd draw pixel. More...
 
uint32_t bc_ssd1306_get_pixel (bc_ssd1306_t *self, int x, int y)
 Lcd get pixel. More...
 
bool bc_ssd1306_update (bc_ssd1306_t *self)
 Lcd update, send data. More...
 
const bc_gfx_driver_tbc_ssd1306_get_driver (void)
 Get Lcd driver.
 

Detailed Description

Driver for SSD1306 Monochrome OLED graphic display.

Macro Definition Documentation

#define BC_SSD1306_FRAMEBUFFER (   NAME,
  WIDTH,
  HEIGHT 
)
Value:
uint8_t NAME##_buffer[WIDTH * HEIGHT / 8]; \
bc_ssd1306_framebuffer_t NAME = { \
.buffer = NAME##_buffer, \
.width = WIDTH, \
.height = HEIGHT, \
.length = sizeof(NAME##_buffer), \
.pages = HEIGHT / 8 \
};

Definition at line 15 of file bc_ssd1306.h.

Function Documentation

void bc_ssd1306_clear ( bc_ssd1306_t self)

Clear.

Parameters
[in]selfInstance

Definition at line 68 of file bc_ssd1306.c.

Referenced by bc_ssd1306_get_driver().

Here is the caller graph for this function:

void bc_ssd1306_draw_pixel ( bc_ssd1306_t self,
int  x,
int  y,
uint32_t  color 
)

Lcd draw pixel.

Parameters
[in]selfInstance
[in]leftPixels from left edge
[in]topPixels from top edge
[in]colorPixels state

Definition at line 73 of file bc_ssd1306.c.

Referenced by bc_ssd1306_get_driver().

Here is the caller graph for this function:

bc_gfx_caps_t bc_ssd1306_get_caps ( bc_ssd1306_t self)

Get capabilities.

Parameters
[in]selfInstance

Definition at line 51 of file bc_ssd1306.c.

Referenced by bc_ssd1306_get_driver().

Here is the caller graph for this function:

uint32_t bc_ssd1306_get_pixel ( bc_ssd1306_t self,
int  x,
int  y 
)

Lcd get pixel.

Parameters
[in]selfInstance
[in]leftPixels from left edge
[in]topPixels from top edge
[in]colorPixels state

Definition at line 94 of file bc_ssd1306.c.

Referenced by bc_ssd1306_get_driver().

Here is the caller graph for this function:

bool bc_ssd1306_init ( bc_ssd1306_t self,
bc_i2c_channel_t  i2c_channel,
uint8_t  i2c_address,
const bc_ssd1306_framebuffer_t framebuffer 
)

Initialize lcd driver.

Parameters
[in]selfInstance
[in]i2c_channelI2C channel
[in]i2c_addressI2C device address
[in]framebuffer

Definition at line 34 of file bc_ssd1306.c.

Here is the call graph for this function:

bool bc_ssd1306_is_ready ( bc_ssd1306_t self)

Check if lcd is ready for commands.

Parameters
[in]selfInstance
Returns
true If ready
false If not ready

Definition at line 58 of file bc_ssd1306.c.

Referenced by bc_ssd1306_get_driver().

Here is the caller graph for this function:

bool bc_ssd1306_update ( bc_ssd1306_t self)

Lcd update, send data.

Parameters
[in]selfInstance
Returns
true On success
false On failure

Definition at line 103 of file bc_ssd1306.c.

Referenced by bc_ssd1306_get_driver().

Here is the caller graph for this function: