File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,9 @@ static const uint8_t SCK = PIN_SPI_SCK;
146
146
uint16_t _getVid_ ();
147
147
uint16_t _getPid_ ();
148
148
149
+ // Retrieve (Arduino OUI) Ethernet MAC Address from QSPIF OTP
150
+ uint8_t _getSecureEthMac_ (uint8_t * );
151
+
149
152
#define BOARD_NAME "Arduino Opta"
150
153
151
154
#define DFU_MAGIC_SERIAL_ONLY_RESET 0xb0
Original file line number Diff line number Diff line change @@ -322,6 +322,21 @@ uint16_t _getPid_() {
322
322
#endif
323
323
}
324
324
325
+ uint8_t _getSecureEthMac_ (uint8_t *mac_address) {
326
+ if (!has_otp_info) {
327
+ getSecureFlashData ();
328
+ }
329
+ memcpy (mac_address, ((OptaBoardInfo*)_boardInfo)->mac_address , 6 );
330
+
331
+ return 6 ;
332
+ }
333
+
334
+ uint8_t mbed_otp_mac_address (char *mac)
335
+ {
336
+ auto ret = _getSecureEthMac_ (reinterpret_cast <uint8_t *>(mac));
337
+ return ret;
338
+ }
339
+
325
340
#define BOARD_REVISION (x,y ) (x << 8 | y)
326
341
327
342
void initVariant () {
You can’t perform that action at this time.
0 commit comments