Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
roma-jam authored Jan 17, 2025
1 parent 7610ac5 commit d82c5ba
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
7 changes: 6 additions & 1 deletion device/esp_tinyusb/test_apps/default_task/main/test_tusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,14 @@ void tud_mount_cb(void)
}

/**
* @brief TinyUSB Teardown specific testcase
* @brief TinyUSB Task specific testcase
*
* Scenario:
* 1. Install TinyUSB driver
* 2. Wait tud_mount_cb() until TUSB_DEVICE_DELAY_MS
* 3. Wait TUSB_DEVICE_DELAY_MS
* 4. Teardown TinyUSB
* 5. Release resources
*/
TEST_CASE("tinyusb_default_task_with_init", "[esp_tinyusb][tusb_task]")
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Configure TinyUSB, it will be used to mock USB devices
# Configure TinyUSB
CONFIG_TINYUSB_NO_DEFAULT_TASK=n
CONFIG_TINYUSB_INIT_IN_DEFAULT_TASK=n

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,14 @@ void tud_mount_cb(void)
}

/**
* @brief TinyUSB Teardown specific testcase
* @brief TinyUSB Task specific testcase
*
* Scenario:
* 1. Install TinyUSB driver
* 2. Wait tud_mount_cb() until TUSB_DEVICE_DELAY_MS
* 3. Wait TUSB_DEVICE_DELAY_MS
* 4. Teardown TinyUSB
* 5. Release resources
*/
TEST_CASE("tinyusb_default_task_with_init", "[esp_tinyusb][tusb_task]")
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Configure TinyUSB, it will be used to mock USB devices
# Configure TinyUSB
CONFIG_TINYUSB_NO_DEFAULT_TASK=n
CONFIG_TINYUSB_INIT_IN_DEFAULT_TASK=y

Expand Down
6 changes: 3 additions & 3 deletions device/esp_tinyusb/test_apps/external_task/main/test_tusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ static void test_tusb_external_task(void *arg)
}

/**
* @brief TinyUSB Teardown specific testcase
* @brief TinyUSB Task specific testcase
*
* Scenario:
* 1. Install TinyUSB driver
* 2. Create external TinyUSB task for tud_task()
* 3. Wait tud_mount_cb() for TUSB_DEVICE_DELAY_MS
* 3. Wait tud_mount_cb() until TUSB_DEVICE_DELAY_MS
* 4. Wait TUSB_DEVICE_DELAY_MS
* 5. Teardwon TinyUSB
* 5. Teardown TinyUSB
* 6. Release resources
*
* @note If run the task before installing the tinyusb driver, the external task will lead to cpu starvation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Configure TinyUSB, it will be used to mock USB devices
# Configure TinyUSB
CONFIG_TINYUSB_NO_DEFAULT_TASK=y
CONFIG_TINYUSB_INIT_IN_DEFAULT_TASK=n

Expand Down

0 comments on commit d82c5ba

Please sign in to comment.