summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2024-04-02 20:59:53 +0700
committerGitHub <[email protected]>2024-04-02 20:59:53 +0700
commita70109697f18f1e1df42f73295daa3d9bf1214dc (patch)
treebef1cb19f632a34e17feee452e46201b265a5607 /src
parent29cdd6a9c22b532aeed3bd01d48d2342534e545b (diff)
parent9fb1fb90447fbbfdc3ca33c39cbd75bb807a7907 (diff)
Merge pull request #2566 from hathach/max3421-correct-max-nak
correct max nak
Diffstat (limited to 'src')
-rw-r--r--src/portable/analog/max3421/hcd_max3421.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/portable/analog/max3421/hcd_max3421.c b/src/portable/analog/max3421/hcd_max3421.c
index 9e363506c..fa6d45d3e 100644
--- a/src/portable/analog/max3421/hcd_max3421.c
+++ b/src/portable/analog/max3421/hcd_max3421.c
@@ -454,7 +454,7 @@ bool hcd_configure(uint8_t rhport, uint32_t cfg_id, const void* cfg_param) {
TU_VERIFY(cfg_id == TUH_CFGID_MAX3421);
tuh_configure_param_t const* cfg = (tuh_configure_param_t const*) cfg_param;
- _max_nak = tu_max8(cfg->max3421.max_nak, EP_STATE_ATTEMPT_MAX-EP_STATE_ATTEMPT_1);
+ _max_nak = tu_min8(cfg->max3421.max_nak, EP_STATE_ATTEMPT_MAX-EP_STATE_ATTEMPT_1);
return true;
}