Function teensy4_bsp::usb::init [−][src]
This is supported on crate feature
usb-logging
only.Expand description
Initializes the USB stack. This prepares the logging back-end. Returns a Reader
that can read USB serial messages.
To select the default logger behavior, specify Default::default()
as the
argument for config
.
The inst
argument must be the imxrt_ral
’s USB1
instance. An incorrect instance
results in a Error::WrongInstance
error.
This may only be called once. If this is not called, we do not initialize the logger,
and log messages will not be written to the USB host. Returns a
Error::SetLogger
if the logging subsystem already has a
logger.
See the module-level documentation for an example.