2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
23 #include "drivers/display.h"
25 #include "common/time.h"
27 #include "cms/cms_types.h"
40 extern bool cmsInMenu
;
43 bool cmsDisplayPortRegister(displayPort_t
*pDisplay
);
45 extern displayPort_t
*pCurrentDisplay
;
47 // For main.c and scheduler
49 void cmsHandler(timeUs_t currentTimeUs
);
51 bool cmsDisplayPortSelect(displayPort_t
*instance
);
52 void cmsMenuOpen(void);
53 const void *cmsMenuChange(displayPort_t
*pPort
, const void *ptr
);
54 const void *cmsMenuExit(displayPort_t
*pPort
, const void *ptr
);
55 void cmsSetExternKey(cms_key_e extKey
);
56 void inhibitSaveMenu(void);
57 void cmsAddMenuEntry(OSD_Entry
*menuEntry
, char *text
, uint16_t flags
, CMSEntryFuncPtr func
, void *data
);
59 #define CMS_STARTUP_HELP_TEXT1 "MENU:THR MID"
60 #define CMS_STARTUP_HELP_TEXT2 "+ YAW LEFT"
61 #define CMS_STARTUP_HELP_TEXT3 "+ PITCH UP"
63 // cmsMenuExit special ptr values
65 #define CMS_EXIT_SAVE (1)
66 #define CMS_EXIT_SAVEREBOOT (2)
67 #define CMS_POPUP_SAVE (3)
68 #define CMS_POPUP_SAVEREBOOT (4)
69 #define CMS_POPUP_EXITREBOOT (5)