arch/arm/stm32{|f7}/socketcan: fix debugassert for extid frames
fix debugassert for extid frames, we have to remove CAN_EFF_FLAG bit from the expression
This commit is contained in:
parent
d186c1cedb
commit
c1c5d8d611
|
@ -881,7 +881,7 @@ static int stm32can_transmit(struct stm32_can_s *priv)
|
|||
regval &= ~CAN_TIR_EXID_MASK;
|
||||
if (frame->can_id & CAN_EFF_FLAG)
|
||||
{
|
||||
DEBUGASSERT(frame->can_id < (1 << 29));
|
||||
DEBUGASSERT((frame->can_id ^ CAN_EFF_FLAG) < (1 << 29));
|
||||
regval |= (frame->can_id << CAN_TIR_EXID_SHIFT) | CAN_TIR_IDE;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1682,7 +1682,7 @@ static int fdcan_send(struct stm32_fdcan_s *priv)
|
|||
#ifdef CONFIG_NET_CAN_EXTID
|
||||
if ((frame->can_id & CAN_EFF_FLAG) != 0)
|
||||
{
|
||||
DEBUGASSERT(frame->can_id < (1 << 29));
|
||||
DEBUGASSERT((frame->can_id ^ CAN_EFF_FLAG) < (1 << 29));
|
||||
|
||||
txbuffer[0] |= BUFFER_R0_EXTID(frame->can_id) | BUFFER_R0_XTD;
|
||||
}
|
||||
|
|
|
@ -905,7 +905,7 @@ static int stm32can_transmit(struct stm32_can_s *priv)
|
|||
regval &= ~CAN_TIR_EXID_MASK;
|
||||
if (frame->can_id & CAN_EFF_FLAG)
|
||||
{
|
||||
DEBUGASSERT(frame->can_id < (1 << 29));
|
||||
DEBUGASSERT((frame->can_id ^ CAN_EFF_FLAG) < (1 << 29));
|
||||
regval |= (frame->can_id << CAN_TIR_EXID_SHIFT) | CAN_TIR_IDE;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue