Skip to content

Commit 67ce167

Browse files
committed
OPTA: allow vid/pid function override from derived core
1 parent bf5dca2 commit 67ce167

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

variants/OPTA/variant.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -313,26 +313,19 @@ uint16_t boardRevision() {
313313
return (((OptaBoardInfo*)_boardInfo)->revision);
314314
}
315315

316+
#ifndef FIRST_PROGRAMMING
316317
uint16_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

327324
uint16_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

338331
uint8_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

0 commit comments

Comments
 (0)