EL18 RF USB switch (#2221)

* feature: added ability to have radio specific menu items in the bootloader
* added enabling/disabling USB access to the RF module via the bootloader
* enable the internal module on EL18, when RF module USB access is enabled
* moved USB switch pin initialization to the NV14/EL18 specific code
* moved EL18 USB switch defines to boot_menu
* feat: added a symbol for RF USB switch menu option on EL18 bootloader
This commit is contained in:
Malte Langermann
2022-09-08 08:20:49 +02:00
committed by GitHub
parent 4e49ac68be
commit 8b7e8c3017
10 changed files with 194 additions and 23 deletions
@@ -24,6 +24,7 @@
#include <stdint.h>
#include "stamp.h"
#include "keys.h"
#if LCD_W < 212
#if defined(VERSION_TAG)
@@ -70,6 +71,7 @@ enum BootloaderState {
ST_FLASH_DONE,
ST_RESTORE_MENU,
ST_USB,
ST_RADIO_MENU,
ST_REBOOT,
};
@@ -92,6 +94,13 @@ void bootloaderDrawScreen(BootloaderState st, int opt, const char* str = nullptr
// Once for each file in a filename list on screen
void bootloaderDrawFilename(const char* str, uint8_t line, bool selected);
// get menu item count for main menu, by adding 1 to the baseCount, when a radio specific menu is used
uint32_t bootloaderGetMenuItemCount(int baseCount);
// when a radio specifc menu is used, all events are forwarded to that menu code
// returns true on submenu exit
bool bootloaderRadioMenu(uint32_t menuItem, event_t event);
void blExit();
#endif