This commit is contained in:
Glz
2024-03-08 20:09:47 +08:00
20 changed files with 130 additions and 632 deletions

View File

@@ -34,11 +34,11 @@
********************************************************************************************************************/
#include "zf_common_headfile.h"
#include "by_tiny_frame.h"
#include "by_button.h"
#include "by_buzzer.h"
#include "by_tiny_frame_parse.h"
#include "by_frame.h"
#include "by_led.h"
#include "jj_param.h"
void NMI_Handler(void) __attribute__((interrupt()));
void HardFault_Handler(void) __attribute__((interrupt()));
@@ -94,14 +94,13 @@ void USART2_IRQHandler(void)
{
if (USART_GetITStatus(USART2, USART_IT_RXNE) != RESET) {
uint8_t data_s = 0;
uart_query_byte(UART_2, &data_s);
by_tiny_frame_parse_uart_handle(data_s);
USART_ClearITPendingBit(USART2, USART_IT_RXNE);
}
}
void USART3_IRQHandler(void)
{
if (USART_GetITStatus(USART3, USART_IT_RXNE) != RESET) {
uint8_t data_s = 0;
#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>ȥ
@@ -283,8 +282,9 @@ void EXTI15_10_IRQHandler(void)
void TIM1_UP_IRQHandler(void)
{
if (TIM_GetITStatus(TIM1, TIM_IT_Update) != RESET) {
by_frame_send(2, &tiny_frame_param[0].u32);
TIM_ClearITPendingBit(TIM1, TIM_IT_Update);
by_tiny_frame_parse_timer_handle();
by_led_warn_blink();
}
}