26#ifndef _ULTIBO_AF16X2LCD_H
27#define _ULTIBO_AF16X2LCD_H
38#define AF16X2LCD_CONSOLE_DESCRIPTION "Adafruit 16x2 LCD"
40#define AF16X2LCD_SIGNATURE 0x000AF162
42#define AF16X2LCD_MODEL_MONO 0
43#define AF16X2LCD_MODEL_RGB 1
46#define AF16X2LCD_PLATE_RS GPIO_PIN_15
47#define AF16X2LCD_PLATE_RW GPIO_PIN_14
48#define AF16X2LCD_PLATE_EN GPIO_PIN_13
49#define AF16X2LCD_PLATE_D4 GPIO_PIN_12
50#define AF16X2LCD_PLATE_D5 GPIO_PIN_11
51#define AF16X2LCD_PLATE_D6 GPIO_PIN_10
52#define AF16X2LCD_PLATE_D7 GPIO_PIN_9
53#define AF16X2LCD_PLATE_RED GPIO_PIN_6
54#define AF16X2LCD_PLATE_GREEN GPIO_PIN_7
55#define AF16X2LCD_PLATE_BLUE GPIO_PIN_8
57#define AF16X2LCD_BUTTON_SELECT GPIO_PIN_0
58#define AF16X2LCD_BUTTON_RIGHT GPIO_PIN_1
59#define AF16X2LCD_BUTTON_DOWN GPIO_PIN_2
60#define AF16X2LCD_BUTTON_UP GPIO_PIN_3
61#define AF16X2LCD_BUTTON_LEFT GPIO_PIN_4
uint32_t STDCALL af16x2lcd_get_button(HANDLE handle, uint32_t button)
Get the GPIO level of a button on the AF16x2LCD display.
struct _AF16X2LCD_PLATE AF16X2LCD_PLATE
Definition af16x2lcd.h:64
BOOL STDCALL af16x2lcd_backlight_off(HANDLE handle)
Turn off the backlight on the AF16x2LCD display.
HANDLE STDCALL af16x2lcd_start(uint32_t model, BOOL invert, char *device, uint16_t address)
Start the AF16x2LCD driver and register the GPIO and Console devices associated with the display.
BOOL STDCALL af16x2lcd_backlight_color(HANDLE handle, uint8_t red, uint8_t green, uint8_t blue)
Set the backlight color on the AF16x2LCD display.
BOOL STDCALL af16x2lcd_stop(HANDLE handle)
Stop the AF16x2LCD driver and deregister the GPIO and Console devices associated with the display.
BOOL STDCALL af16x2lcd_backlight_on(HANDLE handle)
Turn on the backlight on the AF16x2LCD display.
struct _CONSOLE_DEVICE CONSOLE_DEVICE
Definition console.h:186
int32_t LONGBOOL
Compatibility with FPC LongBool type (4 bytes).
Definition globaltypes.h:56
size_t HANDLE
Definition globaltypes.h:51
#define STDCALL
Definition globaltypes.h:45
_Bool BOOL
Built in Boolean type (1 byte) (Redeclared here for flexibility).
Definition globaltypes.h:55
struct _GPIO_DEVICE GPIO_DEVICE
Forward declared for GPIOPin.
Definition gpio.h:85
struct _I2C_DEVICE I2C_DEVICE
Definition i2c.h:81
Definition af16x2lcd.h:66
GPIO_DEVICE * gpio
GPIO (MCP23017) device for this plate.
Definition af16x2lcd.h:71
I2C_DEVICE * i2c
I2C device for this plate.
Definition af16x2lcd.h:70
CONSOLE_DEVICE * console
Console (HD44780) device for this plate.
Definition af16x2lcd.h:72
LONGBOOL invert
Invert polarity of Backlight (Active low if True).
Definition af16x2lcd.h:69
uint32_t signature
Signature for entry validation.
Definition af16x2lcd.h:67
uint32_t model
Plate model (eg AF16X2LCD_MODEL_MONO).
Definition af16x2lcd.h:68