mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
correct TUD_OPT_HIGH_SPEED
This commit is contained in:
parent
772b2b692f
commit
c3140af274
@ -55,7 +55,7 @@ typedef struct ATTR_ALIGNED(4)
|
||||
uint32_t next;
|
||||
|
||||
//------------- Word 1 -------------//
|
||||
uint16_t mode : 2; // either 00 normal or 01 ATLE(auto length extraction)
|
||||
uint16_t atle_mode : 2; // 00: normal, 01: ATLE (auto length extraction)
|
||||
uint16_t next_valid : 1;
|
||||
uint16_t : 1; ///< reserved
|
||||
uint16_t isochronous : 1; // is an iso endpoint
|
||||
|
@ -121,7 +121,13 @@
|
||||
|
||||
// Which roothub port is configured as device
|
||||
#define TUD_OPT_RHPORT ( (CFG_TUSB_RHPORT0_MODE & OPT_MODE_DEVICE) ? 0 : ((CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE) ? 1 : -1) )
|
||||
#define TUD_OPT_HIGH_SPEED ( (CFG_TUSB_RHPORT0_MODE & (OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED)) || (CFG_TUSB_RHPORT1_MODE & (OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED)) )
|
||||
|
||||
|
||||
#if TUD_OPT_RHPORT == 0
|
||||
#define TUD_OPT_HIGH_SPEED ( CFG_TUSB_RHPORT0_MODE & OPT_MODE_HIGH_SPEED )
|
||||
#else
|
||||
#define TUD_OPT_HIGH_SPEED ( CFG_TUSB_RHPORT1_MODE & OPT_MODE_HIGH_SPEED )
|
||||
#endif
|
||||
|
||||
#define TUSB_OPT_DEVICE_ENABLED ( TUD_OPT_RHPORT >= 0 )
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user