1 #ifndef _TWR_MODULE_LCD
2 #define _TWR_MODULE_LCD
5 #include <twr_font_common.h>
8 #include <twr_button.h>
@ TWR_GFX_ROTATION_270
Rotation 270 degrees.
@ TWR_GFX_ROTATION_180
Rotation 180 degrees.
@ TWR_GFX_ROTATION_90
Rotation 90 degrees.
@ TWR_GFX_ROTATION_0
Rotation 0 degrees.
void twr_module_lcd_clear(void)
Lcd clear.
bool twr_module_lcd_update(void)
Lcd update, send data.
bool twr_module_lcd_on(void)
Lcd on.
void twr_module_lcd_draw_rectangle(int x0, int y0, int x1, int y1, bool color)
Lcd draw rectangle.
void twr_module_lcd_draw_line(int x0, int y0, int x1, int y1, bool color)
Lcd draw line.
int twr_module_lcd_draw_char(int left, int top, uint8_t ch, bool color)
Lcd draw char.
void twr_module_lcd_draw_image(int left, int top, const twr_image_t *img)
Lcd draw image.
void twr_module_lcd_draw_circle(int x0, int y0, int radius, bool color)
Lcd draw circle.
void twr_module_lcd_set_button_click_timeout(twr_tick_t click_timeout)
Set click timeout (maximum interval within which button has to be released to recognize click event)
twr_module_lcd_event_t
Callback events.
void twr_module_lcd_set_button_debounce_time(twr_tick_t debounce_time)
Set debounce time (minimum sampling interval during which input cannot change to toggle its state)
twr_module_lcd_rotation_t
Rotation.
const twr_led_driver_t * twr_module_lcd_get_led_driver(void)
Lcd get led driver.
twr_module_lcd_led_t
Virtual LED channels.
int twr_module_lcd_draw_string(int left, int top, char *str, bool color)
Lcd draw string.
twr_gfx_t * twr_module_lcd_get_gfx()
Get gfx instance.
void twr_module_lcd_set_event_handler(void(*event_handler)(twr_module_lcd_event_t, void *), void *event_param)
Lcd set event handler for buttons.
twr_module_lcd_rotation_t twr_module_lcd_get_rotation(void)
Lcd get rotation.
bool twr_module_lcd_is_ready(void)
Check if lcd is ready for commands.
bool twr_module_lcd_is_present(void)
Get LCD Module is pressent, can use without twr_module_lcd_init.
void twr_module_lcd_set_button_hold_time(twr_tick_t hold_time)
Set hold time (interval after which hold event is recognized when button is steadily pressed)
void twr_module_lcd_set_font(const twr_font_t *font)
Lcd set font.
void twr_module_lcd_set_rotation(twr_module_lcd_rotation_t rotation)
Lcd set rotation.
bool twr_module_lcd_off(void)
Lcd off.
void twr_module_lcd_set_button_scan_interval(twr_tick_t scan_interval)
Set scan interval (period of button input sampling)
twr_module_lcd_button_t
Virtual button channels.
const twr_button_driver_t * twr_module_lcd_get_button_driver(void)
Lcd get button driver.
void twr_module_lcd_draw_pixel(int left, int top, bool color)
Lcd draw pixel.
void twr_module_lcd_init()
Initialize lcd.
@ TWR_MODULE_LCD_ROTATION_0
LCD rotation 0 degrees.
@ TWR_MODULE_LCD_ROTATION_180
LCD rotation 180 degrees.
@ TWR_MODULE_LCD_ROTATION_270
LCD rotation 270 degrees.
@ TWR_MODULE_LCD_ROTATION_90
LCD rotation 90 degrees.
@ TWR_MODULE_LCD_LED_RED
LCD red LED channel.
@ TWR_MODULE_LCD_LED_BLUE
LCD blue LED channel.
@ TWR_MODULE_LCD_LED_GREEN
LCD green LED channel.
@ TWR_MODULE_LCD_BUTTON_RIGHT
LCD right button channel.
@ TWR_MODULE_LCD_BUTTON_LEFT
LCD left button channel.
uint64_t twr_tick_t
Timestamp data type.