obdevel / ACAN2040

Arduino library wrapper for can2040
GNU General Public License v3.0
9 stars 2 forks source link

CAN mask/filter #3

Closed autoprog closed 6 months ago

autoprog commented 6 months ago

hi, how to, mask and filter.

RX-ID: receiver: 0x701, 0x702, 0x123 or others.

thanks, Carlos.

obdevel commented 6 months ago

Hi - this library is a very thin wrapper around the can2040 project, which doesn't have this functionality. (https://github.com/KevinOConnor/can2040). Your program will have to receive all CAN frames and discard those you don't need.

From: https://github.com/KevinOConnor/can2040/blob/9e761ae353ea473e24c8bba226e10afad8a919ff/docs/API.md?plain=1#L143

The can2040 code does not implement receive message filtering.

It is expected that the caller will implement any desired filtering in their callback function.

autoprog commented 6 months ago

obdevel, thanks, Carlos.