File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ pub trait UsbClass<B: UsbBus> {
43
43
///
44
44
/// * `index` - A string index allocated earlier with
45
45
/// [`UsbAllocator`](crate::bus::UsbBusAllocator).
46
- /// * `lang_id` - The language ID for the string to retrieve.
46
+ /// * `lang_id` - The language ID for the string to retrieve. If the requested lang_id is not
47
+ /// valid it will default to EN_US.
47
48
fn get_string ( & self , index : StringIndex , lang_id : LangID ) -> Option < & str > {
48
49
let _ = ( index, lang_id) ;
49
50
None
Original file line number Diff line number Diff line change @@ -567,11 +567,10 @@ impl<B: UsbBus> UsbDevice<'_, B> {
567
567
Err ( _err) => {
568
568
#[ cfg( feature = "defmt" ) ]
569
569
defmt:: warn!(
570
- "Receive unknown LANGID {:#06X}, reject the request " ,
570
+ "Receive unknown LANGID {:#06X}, default to EN_US " ,
571
571
_err. number
572
572
) ;
573
- xfer. reject ( ) . ok ( ) ;
574
- return ;
573
+ LangID :: EN_US
575
574
}
576
575
577
576
Ok ( req_lang_id) => req_lang_id,
You can’t perform that action at this time.
0 commit comments