CuVoodoo STM32F1 firmware template
Macros | Functions
oled_ssd1306.c File Reference

SSD1306 OLED library (code) More...

Go to the source code of this file.

Macros

#define OLED_SSD1306_SLAVE   0x3c
 SSD1306 OLED display I2C slave address.
 
#define OLED_SSD1306_I2C   I2C1
 I2C peripheral.
 

Functions

bool oled_ssd1306_setup (void)
 setup OLED display More...
 
void oled_ssd1306_on (void)
 switch OLED display on
 
void oled_ssd1306_off (void)
 switch OLED display off
 
void oled_ssd1306_test (void)
 test OLED display: switch entire screen on for a brief time
 
void oled_ssd1306_display (const uint8_t *display_data, uint16_t display_length)
 send data to display to OLED display More...
 

Detailed Description

SSD1306 OLED library (code)

Author
King Kévin kingk.nosp@m.evin.nosp@m.@cuvo.nosp@m.odoo.nosp@m..info
Date
2018
Note
peripherals used: I2C I2C peripheral to communicate with the SSD1306 OLED

Definition in file oled_ssd1306.c.

Function Documentation

◆ oled_ssd1306_display()

void oled_ssd1306_display ( const uint8_t *  display_data,
uint16_t  display_length 
)

send data to display to OLED display

Parameters
[in]display_datadata to display (first byte is left column, MSb is top pixel, warps pages)
[in]display_lengthlength of data to display

Definition at line 109 of file oled_ssd1306.c.

◆ oled_ssd1306_setup()

bool oled_ssd1306_setup ( void  )

setup OLED display

Returns
if the display setup is successful, else the display is probably not on the I2C bus

Definition at line 43 of file oled_ssd1306.c.