Skip to content

Commit 72becd5

Browse files
committedOct 8, 2024
Arduino Giga has placed SPI1 where Uno form factor has SPI.
1 parent ee6a9a9 commit 72becd5

File tree

6 files changed

+51
-27
lines changed

6 files changed

+51
-27
lines changed
 

‎examples/UDP_Client/UDP_Client.ino

+9-5
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@ static uint8_t udp_rx_msg_buf[256] = {0};
3636
* GLOBAL VARIABLES
3737
**************************************************************************************/
3838

39-
auto const tc6_io = new TC6::TC6_Io
40-
( SPI
41-
, CS_PIN
42-
, RESET_PIN
43-
, IRQ_PIN);
39+
auto const tc6_io = new TC6::TC6_Io(
40+
#ifdef ARDUINO_GIGA
41+
SPI1
42+
#else
43+
SPI
44+
#endif
45+
, CS_PIN
46+
, RESET_PIN
47+
, IRQ_PIN);
4448
auto const tc6_inst = new TC6::TC6_Arduino_10BASE_T1S(tc6_io);
4549
Arduino_10BASE_T1S_UDP udp_client;
4650

‎examples/UDP_Server/UDP_Server.ino

+9-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ static uint8_t udp_rx_msg_buf[256] = {0};
3939
* GLOBAL VARIABLES
4040
**************************************************************************************/
4141

42-
auto const tc6_io = new TC6::TC6_Io
43-
( SPI
44-
, CS_PIN
45-
, RESET_PIN
46-
, IRQ_PIN);
42+
auto const tc6_io = new TC6::TC6_Io(
43+
#ifdef ARDUINO_GIGA
44+
SPI1
45+
#else
46+
SPI
47+
#endif
48+
, CS_PIN
49+
, RESET_PIN
50+
, IRQ_PIN);
4751
auto const tc6_inst = new TC6::TC6_Arduino_10BASE_T1S(tc6_io);
4852
Arduino_10BASE_T1S_UDP udp_server;
4953

‎examples/iperf-client/iperf-client.ino

+6-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@ auto const tc6_io = new TC6::TC6_Io
4848
, RESET_PIN
4949
, IRQ_PIN);
5050
#else
51-
auto const tc6_io = new TC6::TC6_Io
52-
( SPI
51+
auto const tc6_io = new TC6::TC6_Io(
52+
#ifdef ARDUINO_GIGA
53+
SPI1
54+
#else
55+
SPI
56+
#endif
5357
, CS_PIN
5458
, RESET_PIN
5559
, IRQ_PIN);

‎examples/tools/Control-DIOx/Control-DIOx.ino

+9-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,15 @@ static auto const DIO_PIN = TC6::DIO::A0;
3535
* GLOBAL VARIABLES
3636
**************************************************************************************/
3737

38-
auto const tc6_io = new TC6::TC6_Io
39-
( SPI
40-
, CS_PIN
41-
, RESET_PIN
42-
, IRQ_PIN);
38+
auto const tc6_io = new TC6::TC6_Io(
39+
#ifdef ARDUINO_GIGA
40+
SPI1
41+
#else
42+
SPI
43+
#endif
44+
, CS_PIN
45+
, RESET_PIN
46+
, IRQ_PIN);
4347
auto const tc6_inst = new TC6::TC6_Arduino_10BASE_T1S(tc6_io);
4448

4549
/**************************************************************************************

‎examples/tools/PoDL-Sink-Auto-TurnOff/PoDL-Sink-Auto-TurnOff.ino

+9-5
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ static T1SMacSettings const t1s_default_mac_settings;
3232
* GLOBAL VARIABLES
3333
**************************************************************************************/
3434

35-
auto const tc6_io = new TC6::TC6_Io
36-
( SPI
37-
, CS_PIN
38-
, RESET_PIN
39-
, IRQ_PIN);
35+
auto const tc6_io = new TC6::TC6_Io(
36+
#ifdef ARDUINO_GIGA
37+
SPI1
38+
#else
39+
SPI
40+
#endif
41+
, CS_PIN
42+
, RESET_PIN
43+
, IRQ_PIN);
4044
auto const tc6_inst = new TC6::TC6_Arduino_10BASE_T1S(tc6_io);
4145

4246
/**************************************************************************************

‎examples/tools/PoDL-Source/PoDL-Source.ino

+9-5
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ static T1SMacSettings const t1s_default_mac_settings;
3232
* GLOBAL VARIABLES
3333
**************************************************************************************/
3434

35-
auto const tc6_io = new TC6::TC6_Io
36-
( SPI
37-
, CS_PIN
38-
, RESET_PIN
39-
, IRQ_PIN);
35+
auto const tc6_io = new TC6::TC6_Io(
36+
#ifdef ARDUINO_GIGA
37+
SPI1
38+
#else
39+
SPI
40+
#endif
41+
, CS_PIN
42+
, RESET_PIN
43+
, IRQ_PIN);
4044
auto const tc6_inst = new TC6::TC6_Arduino_10BASE_T1S(tc6_io);
4145

4246
/**************************************************************************************

0 commit comments

Comments
 (0)