pub struct Config<'d, const N: usize> {
pub sample_rates_hz: &'d [u32],
pub sample_width: SampleWidth,
pub line_out_channels: Channels<'d>,
pub line_in_channels: Channels<'d>,
pub line_out_feature_unit: Vec<FeatureUnitControls, N, u8>,
pub line_in_feature_unit: Vec<FeatureUnitControls, N, u8>,
pub line_out_volume_range: VolumeRange,
pub line_in_volume_range: VolumeRange,
pub interrupt_endpoint: bool,
}Expand description
I/O box stream settings and optional host controls.
Fields§
§sample_rates_hz: &'d [u32]Supported sample rates in Hz, shared by both directions: one to ten discrete values, in any order. The first is reported before the host selects a rate.
sample_width: SampleWidthThe audio sample resolution of both streams.
line_out_channels: Channels<'d>Line out channels.
line_in_channels: Channels<'d>Line in channels.
line_out_feature_unit: Vec<FeatureUnitControls, N, u8>Controls the USB host can change on each line out channel.
Use heapless::Vec::new() to omit the Feature Unit. Otherwise, provide one entry more
than there are channels: the master first, then each channel in stream order. Use
FeatureUnitControls::empty for no controls on a channel. At most 62 entries (the
descriptor’s length is a byte).
line_in_feature_unit: Vec<FeatureUnitControls, N, u8>Controls the USB host can change on each line in channel, as
Self::line_out_feature_unit.
line_out_volume_range: VolumeRangeThe volume range of the line out Feature Unit.
line_in_volume_range: VolumeRangeThe volume range of the line in Feature Unit.
interrupt_endpoint: boolAdd an AudioControl interrupt endpoint, so the host learns about volume and mute
changes the device makes itself (ControlMonitor::set_line_out_volume).