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> {
4343 ///
4444 /// * `index` - A string index allocated earlier with
4545 /// [`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.
4748 fn get_string ( & self , index : StringIndex , lang_id : LangID ) -> Option < & str > {
4849 let _ = ( index, lang_id) ;
4950 None
Original file line number Diff line number Diff line change @@ -567,11 +567,10 @@ impl<B: UsbBus> UsbDevice<'_, B> {
567567 Err ( _err) => {
568568 #[ cfg( feature = "defmt" ) ]
569569 defmt:: warn!(
570- "Receive unknown LANGID {:#06X}, reject the request " ,
570+ "Receive unknown LANGID {:#06X}, default to EN_US " ,
571571 _err. number
572572 ) ;
573- xfer. reject ( ) . ok ( ) ;
574- return ;
573+ LangID :: EN_US
575574 }
576575
577576 Ok ( req_lang_id) => req_lang_id,
You can’t perform that action at this time.
0 commit comments