mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
refactor(usb): Split test device descriptors from mock class files
Previously, descriptors of the test devices were stored direclty in the mock device files (e.g., "mock_[hid|msc].[h|c]"). This commit splits out the device descriptors to separate files (e.g., "dev_[hid|msc].c") along with getter functions. Users that want to run the tests locally on a different device simply need to update the "dev_[hid|msc].c" file for their device.
This commit is contained in:
@@ -330,14 +330,3 @@ uint8_t test_hcd_enum_device(hcd_pipe_handle_t default_pipe)
|
||||
test_hcd_free_urb(urb);
|
||||
return ENUM_ADDR;
|
||||
}
|
||||
|
||||
void test_hcd_set_mock_msc_ep_descriptor(usb_speed_t port_speed)
|
||||
{
|
||||
if (port_speed == USB_SPEED_HIGH) {
|
||||
mock_msc_scsi_bulk_out_ep_desc = mock_msc_scsi_bulk_out_ep_desc_hs; // HS wMaxPacketSize = 512
|
||||
mock_msc_scsi_bulk_in_ep_desc = mock_msc_scsi_bulk_in_ep_desc_hs;
|
||||
} else {
|
||||
mock_msc_scsi_bulk_out_ep_desc = mock_msc_scsi_bulk_out_ep_desc_fs; // FS wMaxPacketSize = 64
|
||||
mock_msc_scsi_bulk_in_ep_desc = mock_msc_scsi_bulk_in_ep_desc_fs;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user