mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 11:37:45 +08:00
增加了LK电机和HT电机的基本支持,待编写控制
This commit is contained in:
@@ -115,7 +115,7 @@ static void CANFIFOxCallback(CAN_HandleTypeDef *_hcan, uint32_t fifox)
|
||||
uint8_t can_rx_buff[8];
|
||||
CAN_RxHeaderTypeDef rxconf;
|
||||
HAL_CAN_GetRxMessage(_hcan, fifox, &rxconf, can_rx_buff);
|
||||
for (size_t i = 0; i < MX_REGISTER_DEVICE_CNT; i++)
|
||||
for (size_t i = 0; i < MX_REGISTER_DEVICE_CNT; ++i)
|
||||
{
|
||||
if (instance[i] != NULL) // 碰到NULL说明已经遍历完所有实例
|
||||
{ // 两者相等说明这是要找的实例
|
||||
|
||||
@@ -70,7 +70,7 @@ void USARTSend(USARTInstance *_instance, uint8_t *send_buf, uint16_t send_size)
|
||||
*/
|
||||
void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
|
||||
{
|
||||
for (uint8_t i = 0; i < 3; i++)
|
||||
for (uint8_t i = 0; i < 3; ++i)
|
||||
{
|
||||
if (huart == instance[i]->usart_handle)
|
||||
{
|
||||
@@ -93,7 +93,7 @@ void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
|
||||
*/
|
||||
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
|
||||
{
|
||||
for (uint8_t i = 0; i < 3; i++)
|
||||
for (uint8_t i = 0; i < 3; ++i)
|
||||
{
|
||||
if (huart == instance[i]->usart_handle)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user