refactor usbh class driver

This commit is contained in:
hathach
2018-12-10 05:07:22 +07:00
parent 05913a7350
commit 6a6e7d0ecb
6 changed files with 140 additions and 112 deletions

View File

@@ -86,6 +86,9 @@ typedef struct {
osal_mutex_def_t mutex_def;
osal_mutex_t mutex_hdl; // used to exclusively occupy control pipe
} control;
int8_t itf2drv[16]; // map interface number to driver (negative is invalid)
int8_t ep2drv[8][2]; // map endpoint to driver ( negative is invalid )
} usbh_device_t;
extern usbh_device_t _usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1]; // including zero-address