sepearate CFG_TUH_DEVICE_MAX and CFG_TUH_HUB

separate dev0 from _usbh_devices pool to save sram
This commit is contained in:
hathach
2021-08-23 19:56:53 +07:00
parent 75cd593b60
commit 3309425211
7 changed files with 93 additions and 63 deletions

View File

@@ -240,6 +240,8 @@ bool cdch_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32
void cdch_close(uint8_t dev_addr)
{
TU_VERIFY(dev_addr <= CFG_TUH_DEVICE_MAX, );
cdch_data_t * p_cdc = get_itf(dev_addr);
tu_memclr(p_cdc, sizeof(cdch_data_t));
}