@@ -11,9 +11,10 @@ use std::ffi::CString;
11
11
12
12
#[ derive( Default ) ]
13
13
pub struct MSCDevice {
14
- pub partition_label : String ,
15
- pub mount_path : String ,
14
+ partition_label : String ,
15
+ mount_path : String ,
16
16
mount_path_c_str : CString ,
17
+ high_speed : bool ,
17
18
wl_partition : Option < EspWlPartition < EspPartition > > ,
18
19
}
19
20
@@ -34,10 +35,11 @@ unsafe extern "C" fn storage_mount_changed_cb(event: *mut tinyusb_msc_event_t) {
34
35
}
35
36
36
37
impl MSCDevice {
37
- pub fn new ( partition_label : & str , base_path : & str ) -> Self {
38
+ pub fn new ( partition_label : & str , base_path : & str , high_speed : bool ) -> Self {
38
39
Self {
39
40
mount_path : base_path. to_string ( ) ,
40
41
partition_label : partition_label. to_string ( ) ,
42
+ high_speed,
41
43
..Default :: default ( )
42
44
}
43
45
}
@@ -82,7 +84,10 @@ impl MSCDevice {
82
84
esp ! ( unsafe { tinyusb_msc_storage_mount( base_path_c_str. as_ptr( ) ) } )
83
85
. with_context ( || format ! ( "Failed to mount storage at {}" , self . mount_path) ) ?;
84
86
85
- let tusb_cfg = tinyusb_config_t:: default ( ) ;
87
+ let mut tusb_cfg = tinyusb_config_t:: default ( ) ;
88
+ if self . high_speed {
89
+ // TODO:
90
+ }
86
91
esp ! ( unsafe { tinyusb_driver_install( & tusb_cfg) } )
87
92
. with_context ( || "Failed to install TinyUSB driver" ) ?;
88
93
0 commit comments