pierremolinaro / acan-t4

CAN / CANFD Arduino Library for Teensy 4.0
MIT License
17 stars 4 forks source link

improvement #7

Open nicolasdetracy opened 1 year ago

nicolasdetracy commented 1 year ago

Hi Pierre!

I saw that you don't have a function in the FlexCAN_T4 library to clear the canbus RX buffer and needed one.

A way I like to do it is like this:

void clearRxBuffer(){ while (canbus.read(rxmsg)){} }

Maybe more people will appreciate this new function!

Kind Regards, Nicolas de Tracy