From bb71ef3d2835011de3d378b4e8ce9189cbf12f84 Mon Sep 17 00:00:00 2001 From: Simon Kueppers Date: Thu, 19 Sep 2024 11:18:45 +0200 Subject: [PATCH] Removed obsolete manual stm32 endpoint callback --- stm32/aioc-fw/Src/usb.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/stm32/aioc-fw/Src/usb.c b/stm32/aioc-fw/Src/usb.c index 59f0800..03d1368 100644 --- a/stm32/aioc-fw/Src/usb.c +++ b/stm32/aioc-fw/Src/usb.c @@ -6,44 +6,6 @@ #include "usb_audio.h" #include "usb_hid.h" -// We have ISOCHRONOUS endpoints defined that share the same endpoint number, but have opposing directions. -// However with STM32 hardware, ISOCHRONOUS endpoints use both RX and TX structures of the same endpoint register in hardware -// We circumvent a clash by defining our own custom endpoint map for the tiny usb stack. -// This callback is probably not needed with new versions of tinyusb -uint8_t tu_stm32_edpt_number_cb(uint8_t addr) -{ - switch (addr) { - case 0x00: - case 0x80: - /* Endpoint Zero */ - return 0x00; - - case EPNUM_AUDIO_IN: - return 0x01; - - case EPNUM_AUDIO_OUT: - return 0x02; - - case EPNUM_AUDIO_FB: - return 0x03; - - case EPNUM_HID_IN: - case EPNUM_HID_OUT: - return 0x04; - - case EPNUM_CDC_0_OUT: - case EPNUM_CDC_0_IN: - return 0x05; - - case EPNUM_CDC_0_NOTIF: - return 0x06; - - default: - TU_BREAKPOINT(); - return 0x00; - } -} - // FIXME: Do all three need to be handled, or just the LP one? // USB high-priority interrupt (Channel 74): Triggered only by a correct // transfer event for isochronous and double-buffer bulk transfer to reach