File tree 2 files changed +5
-8
lines changed
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;
148
148
// Use these only if bootloader data is not available / valid
149
149
#define _BOARD_VENDORID 0x2341
150
150
#define _BOARD_PRODUCTID 0x0264
151
+
152
+ #ifndef FIRST_PROGRAMMING
151
153
uint16_t _getVid_ ();
152
154
uint16_t _getPid_ ();
153
155
154
156
// Retrieve (Arduino OUI) Ethernet MAC Address from QSPIF OTP
155
157
uint8_t _getSecureEthMac_ (uint8_t * );
158
+ #endif
156
159
157
160
#define BOARD_NAME "Arduino Opta"
158
161
Original file line number Diff line number Diff line change @@ -313,26 +313,19 @@ uint16_t boardRevision() {
313
313
return (((OptaBoardInfo*)_boardInfo)->revision );
314
314
}
315
315
316
+ #ifndef FIRST_PROGRAMMING
316
317
uint16_t _getVid_ () {
317
- #ifdef FIRST_PROGRAMMING
318
- return _BOARD_VENDORID;
319
- #else
320
318
if (!has_otp_info) {
321
319
getSecureFlashData ();
322
320
}
323
321
return ((OptaBoardInfo*)_boardInfo)->vid ;
324
- #endif
325
322
}
326
323
327
324
uint16_t _getPid_ () {
328
- #ifdef FIRST_PROGRAMMING
329
- return _BOARD_PRODUCTID;
330
- #else
331
325
if (!has_otp_info) {
332
326
getSecureFlashData ();
333
327
}
334
328
return ((OptaBoardInfo*)_boardInfo)->pid ;
335
- #endif
336
329
}
337
330
338
331
uint8_t _getSecureEthMac_ (uint8_t *mac_address) {
@@ -349,6 +342,7 @@ uint8_t mbed_otp_mac_address(char *mac)
349
342
auto ret = _getSecureEthMac_ (reinterpret_cast <uint8_t *>(mac));
350
343
return ret;
351
344
}
345
+ #endif
352
346
353
347
#define BOARD_REVISION (x,y ) (x << 8 | y)
354
348
You can’t perform that action at this time.
0 commit comments