mirror of https://github.com/ARMmbed/mbed-os.git
NUVOTON: CAN: Fix filter mask being zero
On mask being zero, it means any match, not exact match. NOTE: This fix only targets CAN (M453/M487), not CAN-FD (M467). NOTE: NUC472 CAN doesn't support filter.pull/15509/head
parent
989a694c5a
commit
c1c9550539
|
@ -314,10 +314,6 @@ int can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t
|
|||
}
|
||||
|
||||
uint32_t numask = mask;
|
||||
if( numask == 0x0000 )
|
||||
{
|
||||
return CAN_SetRxMsg((CAN_T *)NU_MODBASE(obj->can), handle, (uint32_t)format, id);
|
||||
}
|
||||
if( format == CANStandard )
|
||||
{
|
||||
numask = (mask << 18);
|
||||
|
|
|
@ -363,10 +363,6 @@ int can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t
|
|||
}
|
||||
|
||||
uint32_t numask = mask;
|
||||
if( numask == 0x0000 )
|
||||
{
|
||||
return CAN_SetRxMsg((CAN_T *)NU_MODBASE(obj->can), handle, (uint32_t)format, id);
|
||||
}
|
||||
if( format == CANStandard )
|
||||
{
|
||||
numask = (mask << 18);
|
||||
|
|
Loading…
Reference in New Issue