adding tusb_private.h to implement common edpt claim

This commit is contained in:
hathach
2022-03-09 17:17:27 +07:00
parent 708f05668d
commit a5fb20533c
6 changed files with 104 additions and 44 deletions

View File

@@ -29,6 +29,8 @@
#if CFG_TUD_ENABLED
#include "tusb.h"
#include "common/tusb_private.h"
#include "device/usbd.h"
#include "device/usbd_pvt.h"
#include "device/dcd.h"
@@ -70,6 +72,8 @@ typedef struct
uint8_t itf2drv[16]; // map interface number to driver (0xff is invalid)
uint8_t ep2drv[CFG_TUD_ENDPPOINT_MAX][2]; // map endpoint to driver ( 0xff is invalid )
// TODO 4-bit should be sufficient for ep2drv if we want to save half its bytes
struct TU_ATTR_PACKED
{
volatile bool busy : 1;