i2c/spi ssd1306 library hardware abstraction layer
More...
i2c/spi ssd1306 library hardware abstraction layer
ssd1306 library hardware abstraction layer
#define LCDINT_TYPES_DEFINED |
Macro informs if lcdint_t type is defined
Definition at line 61 of file io.h.
#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.
internal int type, used by ssd1306 library. Important for uC with low SRAM
Definition at line 63 of file io.h.
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.
void ssd1306_platform_i2cInit |
( |
int8_t |
busId, |
|
|
uint8_t |
addr, |
|
|
int8_t |
arg |
|
) |
| |
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 AVR platforms busId is used as scl pin number. 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. |
arg | additional parameter for i2c interface. Not used on many platforms, while for AVR it is used as sda pin number. If you want to use default pin number, please pass -1. |
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. |