| 
    Firmware SDK
    
   | 
 
Driver for lcd. More...
Enumerations | |
| enum | twr_module_lcd_event_t {  TWR_MODULE_LCD_EVENT_LEFT_PRESS = 0x10 | TWR_BUTTON_EVENT_PRESS , TWR_MODULE_LCD_EVENT_LEFT_RELEASE = 0x10 | TWR_BUTTON_EVENT_RELEASE , TWR_MODULE_LCD_EVENT_LEFT_CLICK = 0x10 | TWR_BUTTON_EVENT_CLICK , TWR_MODULE_LCD_EVENT_LEFT_HOLD = 0x10 | TWR_BUTTON_EVENT_HOLD , TWR_MODULE_LCD_EVENT_RIGHT_PRESS = 0x20 | TWR_BUTTON_EVENT_PRESS , TWR_MODULE_LCD_EVENT_RIGHT_RELEASE = 0x20 | TWR_BUTTON_EVENT_RELEASE , TWR_MODULE_LCD_EVENT_RIGHT_CLICK = 0x20 | TWR_BUTTON_EVENT_CLICK , TWR_MODULE_LCD_EVENT_RIGHT_HOLD = 0x20 | TWR_BUTTON_EVENT_HOLD , TWR_MODULE_LCD_EVENT_BOTH_HOLD = 0x30 | TWR_BUTTON_EVENT_HOLD }  | 
| Callback events.  | |
| enum | twr_module_lcd_rotation_t {  TWR_MODULE_LCD_ROTATION_0 = TWR_GFX_ROTATION_0 , TWR_MODULE_LCD_ROTATION_90 = TWR_GFX_ROTATION_90 , TWR_MODULE_LCD_ROTATION_180 = TWR_GFX_ROTATION_180 , TWR_MODULE_LCD_ROTATION_270 = TWR_GFX_ROTATION_270 }  | 
| Rotation.  More... | |
| enum | twr_module_lcd_led_t {  TWR_MODULE_LCD_LED_RED = 0 , TWR_MODULE_LCD_LED_GREEN = 1 , TWR_MODULE_LCD_LED_BLUE = 2 }  | 
| Virtual LED channels.  More... | |
| enum | twr_module_lcd_button_t {  TWR_MODULE_LCD_BUTTON_LEFT = 0 , TWR_MODULE_LCD_BUTTON_RIGHT = 1 }  | 
| Virtual button channels.  More... | |
Functions | |
| void | twr_module_lcd_init () | 
| Initialize lcd.  | |
| twr_gfx_t * | twr_module_lcd_get_gfx () | 
| Get gfx instance.  | |
| bool | twr_module_lcd_on (void) | 
| Lcd on.  More... | |
| bool | twr_module_lcd_off (void) | 
| Lcd off.  More... | |
| bool | twr_module_lcd_is_present (void) | 
| Get LCD Module is pressent, can use without twr_module_lcd_init.  | |
| bool | twr_module_lcd_is_ready (void) | 
| Check if lcd is ready for commands.  More... | |
| void | twr_module_lcd_clear (void) | 
| Lcd clear.  | |
| void | twr_module_lcd_draw_pixel (int left, int top, bool color) | 
| Lcd draw pixel.  More... | |
| int | twr_module_lcd_draw_char (int left, int top, uint8_t ch, bool color) | 
| Lcd draw char.  More... | |
| int | twr_module_lcd_draw_string (int left, int top, char *str, bool color) | 
| Lcd draw string.  More... | |
| void | twr_module_lcd_draw_line (int x0, int y0, int x1, int y1, bool color) | 
| Lcd draw line.  More... | |
| void | twr_module_lcd_draw_rectangle (int x0, int y0, int x1, int y1, bool color) | 
| Lcd draw rectangle.  More... | |
| void | twr_module_lcd_draw_circle (int x0, int y0, int radius, bool color) | 
| Lcd draw circle.  More... | |
| void | twr_module_lcd_draw_image (int left, int top, const twr_image_t *img) | 
| Lcd draw image.  More... | |
| bool | twr_module_lcd_update (void) | 
| Lcd update, send data.  More... | |
| void | twr_module_lcd_set_font (const twr_font_t *font) | 
| Lcd set font.  More... | |
| void | twr_module_lcd_set_rotation (twr_module_lcd_rotation_t rotation) | 
| Lcd set rotation.  More... | |
| 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.  More... | |
| twr_module_lcd_rotation_t | twr_module_lcd_get_rotation (void) | 
| Lcd get rotation.  More... | |
| const twr_led_driver_t * | twr_module_lcd_get_led_driver (void) | 
| Lcd get led driver.  More... | |
| const twr_button_driver_t * | twr_module_lcd_get_button_driver (void) | 
| Lcd get button driver.  More... | |
| 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)  More... | |
| void | twr_module_lcd_set_button_scan_interval (twr_tick_t scan_interval) | 
| Set scan interval (period of button input sampling)  More... | |
| 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)  More... | |
| 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)  More... | |
Driver for lcd.
Virtual button channels.
| Enumerator | |
|---|---|
| TWR_MODULE_LCD_BUTTON_LEFT | LCD left button channel.  | 
| TWR_MODULE_LCD_BUTTON_RIGHT | LCD right button channel.  | 
Definition at line 69 of file twr_module_lcd.h.
| enum twr_module_lcd_led_t | 
Virtual LED channels.
| Enumerator | |
|---|---|
| TWR_MODULE_LCD_LED_RED | LCD red LED channel.  | 
| TWR_MODULE_LCD_LED_GREEN | LCD green LED channel.  | 
| TWR_MODULE_LCD_LED_BLUE | LCD blue LED channel.  | 
Definition at line 54 of file twr_module_lcd.h.
Rotation.
Definition at line 36 of file twr_module_lcd.h.
| int twr_module_lcd_draw_char | ( | int | left, | 
| int | top, | ||
| uint8_t | ch, | ||
| bool | color | ||
| ) | 
Lcd draw char.
| [in] | left | Pixels from left edge | 
| [in] | top | Pixels from top edge | 
| [in] | ch | Char to be printed | 
| [in] | color | Pixels state | 
Definition at line 110 of file twr_module_lcd.c.

| void twr_module_lcd_draw_circle | ( | int | x0, | 
| int | y0, | ||
| int | radius, | ||
| bool | color | ||
| ) | 
Lcd draw circle.
| [in] | x0 | Center - pixels from left edge | 
| [in] | y0 | Center - pixels from top edge | 
| [in] | radius | In pixels | 
| [in] | color | Pixels state | 
Definition at line 144 of file twr_module_lcd.c.

| void twr_module_lcd_draw_image | ( | int | left, | 
| int | top, | ||
| const twr_image_t * | img | ||
| ) | 
Lcd draw image.
| [in] | left | Pixels from left edge | 
| [in] | top | Pixels from top edge | 
| [in] | img | Pointer to the image | 
Definition at line 149 of file twr_module_lcd.c.

| void twr_module_lcd_draw_line | ( | int | x0, | 
| int | y0, | ||
| int | x1, | ||
| int | y1, | ||
| bool | color | ||
| ) | 
Lcd draw line.
| [in] | x0 | Pixels from left edge | 
| [in] | y0 | Pixels from top edge | 
| [in] | x1 | Pixels from left edge | 
| [in] | y1 | Pixels from top edge | 
| [in] | color | Pixels state | 
Definition at line 134 of file twr_module_lcd.c.

| void twr_module_lcd_draw_pixel | ( | int | left, | 
| int | top, | ||
| bool | color | ||
| ) | 
Lcd draw pixel.
| [in] | left | Pixels from left edge | 
| [in] | top | Pixels from top edge | 
| [in] | color | Pixels state | 
Definition at line 105 of file twr_module_lcd.c.

| void twr_module_lcd_draw_rectangle | ( | int | x0, | 
| int | y0, | ||
| int | x1, | ||
| int | y1, | ||
| bool | color | ||
| ) | 
Lcd draw rectangle.
| [in] | x0 | Pixels from left edge | 
| [in] | y0 | Pixels from top edge | 
| [in] | x1 | Pixels from left edge | 
| [in] | y1 | Pixels from top edge | 
| [in] | color | Pixels state | 
Definition at line 139 of file twr_module_lcd.c.

| int twr_module_lcd_draw_string | ( | int | left, | 
| int | top, | ||
| char * | str, | ||
| bool | color | ||
| ) | 
Lcd draw string.
| [in] | left | Pixels from left edge | 
| [in] | top | Pixels from top edge | 
| [in] | *str | String to be printed | 
| [in] | color | Pixels state | 
Definition at line 115 of file twr_module_lcd.c.

| const twr_button_driver_t* twr_module_lcd_get_button_driver | ( | void | ) | 
Lcd get button driver.
Definition at line 307 of file twr_module_lcd.c.
Referenced by twr_module_lcd_set_event_handler().

| const twr_led_driver_t* twr_module_lcd_get_led_driver | ( | void | ) | 
| twr_module_lcd_rotation_t twr_module_lcd_get_rotation | ( | void | ) | 
Lcd get rotation.
Definition at line 290 of file twr_module_lcd.c.

| bool twr_module_lcd_is_ready | ( | void | ) | 
Check if lcd is ready for commands.
Definition at line 95 of file twr_module_lcd.c.

| bool twr_module_lcd_off | ( | void | ) | 
Lcd off.
Definition at line 85 of file twr_module_lcd.c.

| bool twr_module_lcd_on | ( | void | ) | 
Lcd on.
Definition at line 80 of file twr_module_lcd.c.

| 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)
| [in] | click_timeout | Desired click timeout in ticks | 
Definition at line 279 of file twr_module_lcd.c.

| 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)
| [in] | debounce_time | Desired debounce time in ticks | 
Definition at line 273 of file twr_module_lcd.c.

| 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)
| [in] | hold_time | Desired hold time in ticks | 
Definition at line 261 of file twr_module_lcd.c.

| void twr_module_lcd_set_button_scan_interval | ( | twr_tick_t | scan_interval | ) | 
Set scan interval (period of button input sampling)
| [in] | scan_interval | Desired scan interval in ticks | 
Definition at line 267 of file twr_module_lcd.c.

| void twr_module_lcd_set_event_handler | ( | void(*)(twr_module_lcd_event_t, void *) | event_handler, | 
| void * | event_param | ||
| ) | 
Lcd set event handler for buttons.
| [in] | event_handler | Event handler | 
| [in] | event_param | Event parameter | 
Definition at line 247 of file twr_module_lcd.c.

| void twr_module_lcd_set_font | ( | const twr_font_t * | font | ) | 
Lcd set font.
| [in] | *font | Font | 
Definition at line 179 of file twr_module_lcd.c.

| void twr_module_lcd_set_rotation | ( | twr_module_lcd_rotation_t | rotation | ) | 
Lcd set rotation.
| [in] | rotation | Rotation of diplay | 
Definition at line 285 of file twr_module_lcd.c.

| bool twr_module_lcd_update | ( | void | ) | 
Lcd update, send data.
Definition at line 174 of file twr_module_lcd.c.
