feat: 增加简单串口通信帧发送解析功能
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
/* private includes ----------------------------------------------------------*/
|
||||
/* add user code begin private includes */
|
||||
#include "by_debug.h"
|
||||
#include "by_frame.h"
|
||||
/* add user code end private includes */
|
||||
|
||||
/* private typedef -----------------------------------------------------------*/
|
||||
@@ -68,10 +69,10 @@
|
||||
/* add user code end external variables */
|
||||
|
||||
/**
|
||||
* @brief this function handles nmi exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles nmi exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void NMI_Handler(void)
|
||||
{
|
||||
/* add user code begin NonMaskableInt_IRQ 0 */
|
||||
@@ -84,18 +85,17 @@ void NMI_Handler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles hard fault exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles hard fault exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void HardFault_Handler(void)
|
||||
{
|
||||
/* add user code begin HardFault_IRQ 0 */
|
||||
|
||||
/* add user code end HardFault_IRQ 0 */
|
||||
/* go to infinite loop when hard fault exception occurs */
|
||||
while (1)
|
||||
{
|
||||
while (1) {
|
||||
/* add user code begin W1_HardFault_IRQ 0 */
|
||||
|
||||
/* add user code end W1_HardFault_IRQ 0 */
|
||||
@@ -103,18 +103,17 @@ void HardFault_Handler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles memory manage exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles memory manage exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void MemManage_Handler(void)
|
||||
{
|
||||
/* add user code begin MemoryManagement_IRQ 0 */
|
||||
|
||||
/* add user code end MemoryManagement_IRQ 0 */
|
||||
/* go to infinite loop when memory manage exception occurs */
|
||||
while (1)
|
||||
{
|
||||
while (1) {
|
||||
/* add user code begin W1_MemoryManagement_IRQ 0 */
|
||||
|
||||
/* add user code end W1_MemoryManagement_IRQ 0 */
|
||||
@@ -122,18 +121,17 @@ void MemManage_Handler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles bus fault exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles bus fault exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void BusFault_Handler(void)
|
||||
{
|
||||
/* add user code begin BusFault_IRQ 0 */
|
||||
|
||||
/* add user code end BusFault_IRQ 0 */
|
||||
/* go to infinite loop when bus fault exception occurs */
|
||||
while (1)
|
||||
{
|
||||
while (1) {
|
||||
/* add user code begin W1_BusFault_IRQ 0 */
|
||||
|
||||
/* add user code end W1_BusFault_IRQ 0 */
|
||||
@@ -141,18 +139,17 @@ void BusFault_Handler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles usage fault exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles usage fault exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void UsageFault_Handler(void)
|
||||
{
|
||||
/* add user code begin UsageFault_IRQ 0 */
|
||||
|
||||
/* add user code end UsageFault_IRQ 0 */
|
||||
/* go to infinite loop when usage fault exception occurs */
|
||||
while (1)
|
||||
{
|
||||
while (1) {
|
||||
/* add user code begin W1_UsageFault_IRQ 0 */
|
||||
|
||||
/* add user code end W1_UsageFault_IRQ 0 */
|
||||
@@ -160,10 +157,10 @@ void UsageFault_Handler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles svcall exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles svcall exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void SVC_Handler(void)
|
||||
{
|
||||
/* add user code begin SVCall_IRQ 0 */
|
||||
@@ -175,10 +172,10 @@ void SVC_Handler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles debug monitor exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles debug monitor exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void DebugMon_Handler(void)
|
||||
{
|
||||
/* add user code begin DebugMonitor_IRQ 0 */
|
||||
@@ -190,10 +187,10 @@ void DebugMon_Handler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles pendsv_handler exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles pendsv_handler exception.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void PendSV_Handler(void)
|
||||
{
|
||||
/* add user code begin PendSV_IRQ 0 */
|
||||
@@ -205,10 +202,10 @@ void PendSV_Handler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles USB Low Priority or CAN1 RX0 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles USB Low Priority or CAN1 RX0 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void USBFS_L_CAN1_RX0_IRQHandler(void)
|
||||
{
|
||||
/* add user code begin USBFS_L_CAN1_RX0_IRQ 0 */
|
||||
@@ -225,10 +222,10 @@ void USBFS_L_CAN1_RX0_IRQHandler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles USART1 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles USART1 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void USART1_IRQHandler(void)
|
||||
{
|
||||
/* add user code begin USART1_IRQ 0 */
|
||||
@@ -243,10 +240,10 @@ void USART1_IRQHandler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles USART2 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles USART2 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void USART2_IRQHandler(void)
|
||||
{
|
||||
/* add user code begin USART2_IRQ 0 */
|
||||
@@ -261,10 +258,10 @@ void USART2_IRQHandler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles USART3 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles USART3 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void USART3_IRQHandler(void)
|
||||
{
|
||||
/* add user code begin USART3_IRQ 0 */
|
||||
@@ -279,10 +276,10 @@ void USART3_IRQHandler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles TMR6 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles TMR6 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void TMR6_GLOBAL_IRQHandler(void)
|
||||
{
|
||||
/* add user code begin TMR6_GLOBAL_IRQ 0 */
|
||||
@@ -296,10 +293,10 @@ void TMR6_GLOBAL_IRQHandler(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handles CAN2 RX0 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
* @brief this function handles CAN2 RX0 handler.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
void CAN2_RX0_IRQHandler(void)
|
||||
{
|
||||
/* add user code begin CAN2_RX0_IRQ 0 */
|
||||
|
||||
Reference in New Issue
Block a user