mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 03:27:45 +08:00
修复CAN中断优先级导致函数重入访问static变量的问题,提升了bsp和部分module的性能。
This commit is contained in:
@@ -13,8 +13,8 @@ static SuperCapInstance *super_cap_instance = NULL; // 可以由app保存此指
|
||||
|
||||
static void SuperCapRxCallback(CANInstance *_instance)
|
||||
{
|
||||
static uint8_t *rxbuff;
|
||||
static SuperCap_Msg_s *Msg;
|
||||
uint8_t *rxbuff;
|
||||
SuperCap_Msg_s *Msg;
|
||||
rxbuff = _instance->rx_buff;
|
||||
Msg = &super_cap_instance->cap_msg;
|
||||
Msg->vol = (uint16_t)(rxbuff[0] << 8 | rxbuff[1]);
|
||||
|
||||
Reference in New Issue
Block a user