File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -148,11 +148,14 @@ static const uint8_t SCK = PIN_SPI_SCK;
148148// Use these only if bootloader data is not available / valid
149149#define _BOARD_VENDORID 0x2341
150150#define _BOARD_PRODUCTID 0x0264
151+
152+ #ifndef FIRST_PROGRAMMING
151153uint16_t _getVid_ ();
152154uint16_t _getPid_ ();
153155
154156// Retrieve (Arduino OUI) Ethernet MAC Address from QSPIF OTP
155157uint8_t _getSecureEthMac_ (uint8_t * );
158+ #endif
156159
157160#define BOARD_NAME "Arduino Opta"
158161
Original file line number Diff line number Diff line change @@ -313,26 +313,19 @@ uint16_t boardRevision() {
313313 return (((OptaBoardInfo*)_boardInfo)->revision );
314314}
315315
316+ #ifndef FIRST_PROGRAMMING
316317uint16_t _getVid_ () {
317- #ifdef FIRST_PROGRAMMING
318- return _BOARD_VENDORID;
319- #else
320318 if (!has_otp_info) {
321319 getSecureFlashData ();
322320 }
323321 return ((OptaBoardInfo*)_boardInfo)->vid ;
324- #endif
325322}
326323
327324uint16_t _getPid_ () {
328- #ifdef FIRST_PROGRAMMING
329- return _BOARD_PRODUCTID;
330- #else
331325 if (!has_otp_info) {
332326 getSecureFlashData ();
333327 }
334328 return ((OptaBoardInfo*)_boardInfo)->pid ;
335- #endif
336329}
337330
338331uint8_t _getSecureEthMac_ (uint8_t *mac_address) {
@@ -349,6 +342,7 @@ uint8_t mbed_otp_mac_address(char *mac)
349342 auto ret = _getSecureEthMac_ (reinterpret_cast <uint8_t *>(mac));
350343 return ret;
351344}
345+ #endif
352346
353347#define BOARD_REVISION (x,y ) (x << 8 | y)
354348
You can’t perform that action at this time.
0 commit comments