Struct imxrt_log::UsbdConfigBuilder
source · pub struct UsbdConfigBuilder { /* private fields */ }
Expand description
USB device configuration builder.
Use this to construct a UsbdConfig
, which provides settings
to the USB device. For additional configurations that can only
be safely expressed statically, see the package configuration
documentation.
Default values
The snippet below demonstrates the default values.
use imxrt_log::{UsbdConfigBuilder, UsbdConfig};
const DEFAULT_VALUES: UsbdConfig =
UsbdConfigBuilder::new()
.poll_interval_us(4_000)
.build();
assert_eq!(DEFAULT_VALUES, UsbdConfigBuilder::new().build());
Implementations§
source§impl UsbdConfigBuilder
impl UsbdConfigBuilder
sourcepub const fn build(self) -> UsbdConfig
pub const fn build(self) -> UsbdConfig
Build the USB device configuration.
sourcepub const fn poll_interval_us(self, poll_interval_us: u32) -> Self
pub const fn poll_interval_us(self, poll_interval_us: u32) -> Self
Set the USB timer polling interval, in microseconds.
This value has no effect if interrupts are disabled. See the USB device backend documentation for more information.
Note that the USB device driver internally clamps this value to 2^24.
Trait Implementations§
source§impl Debug for UsbdConfigBuilder
impl Debug for UsbdConfigBuilder
source§impl Format for UsbdConfigBuilder
impl Format for UsbdConfigBuilder
source§impl PartialEq<UsbdConfigBuilder> for UsbdConfigBuilder
impl PartialEq<UsbdConfigBuilder> for UsbdConfigBuilder
source§fn eq(&self, other: &UsbdConfigBuilder) -> bool
fn eq(&self, other: &UsbdConfigBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.