feat: 添加蓝牙通信

This commit is contained in:
2024-01-07 16:58:53 +08:00
parent 6bb5b9eaad
commit e93eb8127b
4 changed files with 65 additions and 6 deletions

View File

@@ -36,7 +36,7 @@
#include "zf_common_headfile.h"
#include "by_rt_button.h"
#include "by_imu.h"
#include "jj_blueteeth.h"
void NMI_Handler(void) __attribute__((interrupt()));
void HardFault_Handler(void) __attribute__((interrupt()));
@@ -90,7 +90,8 @@ void USART1_IRQHandler(void)
void USART2_IRQHandler(void)
{
if (USART_GetITStatus(USART2, USART_IT_RXNE) != RESET) {
uart_query_byte(UART_2,&bt_buffer);
bt_rx_flag=true;
USART_ClearITPendingBit(USART2, USART_IT_RXNE);
}
}