rename HCD_MAX_XFER to CFG_TUH_ENDPOINT_MAX

minor clean up
This commit is contained in:
hathach
2022-03-04 17:07:04 +07:00
parent eb6b5d1219
commit 96165a1950
7 changed files with 32 additions and 26 deletions

View File

@@ -35,6 +35,19 @@
extern "C" {
#endif
//--------------------------------------------------------------------+
// Configuration
//--------------------------------------------------------------------+
#ifndef CFG_TUH_ENDPOINT_MAX
#define CFG_TUH_ENDPOINT_MAX (CFG_TUH_DEVICE_MAX*(CFG_TUH_HUB + CFG_TUH_HID*2 + CFG_TUH_MSC*2 + CFG_TUH_CDC*3))
// #ifdef TUP_HCD_ENDPOINT_MAX
// #define CFG_TUH_ENDPPOINT_MAX TUP_HCD_ENDPOINT_MAX
// #else
// #define
// #endif
#endif
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF
//--------------------------------------------------------------------+
@@ -81,17 +94,6 @@ typedef struct
} hcd_event_t;
#if CFG_TUH_ENABLED
// Max number of endpoints per device
enum {
// TODO better computation
HCD_MAX_ENDPOINT = CFG_TUH_DEVICE_MAX*(CFG_TUH_HUB + CFG_TUH_HID*2 + CFG_TUH_MSC*2 + CFG_TUH_CDC*3),
HCD_MAX_XFER = HCD_MAX_ENDPOINT*2,
};
//#define HCD_MAX_ENDPOINT 16
//#define HCD_MAX_XFER 16
typedef struct {
uint8_t rhport;
uint8_t hub_addr;
@@ -99,8 +101,6 @@ typedef struct {
uint8_t speed;
} hcd_devtree_info_t;
#endif
//--------------------------------------------------------------------+
// Controller API
//--------------------------------------------------------------------+