mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-07 05:54:11 +08:00
clean up
This commit is contained in:
parent
a23944035d
commit
2f2fb3d8d9
@ -85,9 +85,11 @@ enum
|
|||||||
// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number
|
// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number
|
||||||
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
|
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
|
||||||
#define EPNUM_AUDIO 0x03
|
#define EPNUM_AUDIO 0x03
|
||||||
|
|
||||||
#elif TU_CHECK_MCU(NRF5X)
|
#elif TU_CHECK_MCU(NRF5X)
|
||||||
// nRF5x ISO can only be endpoint 8
|
// nRF5x ISO can only be endpoint 8
|
||||||
#define EPNUM_AUDIO 0x08
|
#define EPNUM_AUDIO 0x08
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define EPNUM_AUDIO 0x01
|
#define EPNUM_AUDIO 0x01
|
||||||
#endif
|
#endif
|
||||||
|
@ -85,6 +85,11 @@ enum
|
|||||||
// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number
|
// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number
|
||||||
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
|
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
|
||||||
#define EPNUM_AUDIO 0x03
|
#define EPNUM_AUDIO 0x03
|
||||||
|
|
||||||
|
#elif TU_CHECK_MCU(NRF5X)
|
||||||
|
// nRF5x ISO can only be endpoint 8
|
||||||
|
#define EPNUM_AUDIO 0x08
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define EPNUM_AUDIO 0x01
|
#define EPNUM_AUDIO 0x01
|
||||||
#endif
|
#endif
|
||||||
|
@ -81,15 +81,18 @@ uint8_t const * tud_descriptor_device_cb(void)
|
|||||||
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
|
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
|
||||||
#define EPNUM_AUDIO_IN 0x03
|
#define EPNUM_AUDIO_IN 0x03
|
||||||
#define EPNUM_AUDIO_OUT 0x03
|
#define EPNUM_AUDIO_OUT 0x03
|
||||||
|
|
||||||
#elif CFG_TUSB_MCU == OPT_MCU_NRF5X
|
#elif CFG_TUSB_MCU == OPT_MCU_NRF5X
|
||||||
// ISO endpoints for NRF5x are fixed to 0x08 (0x88)
|
// ISO endpoints for NRF5x are fixed to 0x08 (0x88)
|
||||||
#define EPNUM_AUDIO_IN 0x08
|
#define EPNUM_AUDIO_IN 0x08
|
||||||
#define EPNUM_AUDIO_OUT 0x08
|
#define EPNUM_AUDIO_OUT 0x08
|
||||||
|
|
||||||
#elif CFG_TUSB_MCU == OPT_MCU_SAMG || CFG_TUSB_MCU == OPT_MCU_SAMX7X
|
#elif CFG_TUSB_MCU == OPT_MCU_SAMG || CFG_TUSB_MCU == OPT_MCU_SAMX7X
|
||||||
// SAMG & SAME70 don't support a same endpoint number with different direction IN and OUT
|
// SAMG & SAME70 don't support a same endpoint number with different direction IN and OUT
|
||||||
// e.g EP1 OUT & EP1 IN cannot exist together
|
// e.g EP1 OUT & EP1 IN cannot exist together
|
||||||
#define EPNUM_AUDIO_IN 0x01
|
#define EPNUM_AUDIO_IN 0x01
|
||||||
#define EPNUM_AUDIO_OUT 0x02
|
#define EPNUM_AUDIO_OUT 0x02
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define EPNUM_AUDIO_IN 0x01
|
#define EPNUM_AUDIO_IN 0x01
|
||||||
#define EPNUM_AUDIO_OUT 0x01
|
#define EPNUM_AUDIO_OUT 0x01
|
||||||
|
2
src/class/vendor/vendor_device.c
vendored
2
src/class/vendor/vendor_device.c
vendored
@ -216,7 +216,7 @@ uint16_t vendord_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, ui
|
|||||||
if ( p_vendor->ep_in ) maybe_transmit(p_vendor);
|
if ( p_vendor->ep_in ) maybe_transmit(p_vendor);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (uint16_t) true;
|
return drv_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool vendord_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes)
|
bool vendord_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user