usb: rename UsbDeviceBuilder -> Builder.

This commit is contained in:
Dario Nieuwenhuis
2022-04-16 02:17:24 +02:00
parent 1c9adec3c5
commit 1bf7b4d6c3
8 changed files with 18 additions and 26 deletions

View File

@ -118,7 +118,7 @@ impl<'a> Config<'a> {
}
/// Used to build new [`UsbDevice`]s.
pub struct UsbDeviceBuilder<'d, D: Driver<'d>> {
pub struct Builder<'d, D: Driver<'d>> {
config: Config<'d>,
handler: Option<&'d dyn DeviceStateHandler>,
interfaces: Vec<(u8, &'d mut dyn ControlHandler), MAX_INTERFACE_COUNT>,
@ -134,7 +134,7 @@ pub struct UsbDeviceBuilder<'d, D: Driver<'d>> {
pub bos_descriptor: BosWriter<'d>,
}
impl<'d, D: Driver<'d>> UsbDeviceBuilder<'d, D> {
impl<'d, D: Driver<'d>> Builder<'d, D> {
/// Creates a builder for constructing a new [`UsbDevice`].
///
/// `control_buf` is a buffer used for USB control request data. It should be sized
@ -175,7 +175,7 @@ impl<'d, D: Driver<'d>> UsbDeviceBuilder<'d, D> {
config_descriptor.configuration(&config);
bos_descriptor.bos();
UsbDeviceBuilder {
Builder {
driver,
handler,
config,

View File

@ -19,8 +19,8 @@ use self::descriptor::*;
use self::driver::{Bus, Driver, Event};
use self::types::*;
pub use self::builder::Builder;
pub use self::builder::Config;
pub use self::builder::UsbDeviceBuilder;
/// The global state of the USB device.
///