remove unused code
This commit is contained in:
parent
9d7bc4f0c0
commit
67a78520c6
|
@ -89,19 +89,6 @@ void Error_Handler(void);
|
||||||
/* USER CODE BEGIN Private defines */
|
/* USER CODE BEGIN Private defines */
|
||||||
#define VOLTAGE_DETECT_Pin GPIO_PIN_15
|
#define VOLTAGE_DETECT_Pin GPIO_PIN_15
|
||||||
#define VOLTAGE_DETECT_GPIO_Port GPIOA
|
#define VOLTAGE_DETECT_GPIO_Port GPIOA
|
||||||
/*
|
|
||||||
#if 0
|
|
||||||
//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
|
|
||||||
#define LCD_DC_GPIO_Port GPIOB
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define LED_Pin GPIO_PIN_8
|
#define LED_Pin GPIO_PIN_8
|
||||||
#define LED_GPIO_Port GPIOA
|
#define LED_GPIO_Port GPIOA
|
||||||
|
@ -111,8 +98,8 @@ void Error_Handler(void);
|
||||||
|
|
||||||
/* FOR LCD ST7789 SPI MOSI CONTROL */
|
/* FOR LCD ST7789 SPI MOSI CONTROL */
|
||||||
#if defined(USE_IPS_LCD_ST7789)
|
#if defined(USE_IPS_LCD_ST7789)
|
||||||
/*
|
/* works well, FOR NUCLEO WL55JC1/2
|
||||||
#if defined(STM32WL55xx) // FOR NUCLEO WL55JC1/2
|
#if defined(STM32WL55xx)
|
||||||
#define MEMS_SPI_SCK_Pin GPIO_PIN_3
|
#define MEMS_SPI_SCK_Pin GPIO_PIN_3
|
||||||
#define MEMS_SPI_SCK_GPIO_Port GPIOB
|
#define MEMS_SPI_SCK_GPIO_Port GPIOB
|
||||||
#define MEMS_SPI_MOSI_Pin GPIO_PIN_5
|
#define MEMS_SPI_MOSI_Pin GPIO_PIN_5
|
||||||
|
@ -129,7 +116,7 @@ void Error_Handler(void);
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#if defined(STM32WLE5xx) // for STS_IOT_CORE
|
#if defined(STM32WLE5xx) || defined(STM32WL55xx) // ******************* STS_IOT_CORE & NUCLEO WL55JC1/2
|
||||||
#define MEMS_SPI_SCK_Pin GPIO_PIN_5
|
#define MEMS_SPI_SCK_Pin GPIO_PIN_5
|
||||||
#define MEMS_SPI_SCK_GPIO_Port GPIOA
|
#define MEMS_SPI_SCK_GPIO_Port GPIOA
|
||||||
#define MEMS_SPI_MOSI_Pin GPIO_PIN_7
|
#define MEMS_SPI_MOSI_Pin GPIO_PIN_7
|
||||||
|
@ -143,8 +130,7 @@ void Error_Handler(void);
|
||||||
#define LCD_CS_GPIO_Port GPIOB
|
#define LCD_CS_GPIO_Port GPIOB
|
||||||
#define LCD_BL_Pin GPIO_PIN_5
|
#define LCD_BL_Pin GPIO_PIN_5
|
||||||
#define LCD_BL_GPIO_Port GPIOB
|
#define LCD_BL_GPIO_Port GPIOB
|
||||||
|
#endif // ******************* for STS_IOT_CORE & NUCLEO WL55JC1/2
|
||||||
//#endif
|
|
||||||
|
|
||||||
#define KEY1_Pin GPIO_PIN_0
|
#define KEY1_Pin GPIO_PIN_0
|
||||||
#define KEY1_GPIO_Port GPIOA
|
#define KEY1_GPIO_Port GPIOA
|
||||||
|
@ -153,10 +139,6 @@ void Error_Handler(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**I2C2 GPIO Configuration STM32WLE5xx
|
|
||||||
PA12 ------> I2C2_SCL
|
|
||||||
PA11 ------> I2C2_SDA
|
|
||||||
*/
|
|
||||||
#if defined(STM32WLE5xx)|| defined(STM32WL55xx)
|
#if defined(STM32WLE5xx)|| defined(STM32WL55xx)
|
||||||
extern I2C_HandleTypeDef hi2c2;
|
extern I2C_HandleTypeDef hi2c2;
|
||||||
#define MEMS_I2C_HANDLE hi2c2
|
#define MEMS_I2C_HANDLE hi2c2
|
||||||
|
|
|
@ -49,12 +49,9 @@ void MX_SPI_Init(void)
|
||||||
hspi1.Init.CLKPolarity = SPI_POLARITY_HIGH;
|
hspi1.Init.CLKPolarity = SPI_POLARITY_HIGH;
|
||||||
hspi1.Init.CLKPhase = SPI_PHASE_2EDGE;
|
hspi1.Init.CLKPhase = SPI_PHASE_2EDGE;
|
||||||
hspi1.Init.NSS = SPI_NSS_SOFT;
|
hspi1.Init.NSS = SPI_NSS_SOFT;
|
||||||
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; //SPI_BAUDRATEPRESCALER_64;
|
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
|
||||||
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
|
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
|
||||||
//hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
|
|
||||||
//hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
|
|
||||||
hspi1.Init.CRCPolynomial = 7;
|
hspi1.Init.CRCPolynomial = 7;
|
||||||
//hspi1.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE;
|
|
||||||
hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
|
hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
|
||||||
if (HAL_SPI_Init(&hspi1) != HAL_OK)
|
if (HAL_SPI_Init(&hspi1) != HAL_OK)
|
||||||
{
|
{
|
||||||
|
@ -80,19 +77,13 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle)
|
||||||
|
|
||||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
/**SPI1 GPIO Configuration old
|
|
||||||
PA12 ------> SPI1_MOSI
|
|
||||||
PA15 ------> SPI1_NSS
|
|
||||||
PA11 ------> SPI1_MISO
|
|
||||||
PB3 ------> SPI1_SCK
|
|
||||||
*/
|
|
||||||
/** SPI1 GPIO Configuration WL55JC1-ACTIVE
|
/** SPI1 GPIO Configuration WL55JC1-ACTIVE
|
||||||
* PA4 SPI1_NSS
|
* PA4 SPI1_NSS
|
||||||
* PA5 SPI1_SCK
|
* PA5 SPI1_SCK
|
||||||
* PA6 SPI1_MISO
|
* PA6 SPI1_MISO
|
||||||
* PA7 SPI1_MOSI
|
* PA7 SPI1_MOSI
|
||||||
*/
|
*/
|
||||||
GPIO_InitStruct.Pin = MEMS_SPI_MOSI_Pin; //MEMS_SPI_MOSI_Pin|MEMS_CS_N_Pin|MEMS_SPI_MISO_Pin;
|
GPIO_InitStruct.Pin = MEMS_SPI_MOSI_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#define FPS32HZ 0x06
|
#define FPS32HZ 0x06
|
||||||
|
|
||||||
#define MLX90640_ADDR 0x33
|
#define MLX90640_ADDR 0x33
|
||||||
#define RefreshRate FPS4HZ
|
#define RefreshRate FPS2HZ
|
||||||
#define EMMISIVITY 0.95f
|
#define EMMISIVITY 0.95f
|
||||||
#define TA_SHIFT 8 //Default shift for MLX90640 in open air
|
#define TA_SHIFT 8 //Default shift for MLX90640 in open air
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#define FPS32HZ 0x06
|
#define FPS32HZ 0x06
|
||||||
|
|
||||||
#define MLX90640_ADDR 0x33
|
#define MLX90640_ADDR 0x33
|
||||||
#define RefreshRate FPS8HZ
|
#define RefreshRate FPS2HZ
|
||||||
#define TA_SHIFT 8 //Default shift for MLX90640 in open air
|
#define TA_SHIFT 8 //Default shift for MLX90640 in open air
|
||||||
|
|
||||||
static uint16_t eeMLX90640[832];
|
static uint16_t eeMLX90640[832];
|
||||||
|
|
Loading…
Reference in New Issue