feat: 移植从机通信帧协议

This commit is contained in:
bmy
2024-02-25 11:49:10 +08:00
parent 354b41dad8
commit 038098ff2d
20 changed files with 1562 additions and 19 deletions

View File

@@ -34,12 +34,15 @@
********************************************************************************************************************/
#include "zf_common_headfile.h"
#include "by_rt_button.h"
#include "by_imu.h"
#include "jj_blueteeth.h"
#include "by_buzzer.h"
#include "by_rt_button.h"
#include "by_tiny_frame_parse.h"
#include "jj_motion.h"
#include "jj_blueteeth.h"
#include "jj_blueteeth.h"
void NMI_Handler(void) __attribute__((interrupt()));
void HardFault_Handler(void) __attribute__((interrupt()));
@@ -87,7 +90,9 @@ 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);
}
}
@@ -102,10 +107,6 @@ void USART2_IRQHandler(void)
void USART3_IRQHandler(void)
{
if (USART_GetITStatus(USART3, USART_IT_RXNE) != RESET) {
#if DEBUG_UART_USE_INTERRUPT // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> debug <20><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>
debug_interrupr_handler(); // <20><><EFBFBD><EFBFBD> debug <20><><EFBFBD>ڽ<EFBFBD><DABD>մ<EFBFBD><D5B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ݻᱻ debug <20><><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ
#endif // <20><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><DEB8><EFBFBD> DEBUG_UART_INDEX <20><><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD>Ӧ<EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD>ж<EFBFBD>ȥ
USART_ClearITPendingBit(USART3, USART_IT_RXNE);
}
}
void UART4_IRQHandler(void)