From 7610be9ba6d90a7b74e6a3209ff8de5d2cf77ca9 Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Wed, 9 Aug 2023 18:04:27 +0800 Subject: [PATCH] remove unused code --- Core/Inc/main.h | 80 +++++++++++----------------- STM32CubeIDE/STS-TMG Release.launch | 82 ----------------------------- 2 files changed, 32 insertions(+), 130 deletions(-) delete mode 100644 STM32CubeIDE/STS-TMG Release.launch diff --git a/Core/Inc/main.h b/Core/Inc/main.h index 7820023..714baed 100644 --- a/Core/Inc/main.h +++ b/Core/Inc/main.h @@ -89,64 +89,48 @@ void Error_Handler(void); /* USER CODE BEGIN Private defines */ #define VOLTAGE_DETECT_Pin GPIO_PIN_15 #define VOLTAGE_DETECT_GPIO_Port GPIOA + #if 0 -//SPI1 ST7789 -#define LCD_RES_Pin GPIO_PIN_3 //ST7789, Pin-5 -#define LCD_RES_GPIO_Port GPIOB - -#define LCD_BLK_Pin GPIO_PIN_8 //ST7789, Pin-8 -#define LCD_BLK_GPIO_Port GPIOB - -#define LCD_CS_Pin GPIO_PIN_10 //ST7789, Pin-7 +//GPIO CONTROL FOR ST7789 +#define LCD_RST_Pin GPIO_PIN_3 +#define LCD_RST_GPIO_Port GPIOB +#define LCD_BL_Pin GPIO_PIN_8 +#define LCD_BL_GPIO_Port GPIOB +#define LCD_CS_Pin GPIO_PIN_10 #define LCD_CS_GPIO_Port GPIOB - -#define LCD_DC_Pin GPIO_PIN_5 //ST7789, Pin-6 +#define LCD_DC_Pin GPIO_PIN_5 #define LCD_DC_GPIO_Port GPIOB - -#define LCD_TE_Pin GPIO_PIN_13 -#define LCD_TE_GPIO_Port GPIOB #endif + +#define LED_Pin GPIO_PIN_8 +#define LED_GPIO_Port GPIOA + +/* FOR FLASH CHIP */ +#define W25Q_CS_Pin GPIO_PIN_9 +#define W25Q_CS_GPIO_Port GPIOA + +/* FOR LCD ST7789 SPI MOSI CONTROL */ +#if defined(USE_IPS_LCD_ST7789) +#define MEMS_SPI_SCK_Pin GPIO_PIN_3 +#define MEMS_SPI_SCK_GPIO_Port GPIOB +#define MEMS_SPI_MOSI_Pin GPIO_PIN_5 +#define MEMS_SPI_MOSI_GPIO_Port GPIOB + +#define LCD_RST_Pin GPIO_PIN_4 +#define LCD_RST_GPIO_Port GPIOA +#define LCD_DC_Pin GPIO_PIN_5 +#define LCD_DC_GPIO_Port GPIOA +#define LCD_CS_Pin GPIO_PIN_6 +#define LCD_CS_GPIO_Port GPIOA +#define LCD_BL_Pin GPIO_PIN_7 +#define LCD_BL_GPIO_Port GPIOA + #define KEY1_Pin GPIO_PIN_0 #define KEY1_GPIO_Port GPIOA #define KEY2_Pin GPIO_PIN_1 #define KEY2_GPIO_Port GPIOA -#define LED_Pin GPIO_PIN_8 -#define LED_GPIO_Port GPIOA - -#define W25Q_CS_Pin GPIO_PIN_9 -#define W25Q_CS_GPIO_Port GPIOA - -#if defined(USE_IPS_LCD_ST7789) - -#define MEMS_SPI_SCK_Pin GPIO_PIN_3 -#define MEMS_SPI_SCK_GPIO_Port GPIOB -#define MEMS_SPI_MOSI_Pin GPIO_PIN_5 -#define MEMS_SPI_MOSI_GPIO_Port GPIOB - - -#define LCD_RST_Pin GPIO_PIN_4 -#define LCD_RST_GPIO_Port GPIOA -#define LCD_DC_Pin GPIO_PIN_5 -#define LCD_DC_GPIO_Port GPIOA -#define LCD_CS_Pin GPIO_PIN_6 -#define LCD_CS_GPIO_Port GPIOA -#define LCD_BL_Pin GPIO_PIN_7 -#define LCD_BL_GPIO_Port GPIOA -#endif - -/**I2C1 GPIO Configuration for STM32WL55xx -PB6 ------> I2C1_SCL -PB7 ------> I2C1_SDA -*/ - -#if defined(STM32WL55xx) -#define MEMS_ENABLE_Pin GPIO_PIN_5 -#define MEMS_ENABLE_GPIO_Port GPIOB -#define MEMS_SENSOR_INTERRUPT_Pin GPIO_PIN_8 -#define MEMS_SENSOR_INTERRUPT_GPIO_Port GPIOA -#define MEMS_SENSOR_INTERRUPT_EXTI_IRQn EXTI9_5_IRQn #endif /**I2C2 GPIO Configuration STM32WLE5xx diff --git a/STM32CubeIDE/STS-TMG Release.launch b/STM32CubeIDE/STS-TMG Release.launch deleted file mode 100644 index 69f350b..0000000 --- a/STM32CubeIDE/STS-TMG Release.launch +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -