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

@@ -134,6 +134,7 @@ void verify_qtd(ehci_qtd_t *p_qtd, uint8_t p_data[], uint16_t length)
TEST_ASSERT_EQUAL(3, p_qtd->cerr);
TEST_ASSERT_EQUAL(0, p_qtd->current_page);
TEST_ASSERT_EQUAL(length, p_qtd->total_bytes);
TEST_ASSERT_EQUAL(length, p_qtd->expected_bytes);
TEST_ASSERT_TRUE(p_qtd->used);
TEST_ASSERT_EQUAL_HEX( p_data, p_qtd->buffer[0] );

View File

@@ -136,6 +136,7 @@ void verify_qtd(ehci_qtd_t *p_qtd, uint8_t p_data[], uint16_t length)
TEST_ASSERT_EQUAL(3, p_qtd->cerr);
TEST_ASSERT_EQUAL(0, p_qtd->current_page);
TEST_ASSERT_EQUAL(length, p_qtd->total_bytes);
TEST_ASSERT_EQUAL(length, p_qtd->expected_bytes);
TEST_ASSERT_TRUE(p_qtd->used);
TEST_ASSERT_EQUAL_HEX( p_data, p_qtd->buffer[0] );