add way to calculate the actual byte transferred with ehci

add come callback for cdch
add code for cdc serial demo
This commit is contained in:
hathach
2013-07-02 17:20:25 +07:00
parent 6ce90e2bd8
commit e1ad7b62cf
5 changed files with 50 additions and 5 deletions

View File

@@ -938,6 +938,7 @@ static void qtd_init(ehci_qtd_t* p_qtd, uint32_t data_ptr, uint16_t total_bytes)
p_qtd->cerr = 3; // TODO 3 consecutive errors tolerance
p_qtd->data_toggle = 0;
p_qtd->total_bytes = total_bytes;
p_qtd->expected_bytes = total_bytes;
p_qtd->buffer[0] = data_ptr;
for(uint8_t i=1; i<5; i++)