mirror of
https://github.com/apache/nuttx.git
synced 2026-10-12 00:30:23 +00:00
stm32/socketcan: fix the EFF flag for received frames
This commit is contained in:
parent
4ea0c905e6
commit
f1277a2233
2 changed files with 2 additions and 4 deletions
|
|
@ -1207,12 +1207,11 @@ static int stm32can_rxinterrupt_work(struct stm32_can_s *priv, int rxmb)
|
|||
if ((regval & CAN_RIR_IDE) != 0)
|
||||
{
|
||||
frame->can_id = (regval & CAN_RIR_EXID_MASK) >> CAN_RIR_EXID_SHIFT;
|
||||
frame->can_id &= ~CAN_EFF_FLAG;
|
||||
frame->can_id |= CAN_EFF_FLAG;
|
||||
}
|
||||
else
|
||||
{
|
||||
frame->can_id = (regval & CAN_RIR_STID_MASK) >> CAN_RIR_STID_SHIFT;
|
||||
frame->can_id |= CAN_EFF_FLAG;
|
||||
}
|
||||
#else
|
||||
if ((regval & CAN_RIR_IDE) != 0)
|
||||
|
|
|
|||
|
|
@ -1231,12 +1231,11 @@ static int stm32can_rxinterrupt_work(struct stm32_can_s *priv, int rxmb)
|
|||
if ((regval & CAN_RIR_IDE) != 0)
|
||||
{
|
||||
frame->can_id = (regval & CAN_RIR_EXID_MASK) >> CAN_RIR_EXID_SHIFT;
|
||||
frame->can_id &= ~CAN_EFF_FLAG;
|
||||
frame->can_id |= CAN_EFF_FLAG;
|
||||
}
|
||||
else
|
||||
{
|
||||
frame->can_id = (regval & CAN_RIR_STID_MASK) >> CAN_RIR_STID_SHIFT;
|
||||
frame->can_id |= CAN_EFF_FLAG;
|
||||
}
|
||||
#else
|
||||
if ((regval & CAN_RIR_IDE) != 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue