added dcd_sof_enable(), tud_sof_isr_set()

make number of interface configurable (default to 8)
CFG_TUD_INTERFACE_MAX
This commit is contained in:
hathach
2022-03-07 23:03:37 +07:00
parent ce60e98f6d
commit 707a633de3
4 changed files with 41 additions and 2 deletions

View File

@@ -33,6 +33,8 @@
extern "C" {
#endif
typedef void (*tud_sof_isr_t) (uint32_t frame_count);
//--------------------------------------------------------------------+
// Application API
//--------------------------------------------------------------------+
@@ -84,6 +86,10 @@ bool tud_disconnect(void);
// Return false on unsupported MCUs
bool tud_connect(void);
// Set Start-of-frame (1ms interval) IRQ handler
// NULL means disabled, frame_count may not be supported on mcus
void tud_sof_isr_set(tud_sof_isr_t sof_isr);
// Carry out Data and Status stage of control transfer
// - If len = 0, it is equivalent to sending status only
// - If len > wLength : it will be truncated