File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 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;
146146uint16_t _getVid_ ();
147147uint16_t _getPid_ ();
148148
149+ // Retrieve (Arduino OUI) Ethernet MAC Address from QSPIF OTP
150+ uint8_t _getSecureEthMac_ (uint8_t * );
151+
149152#define BOARD_NAME "Arduino Opta"
150153
151154#define DFU_MAGIC_SERIAL_ONLY_RESET 0xb0
Original file line number Diff line number Diff line change @@ -322,6 +322,21 @@ uint16_t _getPid_() {
322322#endif
323323}
324324
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+
325340#define BOARD_REVISION (x,y ) (x << 8 | y)
326341
327342void initVariant () {
You can’t perform that action at this time.
0 commit comments