@@ -7,10 +7,15 @@ use std::sync::Mutex;
77
88use super :: communication:: { Error as CommunicationError , ReadWrite } ;
99
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" ;
1419
1520#[ cfg( feature = "multithreaded" ) ]
1621pub ( crate ) struct HidDevice ( Mutex < hidapi:: HidDevice > ) ;
@@ -75,10 +80,12 @@ pub enum UsbError {
7580pub fn is_bitbox02 ( device_info : & hidapi:: DeviceInfo ) -> bool {
7681 ( matches ! (
7782 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+ )
8289 ) ) && device_info. vendor_id ( ) == VENDOR_ID
8390 && device_info. product_id ( ) == PRODUCT_ID
8491 && ( device_info. usage_page ( ) == 0xffff || device_info. interface_number ( ) == 0 )
0 commit comments