refactor: bootloader & cmake cleanup (#5232)

This commit is contained in:
Raphael Coeffic
2024-07-07 21:06:59 +10:00
committed by GitHub
parent 848d7942bf
commit d575242c0f
35 changed files with 483 additions and 547 deletions
+12 -2
View File
@@ -19,6 +19,10 @@
* GNU General Public License for more details.
*/
#include "stm32_hal.h"
#include "stm32_hal_ll.h"
#include "stm32_gpio_driver.h"
#include "lcd_st7796s_driver.h"
#include "board.h"
@@ -28,8 +32,6 @@
#include "hal.h"
#include "lcd.h"
#include "opentx_types.h"
#include "stm32_hal.h"
#include "stm32_hal_ll.h"
static LTDC_HandleTypeDef hltdc;
static void* initialFrameBuffer = nullptr;
@@ -70,6 +72,10 @@ static void LCD_AF_GPIOConfig(void)
| | LCD_G4 <-> PJ.11 | LCD_DE <-> PK.07
| | LCD_B3 <-> PJ.15 |
*/
stm32_gpio_enable_clock(GPIOG);
stm32_gpio_enable_clock(GPIOI);
stm32_gpio_enable_clock(GPIOJ);
stm32_gpio_enable_clock(GPIOK);
LL_GPIO_InitTypeDef GPIO_InitStructure;
LL_GPIO_StructInit(&GPIO_InitStructure);
@@ -102,6 +108,9 @@ static void LCD_AF_GPIOConfig(void)
static void lcdSpiConfig(void)
{
stm32_gpio_enable_clock(LCD_SPI_GPIO);
stm32_gpio_enable_clock(LCD_NRST_GPIO);
LL_GPIO_InitTypeDef GPIO_InitStructure;
LL_GPIO_StructInit(&GPIO_InitStructure);
@@ -320,6 +329,7 @@ void LCD_ST7796S_Off(void) { lcdWriteCommand(0x28); }
void LCD_Init_LTDC()
{
__HAL_RCC_LTDC_CLK_ENABLE();
hltdc.Instance = LTDC;
/* Configure PLLSAI prescalers for LCD */