Merge pull request #3601 from LegitCamper/custom_bcdusb_version

Expose UsbVersion
This commit is contained in:
Dario Nieuwenhuis 2024-12-03 17:14:57 +00:00 committed by GitHub
commit 02ba6cd6c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,9 @@ use crate::{Handler, Interface, UsbDevice, MAX_INTERFACE_COUNT, STRING_INDEX_CUS
#[non_exhaustive] #[non_exhaustive]
/// Allows Configuring the Bcd USB version below 2.1 /// Allows Configuring the Bcd USB version below 2.1
pub enum UsbVersion { pub enum UsbVersion {
/// Usb version 2.0
Two = 0x0200, Two = 0x0200,
/// Usb version 2.1
TwoOne = 0x0210, TwoOne = 0x0210,
} }

View File

@ -23,7 +23,7 @@ mod config {
use embassy_futures::select::{select, Either}; use embassy_futures::select::{select, Either};
use heapless::Vec; use heapless::Vec;
pub use crate::builder::{Builder, Config, FunctionBuilder, InterfaceAltBuilder, InterfaceBuilder}; pub use crate::builder::{Builder, Config, FunctionBuilder, InterfaceAltBuilder, InterfaceBuilder, UsbVersion};
use crate::config::{MAX_HANDLER_COUNT, MAX_INTERFACE_COUNT}; use crate::config::{MAX_HANDLER_COUNT, MAX_INTERFACE_COUNT};
use crate::control::{InResponse, OutResponse, Recipient, Request, RequestType}; use crate::control::{InResponse, OutResponse, Recipient, Request, RequestType};
use crate::descriptor::{descriptor_type, lang_id}; use crate::descriptor::{descriptor_type, lang_id};