Skip to content

Commit 3ecdf0d

Browse files
committed
fix: Fix compilation errors on some boards
1 parent 1a93c67 commit 3ecdf0d

File tree

3 files changed

+12
-37
lines changed

3 files changed

+12
-37
lines changed

Diff for: .github/workflows/run-cl-arduino.yml

+3-37
Original file line numberDiff line numberDiff line change
@@ -27,48 +27,14 @@ jobs:
2727
- name: Create a depend.list file
2828
run: |
2929
# eg: echo "<repo>" >> depend.list
30-
echo "TheNitek/NDEF" >> depend.list
31-
echo "miguelbalboa/rfid" >> depend.list
32-
30+
echo "OSSLibraries/Arduino_MFRC522v2" >> depend.list
31+
echo "don/NDEF" >> depend.list
32+
3333
3434
- name: Create a ignore.list file
3535
run: |
3636
# eg: echo "<path>,<fqbn>" >> ignore.list
37-
echo "FeliCa_card_detection,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list
38-
echo "FeliCa_card_read,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list
39-
echo "p2p_raw,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list
40-
echo "p2p_with_ndef_library,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list
41-
42-
echo "FeliCa_card_detection,rp2040:rp2040:seeed_xiao_rp2040" >> ignore.list
43-
echo "FeliCa_card_read,rp2040:rp2040:seeed_xiao_rp2040" >> ignore.list
44-
echo "emulate_tag_ndef,rp2040:rp2040:seeed_xiao_rp2040" >> ignore.list
45-
echo "ntag21x_protect,rp2040:rp2040:seeed_xiao_rp2040" >> ignore.list
46-
echo "ntag21x_rw,rp2040:rp2040:seeed_xiao_rp2040" >> ignore.list
47-
echo "p2p_raw,rp2040:rp2040:seeed_xiao_rp2040" >> ignore.list
48-
echo "p2p_with_ndef_library,rp2040:rp2040:seeed_xiao_rp2040" >> ignore.list
49-
50-
echo "FeliCa_card_detection,rp2040:rp2040:seeed_xiao_rp2350" >> ignore.list
51-
echo "FeliCa_card_read,rp2040:rp2040:seeed_xiao_rp2350" >> ignore.list
52-
echo "emulate_tag_ndef,rp2040:rp2040:seeed_xiao_rp2350" >> ignore.list
53-
echo "ntag21x_protect,rp2040:rp2040:seeed_xiao_rp2350" >> ignore.list
54-
echo "ntag21x_rw,rp2040:rp2040:seeed_xiao_rp2350" >> ignore.list
55-
echo "p2p_raw,rp2040:rp2040:seeed_xiao_rp2350" >> ignore.list
56-
echo "p2p_with_ndef_library,rp2040:rp2040:seeed_xiao_rp2350" >> ignore.list
57-
58-
echo "emulate_tag_ndef,esp32:esp32:XIAO_ESP32C3" >> ignore.list
59-
echo "ntag21x_protect,esp32:esp32:XIAO_ESP32C3" >> ignore.list
60-
echo "ntag21x_rw,esp32:esp32:XIAO_ESP32C3" >> ignore.list
61-
echo "p2p_with_ndef_library,esp32:esp32:XIAO_ESP32C3" >> ignore.list
62-
63-
echo "emulate_tag_ndef,esp32:esp32:XIAO_ESP32C6" >> ignore.list
64-
echo "ntag21x_protect,esp32:esp32:XIAO_ESP32C6seeed_xiao_rp2350" >> ignore.list
65-
echo "ntag21x_rw,esp32:esp32:XIAO_ESP32C6" >> ignore.list
66-
echo "p2p_with_ndef_library,esp32:esp32:XIAO_ESP32C6" >> ignore.list
6737
68-
echo "emulate_tag_ndef,esp32:esp32:XIAO_ESP32S3" >> ignore.list
69-
echo "ntag21x_protect,esp32:esp32:XIAO_ESP32S33" >> ignore.list
70-
echo "ntag21x_rw,esp32:esp32:XIAO_ESP32S3" >> ignore.list
71-
echo "p2p_with_ndef_library,esp32:esp32:XIAO_ESP32S3" >> ignore.list
7238
7339
7440
- name: Build sketch

Diff for: examples/emulate_tag_ndef/emulate_tag_ndef.ino

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#include "emulatetag.h"
22
#include "NdefMessage.h"
33

4+
#ifdef NRF52840_XXAA
5+
#ifdef USE_TINYUSB
6+
#include <Adafruit_TinyUSB.h>
7+
#endif
8+
#endif
9+
410
#if 0
511
#define NFC_INTERFACE_SPI
612
#include <SPI.h>

Diff for: src/PN532_SPI.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ void PN532_SPI::begin()
2020
pinMode(_ss, OUTPUT);
2121

2222
_spi->begin();
23+
#if defined(ARDUINO_XIAO_RA4M1) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_RP2350)
24+
#else
2325
_spi->setDataMode(SPI_MODE0); // PN532 only supports mode0
2426
_spi->setBitOrder(LSBFIRST);
2527
#if defined __SAM3X8E__
@@ -31,6 +33,7 @@ void PN532_SPI::begin()
3133
#else
3234
_spi->setClockDivider(SPI_CLOCK_DIV8); // set clock 2MHz(max: 5MHz)
3335
#endif
36+
#endif
3437
}
3538

3639
void PN532_SPI::wakeup()

0 commit comments

Comments
 (0)