@@ -7,10 +7,15 @@ use std::sync::Mutex;
7
7
8
8
use super :: communication:: { Error as CommunicationError , ReadWrite } ;
9
9
10
- /// The hid product string of the multi edition firmware.
11
- const FIRMWARE_PRODUCT_STRING_MULTI : & str = "BitBox02" ;
12
- /// The hid product string of the btc-only edition firmware.
13
- const FIRMWARE_PRODUCT_STRING_BTCONLY : & str = "BitBox02BTC" ;
10
+ /// The hid product string of the BitBox02 multi edition firmware.
11
+ const FIRMWARE_PRODUCT_STRING_BITBOX02_MULTI : & str = "BitBox02" ;
12
+ /// The hid product string of the BitBox02 btc-only edition firmware.
13
+ const FIRMWARE_PRODUCT_STRING_BITBOX02_BTCONLY : & str = "BitBox02BTC" ;
14
+
15
+ /// The hid product string of the BitBox02 Nova multi edition firmware.
16
+ const FIRMWARE_PRODUCT_STRING_BITBOX02_NOVA_MULTI : & str = "BitBox02 Nova Multi" ;
17
+ /// The hid product string of the BitBox02 Nova btc-only edition firmware.
18
+ const FIRMWARE_PRODUCT_STRING_BITBOX02_NOVA_BTCONLY : & str = "BitBox02 Nova BTC-only" ;
14
19
15
20
#[ cfg( feature = "multithreaded" ) ]
16
21
pub ( crate ) struct HidDevice ( Mutex < hidapi:: HidDevice > ) ;
@@ -75,10 +80,12 @@ pub enum UsbError {
75
80
pub fn is_bitbox02 ( device_info : & hidapi:: DeviceInfo ) -> bool {
76
81
( matches ! (
77
82
device_info. product_string( ) ,
78
- Some ( FIRMWARE_PRODUCT_STRING_MULTI )
79
- ) || matches ! (
80
- device_info. product_string( ) ,
81
- Some ( FIRMWARE_PRODUCT_STRING_BTCONLY )
83
+ Some (
84
+ FIRMWARE_PRODUCT_STRING_BITBOX02_MULTI
85
+ | FIRMWARE_PRODUCT_STRING_BITBOX02_BTCONLY
86
+ | FIRMWARE_PRODUCT_STRING_BITBOX02_NOVA_MULTI
87
+ | FIRMWARE_PRODUCT_STRING_BITBOX02_NOVA_BTCONLY
88
+ )
82
89
) ) && device_info. vendor_id ( ) == VENDOR_ID
83
90
&& device_info. product_id ( ) == PRODUCT_ID
84
91
&& ( device_info. usage_page ( ) == 0xffff || device_info. interface_number ( ) == 0 )
0 commit comments