i2c/spi ssd1306 library hardware abstraction layer
More...
i2c/spi ssd1306 library hardware abstraction layer
ssd1306 library hardware abstraction layer
◆ LCDINT_TYPES_DEFINED
#define LCDINT_TYPES_DEFINED |
Macro informs if lcdint_t type is defined
Definition at line 61 of file io.h.
◆ ssd1306_swap_data
#define ssd1306_swap_data |
( |
|
a, |
|
|
|
b, |
|
|
|
type |
|
) |
| { type t = a; a = b; b = t; } |
swaps content of a and b variables of type type
Definition at line 69 of file io.h.
◆ lcdint_t
internal int type, used by ssd1306 library. Important for uC with low SRAM
Definition at line 63 of file io.h.
◆ lcduint_t
typedef unsigned int lcduint_t |
internal int type, used by ssd1306 library. Important for uC with low SRAM
Definition at line 65 of file io.h.
◆ ssd1306_platform_i2cInit()
Initializes i2c interface for platform being used.
Initializes i2c interface for platform being used. i2c implementation depends on platform.
- Parameters
-
busId | i2c bus number. Some platforms have several i2c buses. so, this argument identifies bus to use. For several platforms busId is not used. If you want to use default i2c bus for specific platform, please pass -1. |
addr | i2c address of oled driver, connected to i2c bus. If you want to use default i2c display address, please, pass 0. |
cfg | Specify scl and sda for the platform. If you want to use default pin numbers, please pass -1 for both members. |
◆ ssd1306_platform_spiInit()
void ssd1306_platform_spiInit |
( |
int8_t |
busId, |
|
|
int8_t |
cesPin, |
|
|
int8_t |
dcPin |
|
) |
| |
Initializes spi interface for platform being used.
Initializes spi interface for platform being used. spi implementation depends on platform.
- Parameters
-
busId | spi bus number if device has several spi buses. For most AVR platforms busId is not used. If you want to use default spi bus for specific platform, please pass -1. |
cesPin | chip select (chip enable) pin number. If you want to use default pin, hard coded by ssd1306 library, please, pass -1. For Linux platform cesPin means second number in spidev device. |
dcPin | data/command pin number. For most oled displays this pin number is used to select data or command mode for the bus. If you want to use default pin number, please pass -1. |