summaryrefslogtreecommitdiff
path: root/src/host/usbh.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-04-02 16:38:40 +0700
committerhathach <[email protected]>2024-04-02 16:38:40 +0700
commit7d3d60f96de3f6e15291c9302463c294e2dc98de (patch)
tree9066cd077fd07703326391c46c3e55f165b1db5b /src/host/usbh.c
parente802fe0677c901a444e7c9b5d67be2a1f400adee (diff)
add hcd_configure() to change max NAK dynamically
Diffstat (limited to 'src/host/usbh.c')
-rw-r--r--src/host/usbh.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index 05091736e..aa0603d47 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -52,6 +52,13 @@ TU_ATTR_WEAK bool hcd_deinit(uint8_t rhport) {
return false;
}
+TU_ATTR_WEAK bool hcd_configure(uint8_t rhport, uint32_t cfg_id, const void* cfg_param) {
+ (void) rhport;
+ (void) cfg_id;
+ (void) cfg_param;
+ return false;
+}
+
TU_ATTR_WEAK void tuh_event_hook_cb(uint8_t rhport, uint32_t eventid, bool in_isr) {
(void) rhport;
(void) eventid;
@@ -332,11 +339,7 @@ bool tuh_rhport_reset_bus(uint8_t rhport, bool active) {
//--------------------------------------------------------------------+
bool tuh_configure(uint8_t rhport, uint32_t cfg_id, const void *cfg_param) {
- if ( hcd_configure ) {
- return hcd_configure(rhport, cfg_id, cfg_param);
- } else {
- return false;
- }
+ return hcd_configure(rhport, cfg_id, cfg_param);
}
static void clear_device(usbh_device_t* dev) {