mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-02 10:00:57 +02:00
fix(usb_host): Run esp-usb pre-commit:
- trailing whitespaces - end-of-file-fixer - codespell - astyle_py: align pointer name
This commit is contained in:
@@ -87,7 +87,7 @@ bLength : 0x22 (34 bytes)
|
|||||||
bDescriptorType : 0x03 (String Descriptor)
|
bDescriptorType : 0x03 (String Descriptor)
|
||||||
wData : " SanDisk 3.2Gen1"
|
wData : " SanDisk 3.2Gen1"
|
||||||
|
|
||||||
----------------------------- String Descriptor Ser ----------------------------
|
----------------------------- String Descriptor Set ----------------------------
|
||||||
bLength : 0xF2 (242 bytes)
|
bLength : 0xF2 (242 bytes)
|
||||||
bDescriptorType : 0x03 (String Descriptor)
|
bDescriptorType : 0x03 (String Descriptor)
|
||||||
wData : "0101cdd1e856b427bbb796f870561a4b2b817af9da9872c8d75217cccdd5d5eccb3a0000000000000000000096abe1a3ff83610095558107aea948b4"
|
wData : "0101cdd1e856b427bbb796f870561a4b2b817af9da9872c8d75217cccdd5d5eccb3a0000000000000000000096abe1a3ff83610095558107aea948b4"
|
||||||
|
@@ -346,4 +346,3 @@ E (121120) USBH: Dev 33 EP 0 STALL
|
|||||||
E (121120) ENUM: Bad transfer status 4: CHECK_CONFIG
|
E (121120) ENUM: Bad transfer status 4: CHECK_CONFIG
|
||||||
E (121120) ENUM: [0:0] CHECK_CONFIG FAILED
|
E (121120) ENUM: [0:0] CHECK_CONFIG FAILED
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@@ -9,4 +9,3 @@ There are three sets of tests in this application:
|
|||||||
3. High-speed: Expects high-speed USB flash disk with 2 bulk endpoints to be connected
|
3. High-speed: Expects high-speed USB flash disk with 2 bulk endpoints to be connected
|
||||||
|
|
||||||
For running these tests locally, you will have to update device definitions (VID, PID, ...) in [dev_msc.c](../common/dev_msc.c) and [dev_hid.c](../common/dev_hid.c).
|
For running these tests locally, you will have to update device definitions (VID, PID, ...) in [dev_msc.c](../common/dev_msc.c) and [dev_hid.c](../common/dev_hid.c).
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||||
*/
|
*/
|
||||||
|
@@ -24,7 +24,7 @@ As a USB stack, a TinyUSB component is used.
|
|||||||
1. USB which accesses the ESP MSC Partition is unplugged initially and the board is powered-on.
|
1. USB which accesses the ESP MSC Partition is unplugged initially and the board is powered-on.
|
||||||
- Result: Host PC can't access the partition over USB MSC. Application example can perform operations (read, write) on partition.
|
- Result: Host PC can't access the partition over USB MSC. Application example can perform operations (read, write) on partition.
|
||||||
2. USB which accesses the ESP MSC Partition is already plugged-in at boot time.
|
2. USB which accesses the ESP MSC Partition is already plugged-in at boot time.
|
||||||
- Result: Host PC recongnize it as removable device and can access the partition over USB MSC. Application example can't perform any operation on partition.
|
- Result: Host PC recognize it as removable device and can access the partition over USB MSC. Application example can't perform any operation on partition.
|
||||||
3. USB which accesses the ESP MSC Partition is plugged-in at boot-up. After boot-up, it is ejected on Host PC manually by user.
|
3. USB which accesses the ESP MSC Partition is plugged-in at boot-up. After boot-up, it is ejected on Host PC manually by user.
|
||||||
- Result: Host PC can't access the partition over USB MSC. Application example can perform operations (read, write) on partition.
|
- Result: Host PC can't access the partition over USB MSC. Application example can perform operations (read, write) on partition.
|
||||||
4. USB which accesses the ESP MSC Partition is plugged-in at boot-up. It is then unplugged(removed) from Host PC manually by user.
|
4. USB which accesses the ESP MSC Partition is plugged-in at boot-up. It is then unplugged(removed) from Host PC manually by user.
|
||||||
|
@@ -14,7 +14,6 @@
|
|||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
|
|
||||||
|
|
||||||
#define MOCK_CHECK(cond, ret_val) ({ \
|
#define MOCK_CHECK(cond, ret_val) ({ \
|
||||||
if (!(cond)) { \
|
if (!(cond)) { \
|
||||||
return (ret_val); \
|
return (ret_val); \
|
||||||
@@ -32,7 +31,6 @@
|
|||||||
#define IS_VALID_ADDRESS(address) ((address) != 0xFF)
|
#define IS_VALID_ADDRESS(address) ((address) != 0xFF)
|
||||||
#define IS_EMPTY_ADDRESS(address) ((address) == 0xFF)
|
#define IS_EMPTY_ADDRESS(address) ((address) == 0xFF)
|
||||||
|
|
||||||
|
|
||||||
const char *MOCK_TAG_CB = "USB MOCK CB"; // Tag for callback functions
|
const char *MOCK_TAG_CB = "USB MOCK CB"; // Tag for callback functions
|
||||||
const char *MOCK_TAG = "USB MOCK"; // Tag for the rest of the functions
|
const char *MOCK_TAG = "USB MOCK"; // Tag for the rest of the functions
|
||||||
|
|
||||||
@@ -56,7 +54,6 @@ typedef struct {
|
|||||||
static device_list_t device_list[MAX_DEV_COUNT];
|
static device_list_t device_list[MAX_DEV_COUNT];
|
||||||
static unsigned mocked_devices_count = 0;
|
static unsigned mocked_devices_count = 0;
|
||||||
|
|
||||||
|
|
||||||
void usb_host_mock_dev_list_init(void)
|
void usb_host_mock_dev_list_init(void)
|
||||||
{
|
{
|
||||||
for (int index = 0; index < MAX_DEV_COUNT; index++) {
|
for (int index = 0; index < MAX_DEV_COUNT; index++) {
|
||||||
|
Reference in New Issue
Block a user