Merge pull request #2566 from hathach/max3421-correct-max-nak

correct max nak
This commit is contained in:
Ha Thach 2024-04-02 20:59:53 +07:00 committed by GitHub
commit a70109697f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}