PER Firmware
Loading...
Searching...
No Matches
lcd.h
Go to the documentation of this file.
1#ifndef LCD_H
2#define LCD_H
3
4#include <stdint.h>
5
13typedef enum : uint8_t {
14 PAGE_RACE = 0,
15 PAGE_FAULTS = 1,
16 PAGE_CALIBRATION = 2,
17 PAGE_AMK = 3,
18 PAGE_VCU = 4,
19 NUM_PAGES, // leave as auto to count number of pages
20 PAGE_PREFLIGHT, // not selectable, only shown on power on
21} page_t;
22
23typedef struct {
24 void (*update)(void);
25 void (*move_up)(void);
26 void (*move_down)(void);
27 void (*select)(void);
28 void (*telemetry)(void);
29 char *string;
31
32extern volatile page_t curr_page;
33
34void LCD_init(uint32_t baud_rate);
35void LCD_tx_update(void);
36void advancePage(void);
37void backPage(void);
38void selectItem(void);
39void moveUp(void);
40void moveDown(void);
41void updatePage(void);
42void updateTelemetryPages(void);
43
44#endif // LCD_H
void backPage(void)
Moves to the previous selectable page.
Definition lcd.c:117
void updatePage(void)
Updates LCD display page.
Definition lcd.c:133
void advancePage(void)
Advances to the next selectable page.
Definition lcd.c:105
void LCD_tx_update(void)
Called periodically to send commands to the Nextion LCD display via USART.
Definition lcd.c:89
void updateTelemetryPages(void)
Updates current telemetry page by calling its handler if available.
Definition lcd.c:182
Definition lcd.h:23