Skip to content

Commit e4f0720

Browse files
committed
UAC : Enable fifo based transfer on stm32_fsdev
1 parent fe8c170 commit e4f0720

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

src/class/audio/audio_device.c

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,26 +76,19 @@
7676
// Linear buffer in case target MCU is not capable of handling a ring buffer FIFO e.g. no hardware buffer
7777
// is available or driver is would need to be changed dramatically
7878

79-
// Only STM32 synopsys and dcd_transdimension use non-linear buffer for now
80-
// Synopsys detection copied from dcd_synopsys.c (refactor later on)
81-
#if defined (STM32F105x8) || defined (STM32F105xB) || defined (STM32F105xC) || \
82-
defined (STM32F107xB) || defined (STM32F107xC)
83-
#define STM32F1_SYNOPSYS
84-
#endif
85-
86-
#if defined (STM32L475xx) || defined (STM32L476xx) || \
87-
defined (STM32L485xx) || defined (STM32L486xx) || defined (STM32L496xx) || \
88-
defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || \
89-
defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
90-
#define STM32L4_SYNOPSYS
91-
#endif
92-
93-
#if (CFG_TUSB_MCU == OPT_MCU_STM32F1 && defined(STM32F1_SYNOPSYS)) || \
79+
// Only STM32 and dcd_transdimension use non-linear buffer for now
80+
#if CFG_TUSB_MCU == OPT_MCU_STM32F0 || \
81+
CFG_TUSB_MCU == OPT_MCU_STM32F1 || \
9482
CFG_TUSB_MCU == OPT_MCU_STM32F2 || \
83+
CFG_TUSB_MCU == OPT_MCU_STM32F3 || \
9584
CFG_TUSB_MCU == OPT_MCU_STM32F4 || \
9685
CFG_TUSB_MCU == OPT_MCU_STM32F7 || \
9786
CFG_TUSB_MCU == OPT_MCU_STM32H7 || \
98-
(CFG_TUSB_MCU == OPT_MCU_STM32L4 && defined(STM32L4_SYNOPSYS)) || \
87+
CFG_TUSB_MCU == OPT_MCU_STM32L0 || \
88+
CFG_TUSB_MCU == OPT_MCU_STM32L1 || \
89+
CFG_TUSB_MCU == OPT_MCU_STM32L4 || \
90+
CFG_TUSB_MCU == OPT_MCU_STM32G4 || \
91+
CFG_TUSB_MCU == OPT_MCU_STM32WB || \
9992
CFG_TUSB_MCU == OPT_MCU_RX63X || \
10093
CFG_TUSB_MCU == OPT_MCU_RX65X || \
10194
CFG_TUSB_MCU == OPT_MCU_RX72N || \

src/device/dcd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr);
169169

170170
// Allocate packet buffer used by ISO endpoints
171171
// Some MCU need manual packet buffer allocation, we allocation largest size to avoid clustering
172-
bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet_size);
172+
TU_ATTR_WEAK bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet_size);
173173

174174
// Configure and enable an ISO endpoint according to descriptor
175-
bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc);
175+
TU_ATTR_WEAK bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc);
176176
//--------------------------------------------------------------------+
177177
// Event API (implemented by stack)
178178
//--------------------------------------------------------------------+

0 commit comments

Comments
 (0)