feat: 增加上下位机通信接口 (底盘速度和位置控制)

This commit is contained in:
bmy
2024-04-24 23:22:21 +08:00
parent 7123fb2f25
commit 1c3131e9c7
14 changed files with 560 additions and 294 deletions

View File

@@ -31,6 +31,7 @@
/* add user code begin private includes */
#include "by_debug.h"
#include "by_frame.h"
#include "by_motion.h"
/* add user code end private includes */
/* private typedef -----------------------------------------------------------*/
@@ -266,6 +267,7 @@ void USART3_IRQHandler(void)
{
/* add user code begin USART3_IRQ 0 */
if (SET == usart_flag_get(USART3, USART_RDBF_FLAG)) {
by_frame_parse_uart_handle((uint8_t)usart_data_receive(USART3));
// usart_data_transmit(USART1, usart_data_receive(USART3));
usart_flag_clear(USART3, USART_RDBF_FLAG);
}
@@ -284,6 +286,7 @@ void TMR6_GLOBAL_IRQHandler(void)
{
/* add user code begin TMR6_GLOBAL_IRQ 0 */
if (SET == tmr_flag_get(TMR6, TMR_OVF_FLAG)) {
by_motion_timer_handle();
tmr_flag_clear(TMR6, TMR_OVF_FLAG);
}
/* add user code end TMR6_GLOBAL_IRQ 0 */