File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 19
19
#include <memory/memory.h>
20
20
#include <version.h>
21
21
22
+ #include <memory/memory_shared.h>
22
23
#include <platform_config.h>
23
24
#include <rust/rust.h>
24
25
#include <usb/usb_packet.h>
@@ -60,8 +61,9 @@ typedef struct {
60
61
* 1 byte: platform code:
61
62
* - 0x00 - BitBox02
62
63
* - 0x01 - BitBoxBase (deprecated)
64
+ * - 0x02 - BitBox02Plus
63
65
* 1 byte: edition code:
64
- * - For the BitBox02 edition:
66
+ * - For the BitBox02 and BitBox02Plus edition:
65
67
* - - 0x00 - Multi
66
68
* - - 0x01 - Bitcoin-only
67
69
* - For the BitBoxBase platform (deprecated):
@@ -84,14 +86,21 @@ static size_t _api_info(uint8_t* buf)
84
86
memcpy ((char * )current , DIGITAL_BITBOX_VERSION_SHORT , version_string_len );
85
87
current += version_string_len ;
86
88
87
- // 1 byte platform code and 1 byte edition code
88
- #if PRODUCT_BITBOX_MULTI == 1 || PRODUCT_BITBOX02_FACTORYSETUP == 1
89
- * current = 0x00 ;
89
+ // 1 byte platform code
90
+ switch (memory_get_platform ()) {
91
+ case MEMORY_PLATFORM_BITBOX02_PLUS :
92
+ * current = 0x02 ;
93
+ break ;
94
+ default :
95
+ * current = 0x00 ;
96
+ break ;
97
+ }
90
98
current ++ ;
99
+
100
+ // 1 byte edition code
101
+ #if PRODUCT_BITBOX_MULTI == 1 || PRODUCT_BITBOX02_FACTORYSETUP == 1
91
102
* current = 0x00 ;
92
103
#elif PRODUCT_BITBOX_BTCONLY == 1
93
- * current = 0x00 ;
94
- current ++ ;
95
104
* current = 0x01 ;
96
105
#endif
97
106
current ++ ;
You can’t perform that action at this time.
0 commit comments