minor improvement
This commit is contained in:
parent
6ca663507c
commit
570c387db1
|
@ -232,9 +232,9 @@
|
|||
|
||||
|
||||
|
||||
#define MajorVer 23U
|
||||
#define MinorVer 11U
|
||||
#define SubMinorVer 18U
|
||||
#define MajorVer 24U
|
||||
#define MinorVer 03U
|
||||
#define SubMinorVer 04U
|
||||
#define FirmwareVersion 3U
|
||||
#define YUNHORN_STS_MAX_NVM_CFG_SIZE 64U
|
||||
#define YUNHORN_STS_AC_CODE_SIZE 20U
|
||||
|
|
|
@ -70,9 +70,11 @@ void MX_DMA_Init(void)
|
|||
// **** I2C2
|
||||
|
||||
// **** USART2
|
||||
#if 0
|
||||
/* DMA1_Channel6_IRQn interrupt configuration */
|
||||
HAL_NVIC_SetPriority(DMA1_Channel6_IRQn, 0, 0);
|
||||
HAL_NVIC_EnableIRQ(DMA1_Channel6_IRQn);
|
||||
#endif
|
||||
/* DMA1_Channel7_IRQn interrupt configuration */
|
||||
HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 0, 0);
|
||||
HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn);
|
||||
|
|
|
@ -76,8 +76,9 @@ extern DMA_HandleTypeDef hdma_i2c2_tx;
|
|||
//extern TIM_HandleTypeDef htim2;
|
||||
//extern TIM_HandleTypeDef htim16;
|
||||
extern DMA_HandleTypeDef hdma_usart2_tx;
|
||||
#if 0
|
||||
extern DMA_HandleTypeDef hdma_usart2_rx;
|
||||
|
||||
#endif
|
||||
|
||||
/* USER CODE BEGIN EV */
|
||||
|
||||
|
@ -328,7 +329,9 @@ void DMA1_Channel6_IRQHandler(void)
|
|||
/* USER CODE BEGIN DMA1_Channel6_IRQn 0 */
|
||||
|
||||
/* USER CODE END DMA1_Channel6_IRQn 0 */
|
||||
#if 0
|
||||
HAL_DMA_IRQHandler(&hdma_usart2_rx);
|
||||
#endif
|
||||
/* USER CODE BEGIN DMA1_Channel6_IRQn 1 */
|
||||
|
||||
/* USER CODE END DMA1_Channel6_IRQn 1 */
|
||||
|
|
|
@ -28,8 +28,9 @@
|
|||
|
||||
UART_HandleTypeDef huart2;
|
||||
DMA_HandleTypeDef hdma_usart2_tx;
|
||||
#if 0
|
||||
DMA_HandleTypeDef hdma_usart2_rx;
|
||||
|
||||
#endif
|
||||
/* USART2 init function */
|
||||
|
||||
void MX_USART2_UART_Init(void)
|
||||
|
@ -135,6 +136,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
|
|||
__HAL_LINKDMA(uartHandle,hdmatx,hdma_usart2_tx);
|
||||
|
||||
/* USART2_RX Init */
|
||||
#if 0
|
||||
hdma_usart2_rx.Instance = DMA1_Channel6;
|
||||
hdma_usart2_rx.Init.Request = DMA_REQUEST_USART2_RX;
|
||||
hdma_usart2_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
|
||||
|
@ -155,7 +157,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
|
|||
}
|
||||
#endif
|
||||
__HAL_LINKDMA(uartHandle,hdmarx,hdma_usart2_rx);
|
||||
|
||||
#endif
|
||||
/* USART2 interrupt Init */
|
||||
HAL_NVIC_SetPriority(USART2_IRQn, 2, 0);
|
||||
HAL_NVIC_EnableIRQ(USART2_IRQn);
|
||||
|
@ -184,7 +186,9 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
|
|||
|
||||
/* USART2 DMA DeInit */
|
||||
HAL_DMA_DeInit(uartHandle->hdmatx);
|
||||
#if 0
|
||||
HAL_DMA_DeInit(uartHandle->hdmarx);
|
||||
#endif
|
||||
/* USART2 interrupt Deinit */
|
||||
HAL_NVIC_DisableIRQ(USART2_IRQn);
|
||||
/* USER CODE BEGIN USART2_MspDeInit 1 */
|
||||
|
|
|
@ -414,7 +414,7 @@ void STS_TOF_VL53L0X_Range_Process(void)
|
|||
sts_tof_distance_data[i] = (RangingMeasurementData.RangeStatus!=0)?STS_MAX_L0_RANGE:VL53L0XDevs[i].LeakyRange;
|
||||
}
|
||||
|
||||
HAL_Delay(5);
|
||||
HAL_Delay(1);
|
||||
} // for i < MAX_TOF_COUNT
|
||||
|
||||
if (sensor_data_ready != 0) {
|
||||
|
|
Loading…
Reference in New Issue