expose the AudioHandler from UsbAudioClass instance for access from the application

This commit is contained in:
2026-08-25 12:30:56 -07:00
parent 2231c8db9c
commit 53ce6a1229
+4
View File
@@ -999,6 +999,10 @@ impl<'a, B: UsbBus, AU: AudioHandler<'a, B> + ClockSource> UsbClass<B>
}
impl<'a, B: UsbBus, AU: AudioHandler<'a, B> + ClockSource> UsbAudioClass<'a, B, AU> {
/// Expose the owned AudioHandler implementation
pub fn handler(&mut self) -> &mut AU {
self.audio_impl
}
fn emit_feedback(&mut self) {
if let Some(fb_ep) = self.feedback.as_ref() {
if let Some(fb) = self.audio_impl.feedback(self.nominal_fb) {