|
9 | 9 | #include "portenta_lite_bootloader.h"
|
10 | 10 | #include "portenta_lite_connected_bootloader.h"
|
11 | 11 | #define GET_OTP_BOARD_INFO
|
| 12 | +typedef PortentaBoardInfo BoardInfo; |
12 | 13 | #elif defined(ARDUINO_NICLA_VISION)
|
13 | 14 | #include "nicla_vision_bootloader.h"
|
14 | 15 | #elif defined(ARDUINO_OPTA)
|
| 16 | +#define GET_OTP_BOARD_INFO |
| 17 | +#include "opta_info.h" |
| 18 | +typedef OptaBoardInfo BoardInfo; |
15 | 19 | #include "opta_bootloader.h"
|
16 | 20 | #endif
|
17 | 21 |
|
@@ -54,11 +58,13 @@ void setup() {
|
54 | 58 | Serial.println("Has Crypto chip: " + String(bootloader_data[9] == 1 ? "Yes" : "No"));
|
55 | 59 |
|
56 | 60 | #ifdef GET_OTP_BOARD_INFO
|
57 |
| - auto info = *((PortentaBoardInfo*)boardInfo()); |
| 61 | + auto info = *((BoardInfo*)boardInfo()); |
58 | 62 | if (info.magic == 0xB5) {
|
59 | 63 | Serial.println("Secure info version: " + String(info.version));
|
60 | 64 | Serial.println("Secure board revision: " + String(info.revision >> 8) + "." + String(info.revision & 0xFF));
|
| 65 | +#if defined(ARDUINO_PORTENTA_H7_M7) |
61 | 66 | Serial.println("Secure carrier identification: " + String(info.carrier >> 8) + "." + String(info.revision & 0xFF));
|
| 67 | +#endif |
62 | 68 | Serial.println("Secure vid: 0x" + String(info.vid, HEX));
|
63 | 69 | Serial.println("Secure pid: 0x" + String(info.pid, HEX));
|
64 | 70 | Serial.println("Secure mac: " + String(info.mac_address[0], HEX) + ":" + String(info.mac_address[1], HEX) + ":" +
|
|
0 commit comments