Skip to content

Commit a73162a

Browse files
committed
WIP: support GIGA
Will need some guards on lwip functions
1 parent a50e967 commit a73162a

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

Diff for: examples/LAN8651-iperf/LAN8651-iperf.ino

+8
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,19 @@ static T1SMacSettings const t1s_mac_settings{MAC_PROMISCUOUS_MODE, MAC_TX_CUT_TH
4141
* GLOBAL VARIABLES
4242
**************************************************************************************/
4343

44+
#ifdef ARDUINO_GIGA
45+
auto const tc6_io = new TC6::TC6_Io
46+
( SPI1
47+
, CS_PIN
48+
, RESET_PIN
49+
, IRQ_PIN);
50+
#else
4451
auto const tc6_io = new TC6::TC6_Io
4552
( SPI
4653
, CS_PIN
4754
, RESET_PIN
4855
, IRQ_PIN);
56+
#endif
4957
auto const tc6_inst = new TC6::TC6_Arduino_10BASE_T1S(tc6_io);
5058

5159
/**************************************************************************************

Diff for: library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ sentence=Generic library for providing IP based 10BASE-T1S communication.
66
paragraph=This Arduino library provides both low-level drivers and high-level abstractions to perform real-time communication via 10BASE-T1S, a multi-drop capable Ethernet standard.
77
category=Communication
88
url=https://github.com/arduino-libraries/Arduino_10BASE_T1S
9-
architectures=samd,renesas_uno
9+
architectures=samd,renesas_uno,mbed_giga

Diff for: src/Arduino_10BASE_T1S.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
static int const CS_PIN = 10;
3636
static int const RESET_PIN = 9;
3737
static int const IRQ_PIN = 2;
38-
#elif defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_MINIMA) || defined(ARDUINO_UNOWIFIR4) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
38+
#elif defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_MINIMA) || defined(ARDUINO_UNOWIFIR4) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_GIGA)
3939
/* Those are all boards with the Arduino Uno form factor for the T1S shield. */
4040
static int const CS_PIN = 9;
4141
static int const RESET_PIN = 4;

Diff for: src/MacAddress.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ size_t MacAddress::printTo(Print & p) const
7373
/**************************************************************************************
7474
* FUNCTION DEFINITION
7575
**************************************************************************************/
76+
#include "Arduino.h"
7677

7778
void get_unique_chip_id_3(uint8_t * uid)
7879
{
@@ -100,6 +101,11 @@ void get_unique_chip_id_3(uint8_t * uid)
100101
bsp_unique_id_t const * renesas_unique_id = (bsp_unique_id_t *) BSP_FEATURE_BSP_UNIQUE_ID_POINTER;
101102
memcpy(uid, renesas_unique_id->unique_id_bytes, 3);
102103
}
104+
#elif defined(ARDUINO_GIGA)
105+
{
106+
auto stm32_uid = HAL_GetUIDw2();
107+
memcpy(uid, &stm32_uid, 3);
108+
}
103109
#else
104110
# error "Retrieving a unique chip ID for MAC generation is not supported on this platform."
105111
#endif

0 commit comments

Comments
 (0)