mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-24 09:02:37 +00:00
fix potential bug when insert new queue head to list
This commit is contained in:
parent
62f5ec8a0f
commit
b15694bc5f
@ -124,7 +124,7 @@ void verify_int_qhd(ehci_qhd_t *p_qhd, tusb_descriptor_endpoint_t const * desc_e
|
|||||||
verify_open_qhd(p_qhd, desc_endpoint->bEndpointAddress, desc_endpoint->wMaxPacketSize);
|
verify_open_qhd(p_qhd, desc_endpoint->bEndpointAddress, desc_endpoint->wMaxPacketSize);
|
||||||
|
|
||||||
TEST_ASSERT_FALSE(p_qhd->head_list_flag);
|
TEST_ASSERT_FALSE(p_qhd->head_list_flag);
|
||||||
TEST_ASSERT_EQUAL(0, p_qhd->data_toggle_control);
|
TEST_ASSERT_FALSE(p_qhd->data_toggle_control);
|
||||||
TEST_ASSERT_FALSE(p_qhd->non_hs_control_endpoint);
|
TEST_ASSERT_FALSE(p_qhd->non_hs_control_endpoint);
|
||||||
|
|
||||||
// TEST_ASSERT_EQUAL(desc_endpoint->bInterval); TDD highspeed bulk/control OUT
|
// TEST_ASSERT_EQUAL(desc_endpoint->bInterval); TDD highspeed bulk/control OUT
|
||||||
@ -153,7 +153,7 @@ void test_open_interrupt_qhd_hs(void)
|
|||||||
verify_int_qhd(p_qhd, &desc_ept_interrupt_out, TUSB_CLASS_HID);
|
verify_int_qhd(p_qhd, &desc_ept_interrupt_out, TUSB_CLASS_HID);
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL(0xFF, p_qhd->interrupt_smask);
|
TEST_ASSERT_EQUAL(0xFF, p_qhd->interrupt_smask);
|
||||||
//TEST_ASSERT_EQUAL(0, p_qhd->non_hs_interrupt_cmask); cmask in high speed is ignored
|
// TEST_ASSERT_EQUAL(0, p_qhd->non_hs_interrupt_cmask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_open_interrupt_qhd_non_hs(void)
|
void test_open_interrupt_qhd_non_hs(void)
|
||||||
|
@ -755,8 +755,7 @@ static void qtd_init(ehci_qtd_t* p_qtd, uint32_t data_ptr, uint16_t total_bytes)
|
|||||||
static inline void list_insert(ehci_link_t *current, ehci_link_t *new, uint8_t new_type)
|
static inline void list_insert(ehci_link_t *current, ehci_link_t *new, uint8_t new_type)
|
||||||
{
|
{
|
||||||
new->address = current->address;
|
new->address = current->address;
|
||||||
current->address = (uint32_t) new;
|
current->address = ((uint32_t) new) | (new_type << 1);
|
||||||
current->type = new_type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ehci_qhd_t* list_find_previous_qhd(ehci_qhd_t* p_head, ehci_qhd_t* p_qhd)
|
static ehci_qhd_t* list_find_previous_qhd(ehci_qhd_t* p_head, ehci_qhd_t* p_qhd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user