Compare commits

...

9 commits

Author SHA1 Message Date
dherrada
37fa95ea8d Update CI action versions 2023-05-12 11:24:15 -04:00
Dylan Herrada
d0fc78260b
Bump to 1.2.1 2021-06-28 15:32:28 -04:00
Jeff Epler
bb785b8a73
Merge pull request #6 from GreatMindsRobotics/fix/CANSAME5x-missing-return-values
Added missing return values to CANSAME5x::filter and filterExtended
2021-06-27 11:47:43 -05:00
CoolBots
3b6f0df0f2 Added missing return value to CANSAME5x::filter and CANSAME5x::filterExtended 2021-05-31 20:49:28 -07:00
Ha Thach
ae2de54c48
increase version to 1.2.0 2021-05-10 22:06:11 +07:00
Limor "Ladyada" Fried
67724d3a39
Merge pull request #5 from adafruit/fix-missing-same5x-header
remove same51.h include
2021-05-10 09:50:35 -04:00
hathach
febf865737 remove same51.h include 2021-05-10 18:15:40 +07:00
Dylan Herrada
9eb6a00bd8
Bump to 1.1.0 2021-02-12 16:08:23 -05:00
Limor "Ladyada" Fried
5b52a14bc7
Merge pull request #2 from adafruit/same51
Add automatic bus recovery for SAM E5x
2021-02-11 15:51:59 -05:00
3 changed files with 9 additions and 7 deletions

View file

@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: adafruit/ci-arduino
path: ci

View file

@ -1,5 +1,5 @@
name=CAN Adafruit Fork
version=1.0.2
version=1.2.1
author=Sandeep Mistry <sandeep.mistry@gmail.com>
maintainer=adafruit <info@adafruit.com>
sentence=An Arduino library for sending and receiving data using CAN bus.

View file

@ -9,8 +9,6 @@
#include "CANSAME5x.h"
#include "wiring_private.h"
#include "same51.h"
#define DEBUG_CAN (0)
#if DEBUG_CAN
#define DEBUG_PRINT(...) (Serial.print(__VA_ARGS__), ((void)0))
@ -458,6 +456,8 @@ int CANSAME5x::filter(int id, int mask) {
state->extended_rx_filter[0].XIDFE_0.bit.EFEC = CAN_XIDFE_0_EFEC_REJECT_Val;
state->extended_rx_filter[0].XIDFE_1.bit.EFID2 = 0; // mask
state->extended_rx_filter[0].XIDFE_1.bit.EFT = CAN_XIDFE_1_EFT_CLASSIC_Val;
return 1;
}
int CANSAME5x::filterExtended(long id, long mask) {
@ -467,11 +467,13 @@ int CANSAME5x::filterExtended(long id, long mask) {
state->standard_rx_filter[0].SIDFE_0.bit.SFEC = CAN_SIDFE_0_SFEC_REJECT_Val;
state->standard_rx_filter[0].SIDFE_0.bit.SFT = CAN_SIDFE_0_SFT_CLASSIC_Val;
// reject all extended messages
// accept matching extended messages
state->extended_rx_filter[0].XIDFE_0.bit.EFID1 = id;
state->extended_rx_filter[0].XIDFE_0.bit.EFEC = CAN_XIDFE_0_EFEC_STF0M_Val;
state->extended_rx_filter[0].XIDFE_1.bit.EFID2 = mask;
state->extended_rx_filter[0].XIDFE_1.bit.EFT = CAN_XIDFE_1_EFT_CLASSIC_Val;
return 1;
}
int CANSAME5x::observe() {