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
Chun-Chieh Li 2024-04-18 13:29:24 +08:00
parent 989a694c5a
commit c1c9550539
2 changed files with 0 additions and 8 deletions

View File

@ -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);

View File

@ -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);