Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / cms / cms.h
blob7084df8b50cc290e39bc02276a8f33f24fa88392
1 #pragma once
3 #include "drivers/display.h"
5 #include "common/time.h"
7 #include "cms/cms_types.h"
9 typedef enum {
10 CMS_KEY_NONE,
11 CMS_KEY_UP,
12 CMS_KEY_DOWN,
13 CMS_KEY_LEFT,
14 CMS_KEY_RIGHT,
15 CMS_KEY_ESC,
16 CMS_KEY_MENU,
17 CMS_KEY_SAVEMENU
18 } cms_key_e;
21 extern bool cmsInMenu;
23 // Device management
24 bool cmsDisplayPortRegister(displayPort_t *pDisplay);
26 // For main.c and scheduler
27 void cmsInit(void);
28 void cmsHandler(timeUs_t currentTimeUs);
30 bool cmsDisplayPortSelect(displayPort_t *instance);
31 displayPort_t *cmsDisplayPortGetCurrent(void);
33 void cmsMenuOpen(void);
34 long cmsMenuChange(displayPort_t *pPort, const CMS_Menu *menu, const OSD_Entry *from);
35 long cmsMenuExit(displayPort_t *pPort, const void *ptr);
36 void cmsYieldDisplay(displayPort_t *pPort, timeMs_t duration);
37 void cmsUpdate(uint32_t currentTimeUs);
38 void cmsSetExternKey(cms_key_e extKey);
40 #define CMS_STARTUP_HELP_TEXT1 "MENU: THR MID"
41 #define CMS_STARTUP_HELP_TEXT2 "+ YAW LEFT"
42 #define CMS_STARTUP_HELP_TEXT3 "+ PITCH UP"
44 // cmsMenuExit special ptr values
45 #define CMS_EXIT (0)
46 #define CMS_EXIT_SAVE (1)
47 #define CMS_EXIT_SAVEREBOOT (2)
48 #define CMS_POPUP_SAVE (3)
49 #define CMS_POPUP_SAVEREBOOT (4)