feat: 完成通信配置

This commit is contained in:
bmy
2024-03-02 16:00:29 +08:00
parent 038098ff2d
commit c03d2ddc74
4 changed files with 195 additions and 16 deletions

View File

@@ -90,9 +90,7 @@ void EXTI15_10_IRQHandler(void) __attribute__((interrupt()));
void USART1_IRQHandler(void)
{
if (USART_GetITStatus(USART1, USART_IT_RXNE) != RESET) {
uint8_t data_s = 0;
uart_query_byte(UART_1, &data_s);
by_tiny_frame_parse_uart_handle(data_s);
USART_ClearITPendingBit(USART1, USART_IT_RXNE);
}
}
@@ -107,12 +105,15 @@ void USART2_IRQHandler(void)
void USART3_IRQHandler(void)
{
if (USART_GetITStatus(USART3, USART_IT_RXNE) != RESET) {
USART_ClearITPendingBit(USART3, USART_IT_RXNE);
}
}
void UART4_IRQHandler(void)
{
if (USART_GetITStatus(UART4, USART_IT_RXNE) != RESET) {
uint8_t data_s = 0;
uart_query_byte(UART_4, &data_s);
by_tiny_frame_parse_uart_handle(data_s);
USART_ClearITPendingBit(UART4, USART_IT_RXNE);
}
}