Skip to content

Commit 4a48544

Browse files
committed
audiod_function_t clean up.
1 parent f48a456 commit 4a48544

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/class/audio/audio_device.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ typedef struct
303303

304304
bool mounted; // Device opened
305305

306-
/*------------- From this point, data is not cleared by bus reset -------------*/
307-
308306
uint16_t desc_length; // Length of audio function descriptor
309307

310308
#if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
@@ -369,6 +367,8 @@ typedef struct
369367
#endif
370368
#endif
371369

370+
/*------------- From this point, data is not cleared by bus reset -------------*/
371+
372372
// Buffer for control requests
373373
uint8_t * ctrl_buf;
374374
uint8_t ctrl_buf_sz;
@@ -377,14 +377,10 @@ typedef struct
377377
uint8_t * alt_setting; // We need to save the current alternate setting this way, because it is possible that there are AS interfaces which do not have an EP!
378378

379379
// EP Transfer buffers and FIFOs
380-
#if CFG_TUD_AUDIO_ENABLE_EP_OUT
381-
#if !CFG_TUD_AUDIO_ENABLE_DECODING
380+
#if CFG_TUD_AUDIO_ENABLE_EP_OUT && !CFG_TUD_AUDIO_ENABLE_DECODING
382381
tu_fifo_t ep_out_ff;
383382
#endif
384383

385-
386-
#endif // CFG_TUD_AUDIO_ENABLE_EP_OUT
387-
388384
#if CFG_TUD_AUDIO_ENABLE_EP_IN && !CFG_TUD_AUDIO_ENABLE_ENCODING
389385
tu_fifo_t ep_in_ff;
390386
#endif
@@ -394,7 +390,6 @@ typedef struct
394390
CFG_TUSB_MEM_ALIGN uint8_t ep_int_buf[6];
395391
#endif
396392

397-
398393
// Support FIFOs for software encoding and decoding
399394
#if CFG_TUD_AUDIO_ENABLE_EP_OUT && CFG_TUD_AUDIO_ENABLE_DECODING
400395
tu_fifo_t * rx_supp_ff;

0 commit comments

Comments
 (0)