Skip to content

Commit 07ff25e

Browse files
committed
Add max nak config
Signed-off-by: Zixun LI <[email protected]>
1 parent 8914f40 commit 07ff25e

File tree

2 files changed

+140
-72
lines changed

2 files changed

+140
-72
lines changed

src/host/usbh.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,23 @@ enum {
9595
TUH_CFGID_INVALID = 0,
9696
TUH_CFGID_RPI_PIO_USB_CONFIGURATION = 100, // cfg_param: pio_usb_configuration_t
9797
TUH_CFGID_MAX3421 = 200,
98+
TUH_CFGID_FSDEV = 300,
9899
};
99100

100101
typedef struct {
101-
uint8_t max_nak; // max NAK per endpoint per frame to save CPU/SPI bus usage
102+
uint8_t max_nak; // max NAK per endpoint per frame to save CPU/SPI bus usage (0=unlimited)
102103
uint8_t cpuctl; // R16: CPU Control Register
103104
uint8_t pinctl; // R17: Pin Control Register. FDUPSPI bit is ignored
104105
} tuh_configure_max3421_t;
105106

107+
typedef struct {
108+
uint8_t max_nak; // max NAK per endpoint per frame to save CPU usage (0=unlimited)
109+
} tuh_configure_fsdev_t;
110+
106111
typedef union {
107112
// For TUH_CFGID_RPI_PIO_USB_CONFIGURATION use pio_usb_configuration_t
108-
109113
tuh_configure_max3421_t max3421;
114+
tuh_configure_fsdev_t fsdev;
110115
} tuh_configure_param_t;
111116

112117
//--------------------------------------------------------------------+

0 commit comments

Comments
 (0)