i2c/spi ssd1306 library hardware abstraction layer
More...
|
|
#define | LCDINT_TYPES_DEFINED |
| | Macro informs if lcdint_t type is defined.
|
| |
| #define | ssd1306_swap_data(a, b, type) |
| | swaps content of a and b variables of type type More...
|
| |
|
#define | LCD_LOW 0 |
| | Constant corresponds to low level of gpio pin.
|
| |
|
#define | LCD_HIGH 1 |
| | Constant corresponds to high level of gpio pin.
|
| |
|
#define | LCD_GPIO_INPUT 0 |
| | Constant corresponds to input mode of gpio.
|
| |
|
#define | LCD_GPIO_OUTPUT 1 |
| | Constant corresponds to output mode of gpio.
|
| |
|
#define | LCD_GPIO_INPUT_PULLUP 2 |
| | Constant corresponds to input mode of gpio with pullup resistor enabled.
|
| |
|
#define | LCD_GPIO_INPUT_PULLDOWN 3 |
| | Constant corresponds to output mode of gpio with pulldown resistor enabled.
|
| |
|
#define | LCD_PROGMEM PROGMEM |
| | LCD_PROGMEM constant is used to specify data stored in flash, platform specific.
|
| |
|
#define | CONFIG_LCDGFX_PLATFORM_I2C |
| |
|
#define | CONFIG_LCDGFX_PLATFORM_SPI |
| |
|
| typedef int | lcdint_t |
| | internal int type, used by ssd1306 library. More...
|
| |
| typedef unsigned int | lcduint_t |
| | internal int type, used by ssd1306 library. More...
|
| |
i2c/spi ssd1306 library hardware abstraction layer
ssd1306 library hardware abstraction layer
◆ ssd1306_swap_data
| #define ssd1306_swap_data |
( |
|
a, |
|
|
|
b, |
|
|
|
type |
|
) |
| |
Value:{ \
type t = a; \
a = b; \
b = t; \
}
swaps content of a and b variables of type type
Definition at line 114 of file io.h.
◆ lcdint_t
internal int type, used by ssd1306 library.
Important for uC with low SRAM
Definition at line 108 of file io.h.
◆ lcduint_t
internal int type, used by ssd1306 library.
Important for uC with low SRAM
Definition at line 110 of file io.h.
◆ lcd_adcRead()
| int lcd_adcRead |
( |
int |
pin | ) |
|
Read ADC data.
- Parameters
-
| pin | adc pin to read (platform-specific) |
- Returns
- integer value corresponding to provided gpio pin. actual value range depends on platform and ADC mode.
◆ lcd_attachInterrupt()
| void lcd_attachInterrupt |
( |
int |
pin, |
|
|
void(*)() |
interrupt, |
|
|
int |
level |
|
) |
| |
Attaches interrupt handler to pin.
Not implemented on many platforms
- Parameters
-
| pin | gpio pin number to attach interrupt handler to |
| interrupt | interrupt handler |
| level | gpio state to aim interrupt |
◆ lcd_delay()
| void lcd_delay |
( |
unsigned long |
ms | ) |
|
Forces current thread to sleeps for specified number of milliseconds.
- Parameters
-
◆ lcd_delayUs()
| void lcd_delayUs |
( |
unsigned long |
us | ) |
|
Forces current thread to sleeps for specified number of microseconds.
- Parameters
-
◆ lcd_eepromReadWord()
| uint16_t lcd_eepromReadWord |
( |
const void * |
ptr | ) |
|
Reads 16-bit from eeprom.
- Parameters
-
| ptr | pointer to eeprom memory to read |
- Returns
- 16-bit number from eeprom
◆ lcd_eepromWriteWord()
| void lcd_eepromWriteWord |
( |
const void * |
ptr, |
|
|
uint16_t |
val |
|
) |
| |
Writes 16-bit to eeprom.
- Parameters
-
| ptr | pointer to eeprom memory to write data to |
| val | 16-bit value to write |
◆ lcd_gpioMode()
| void lcd_gpioMode |
( |
int |
pin, |
|
|
int |
mode |
|
) |
| |
Sets gpio pin mode.
- Parameters
-
| pin | pin number to change mode of |
| mode | new gpio mode: LCD_GPIO_INPUT or LCD_GPIO_OUTPUT |
◆ lcd_gpioRead()
| int lcd_gpioRead |
( |
int |
pin | ) |
|
Reads gpio pin value.
- Parameters
-
| pin | gpio pin number to read |
- Returns
- LCD_HIGH or LCD_LOW
◆ lcd_gpioWrite()
| void lcd_gpioWrite |
( |
int |
pin, |
|
|
int |
level |
|
) |
| |
Writes value to gpio.
- Parameters
-
| pin | gpio pin number to change |
| level | LCD_HIGH or LCD_LOW |
◆ lcd_pgmReadByte()
| uint8_t lcd_pgmReadByte |
( |
const void * |
ptr | ) |
|
Read single data byte directly from flash.
This function is valid only for AVR platform. For other platforms, it reads byte, pointed by ptr.
- Parameters
-
| ptr | pointer to data in flash |
- Returns
- returns single byte read.
◆ lcd_random() [1/2]
| int lcd_random |
( |
int |
max | ) |
|
Returns random number in range [0;max].
- Parameters
-
| max | upper limit for number being generated |
◆ lcd_random() [2/2]
| int lcd_random |
( |
int |
min, |
|
|
int |
max |
|
) |
| |
Returns random number in range [min;max].
- Parameters
-
| min | lower limit for number being generated |
| max | upper limit for number being generated |
◆ lcd_randomSeed()
| void lcd_randomSeed |
( |
int |
seed | ) |
|
Initializes RND device.
- Parameters
-
| seed | unique number to use for initialization |