chores(pl18/nv14): Clean up cmake and boot menu (#4475)
This commit is contained in:
@@ -104,33 +104,8 @@ file(GLOB THEMES_SRC RELATIVE ${RADIO_SRC_DIR}/gui/colorlcd ${RADIO_SRC_DIR}/gui
|
||||
file(GLOB LAYOUTS_SRC RELATIVE ${RADIO_SRC_DIR}/gui/colorlcd ${RADIO_SRC_DIR}/gui/colorlcd/layouts/*.cpp)
|
||||
file(GLOB WIDGETS_SRC RELATIVE ${RADIO_SRC_DIR}/gui/colorlcd ${RADIO_SRC_DIR}/gui/colorlcd/widgets/*.cpp)
|
||||
|
||||
set(SRC
|
||||
${SRC}
|
||||
io/frsky_firmware_update.cpp
|
||||
)
|
||||
|
||||
set(GVAR_SCREEN model_gvars.cpp)
|
||||
|
||||
if(BOOTLOADER)
|
||||
set(FIRMWARE_TARGET_SRC
|
||||
${FIRMWARE_TARGET_SRC}
|
||||
../common/arm/loadboot.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set(SRC
|
||||
${SRC}
|
||||
io/frsky_firmware_update.cpp
|
||||
io/multi_firmware_update.cpp
|
||||
)
|
||||
|
||||
if (MULTIMODULE)
|
||||
add_definitions(-DMULTI_PROTOLIST)
|
||||
set(SRC ${SRC}
|
||||
io/multi_protolist.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set(FIRMWARE_TARGET_SRC
|
||||
${FIRMWARE_TARGET_SRC}
|
||||
${LCD_DRIVER}
|
||||
@@ -154,6 +129,25 @@ set(FIRMWARE_SRC
|
||||
drivers/frftl.cpp
|
||||
)
|
||||
|
||||
if(BOOTLOADER)
|
||||
set(FIRMWARE_SRC
|
||||
${FIRMWARE_SRC}
|
||||
targets/common/arm/loadboot.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set(SRC ${SRC}
|
||||
io/frsky_firmware_update.cpp
|
||||
io/multi_firmware_update.cpp
|
||||
)
|
||||
|
||||
if (MULTIMODULE)
|
||||
add_definitions(-DMULTI_PROTOLIST)
|
||||
set(SRC ${SRC}
|
||||
io/multi_protolist.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
# Make malloc() thread-safe
|
||||
add_definitions(-DTHREADSAFE_MALLOC)
|
||||
|
||||
@@ -162,6 +156,5 @@ set(STM32LIB_SRC
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_fmc.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_ltdc.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma2d.c
|
||||
)
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ void delay_self(int count)
|
||||
TELEMETRY_RCC_AHB1Periph |\
|
||||
TRAINER_RCC_AHB1Periph |\
|
||||
HAPTIC_RCC_AHB1Periph |\
|
||||
INTMODULE_RCC_AHB1Periph |\
|
||||
EXTMODULE_RCC_AHB1Periph \
|
||||
)
|
||||
#define RCC_AHB3PeriphMinimum (SDRAM_RCC_AHB3Periph)
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
#include "translations.h"
|
||||
|
||||
#include "../../common/arm/stm32/bootloader/boot.h"
|
||||
#include "../../common/arm/stm32/bootloader/bin_files.h"
|
||||
#include "targets/common/arm/stm32/bootloader/boot.h"
|
||||
#include "targets/common/arm/stm32/bootloader/bin_files.h"
|
||||
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
@@ -56,8 +56,6 @@ extern BitmapBuffer * lcd;
|
||||
void bootloaderInitScreen()
|
||||
{
|
||||
lcdInitDisplayDriver();
|
||||
backlightInit();
|
||||
backlightEnable(100);
|
||||
setHatsAsKeys(true);
|
||||
}
|
||||
|
||||
@@ -79,9 +77,15 @@ static void bootloaderDrawBackground()
|
||||
|
||||
void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)
|
||||
{
|
||||
static bool _first_screen = true;
|
||||
lcdInitDirectDrawing();
|
||||
bootloaderDrawBackground();
|
||||
|
||||
if (!_first_screen) {
|
||||
// ... and turn backlight ON
|
||||
backlightEnable(BACKLIGHT_LEVEL_MAX);
|
||||
}
|
||||
|
||||
int center = LCD_W/2;
|
||||
if (st == ST_START) {
|
||||
|
||||
@@ -231,6 +235,7 @@ void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)
|
||||
LV_SYMBOL_NEW_LINE TR_BL_EXIT_KEY, BL_FOREGROUND);
|
||||
}
|
||||
}
|
||||
_first_screen = false;
|
||||
}
|
||||
|
||||
void bootloaderDrawFilename(const char* str, uint8_t line, bool selected)
|
||||
|
||||
@@ -592,6 +592,8 @@
|
||||
#define INTMODULE_TIMER_IRQn TIM3_IRQn
|
||||
#define INTMODULE_TIMER_IRQHandler TIM3_IRQHandler
|
||||
#define INTMODULE_TIMER_FREQ (PERI1_FREQUENCY * TIMER_MULT_APB1)
|
||||
#else
|
||||
#define INTMODULE_RCC_AHB1Periph 0
|
||||
#endif
|
||||
|
||||
// External Module
|
||||
|
||||
Reference in New Issue
Block a user