mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
refactor(usb): Rename mock class files
- Rename "test_usb_mock_..." class files to "mock_..." - Fixed some codespell issues - Fixed comment spacing
This commit is contained in:
@@ -17,12 +17,12 @@ static usb_phy_handle_t phy_hdl = NULL;
|
||||
|
||||
void test_usb_init_phy(void)
|
||||
{
|
||||
//Initialize the internal USB PHY to connect to the USB OTG peripheral
|
||||
// Initialize the internal USB PHY to connect to the USB OTG peripheral
|
||||
usb_phy_config_t phy_config = {
|
||||
.controller = USB_PHY_CTRL_OTG,
|
||||
.target = USB_PHY_TARGET_INT,
|
||||
.otg_mode = USB_OTG_MODE_HOST,
|
||||
.otg_speed = USB_PHY_SPEED_UNDEFINED, //In Host mode, the speed is determined by the connected device
|
||||
.otg_speed = USB_PHY_SPEED_UNDEFINED, // In Host mode, the speed is determined by the connected device
|
||||
.ext_io_conf = NULL,
|
||||
.otg_io_conf = NULL,
|
||||
};
|
||||
@@ -31,7 +31,7 @@ void test_usb_init_phy(void)
|
||||
|
||||
void test_usb_deinit_phy(void)
|
||||
{
|
||||
//Deinitialize the internal USB PHY
|
||||
// Deinitialize the internal USB PHY
|
||||
TEST_ASSERT_EQUAL_MESSAGE(ESP_OK, usb_del_phy(phy_hdl), "Failed to delete PHY");
|
||||
phy_hdl = NULL;
|
||||
}
|
||||
@@ -39,7 +39,7 @@ void test_usb_deinit_phy(void)
|
||||
void test_usb_set_phy_state(bool connected, TickType_t delay_ticks)
|
||||
{
|
||||
if (delay_ticks > 0) {
|
||||
//Delay of 0 ticks causes a yield. So skip if delay_ticks is 0.
|
||||
// Delay of 0 ticks causes a yield. So skip if delay_ticks is 0.
|
||||
vTaskDelay(delay_ticks);
|
||||
}
|
||||
ESP_ERROR_CHECK(usb_phy_action(phy_hdl, (connected) ? USB_PHY_ACTION_HOST_ALLOW_CONN : USB_PHY_ACTION_HOST_FORCE_DISCONN));
|
||||
|
Reference in New Issue
Block a user