enhance dcd lpc17xx. Able to pass enumeration

This commit is contained in:
hathach
2018-11-27 20:48:46 +07:00
parent 138b12b61b
commit 038851c362
7 changed files with 374 additions and 361 deletions

View File

@@ -392,7 +392,7 @@ void hal_dcd_isr(uint8_t rhport)
uint8_t result = p_qtd->halted ? XFER_RESULT_STALLED :
( p_qtd->xact_err ||p_qtd->buffer_err ) ? XFER_RESULT_FAILED : XFER_RESULT_SUCCESS;
uint8_t ep_addr = (ep_idx/2) | ( (ep_idx & 0x01) ? TUSB_DIR_IN_MASK : 0 );
uint8_t const ep_addr = (ep_idx/2) | ( (ep_idx & 0x01) ? TUSB_DIR_IN_MASK : 0 );
dcd_event_xfer_complete(rhport, ep_addr, p_qtd->expected_bytes - p_qtd->total_bytes, result, true); // only number of bytes in the IOC qtd
}
}