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
13static constexpr uint32_t LCD_BAUD_RATE = 115'200;
14
15typedef enum : uint8_t {
16 PAGE_RACE = 0,
17 PAGE_FAULTS = 1,
18 PAGE_CALIBRATION = 2,
19 PAGE_AMK = 3,
20 PAGE_VCU = 4,
21 NUM_PAGES, // leave as auto to count number of pages
22 PAGE_PREFLIGHT, // not selectable, only shown on power on
23} page_t;
24
25typedef struct {
26 void (*update)(void);
27 void (*move_up)(void);
28 void (*move_down)(void);
29 void (*select)(void);
30 void (*telemetry)(void);
31 char *string;
33
34extern volatile page_t curr_page;
35
36void LCD_init(uint32_t baud_rate);
37void LCD_tx_update(void);
38void advancePage(void);
39void backPage(void);
40void selectItem(void);
41void moveUp(void);
42void moveDown(void);
43void updatePage(void);
44void updateTelemetryPages(void);
45
46#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:25