You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
637 B
36 lines
637 B
|
|
#include <stdbool.h>
|
|
|
|
#include "./Processer/tjc_screen_receive.h"
|
|
#include "./module/feite_servo/servo_package_process.h"
|
|
#include "usart.h"
|
|
static uint8_t rx_cache;
|
|
|
|
/*
|
|
*
|
|
* @brief 串口中断回调
|
|
*
|
|
*/
|
|
void HAL_UART_RxCpltCallback(UART_HandleTypeDef* huart) {
|
|
if (huart == &huart2) {
|
|
// 接收
|
|
tjc_uart_receive();
|
|
}
|
|
|
|
if (huart == &huart2) {
|
|
// 重启
|
|
HAL_UART_Receive_IT(huart, &rx_cache, 1);
|
|
}
|
|
}
|
|
|
|
//空闲中断处理
|
|
void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size){
|
|
if (huart == &huart3) {
|
|
//get_rx_size(Size);
|
|
SET_IDEL_FLAG();
|
|
}
|
|
|
|
if (huart == &huart3) {
|
|
// 重启
|
|
}
|
|
}
|