|
@@ -101,7 +101,7 @@ inline void uart_send(uint8_t *data, int n)
|
|
|
#if USE_USART_DMA_TX == 1
|
|
#if USE_USART_DMA_TX == 1
|
|
|
HAL_UART_Transmit_DMA(&huart1, data, n);
|
|
HAL_UART_Transmit_DMA(&huart1, data, n);
|
|
|
#else
|
|
#else
|
|
|
- HAL_UART_Transmit(&huart2, data, n, 10);
|
|
|
|
|
|
|
+ HAL_UART_Transmit(&huart1, data, n, 10);
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -162,7 +162,6 @@ static inline uint8_t loop_callback(nBusStateCallbackType_t state_check) {
|
|
|
|
|
|
|
|
// Application callbacks
|
|
// Application callbacks
|
|
|
void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size){
|
|
void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size){
|
|
|
-
|
|
|
|
|
HAL_UARTEx_ReceiveToIdle_DMA(huart, data, 64);
|
|
HAL_UARTEx_ReceiveToIdle_DMA(huart, data, 64);
|
|
|
uint8_t copy_offset = 0;
|
|
uint8_t copy_offset = 0;
|
|
|
if (dataL == 0) {
|
|
if (dataL == 0) {
|
|
@@ -189,7 +188,6 @@ void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size){
|
|
|
data[0]=0;
|
|
data[0]=0;
|
|
|
uart_timeout = MAX_SYSTICK;
|
|
uart_timeout = MAX_SYSTICK;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
|
|
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
|