usb: Add USB host CDC-ACM class driver

This commit is contained in:
Tomas Rezucha
2021-07-16 10:01:15 +02:00
parent 6e7716bcf7
commit dd1b698075
23 changed files with 2747 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/peripherals/usb/host/cdc/common)
# Set the components to include the tests for.
set(TEST_COMPONENTS "cdc_acm_host" CACHE STRING "List of components to test")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(usb_test_app)

View File

@@ -0,0 +1,14 @@
| Supported Targets | ESP32-S2 | ESP32-S3 |
| ----------------- | -------- | -------- |
# USB Host CDC-ACM driver test project
Main purpose of this application is to test the USB Host CDC-ACM driver.
It tests basic functionality of the driver like open/close/read/write operations,
advanced features like CDC control request, multi-threaded or multi-device access,
as well as reaction to sudden disconnection and other error states.
## Hardware Required
This test expects that TinyUSB dual CDC device with VID = 0x303A and PID = 0x4002
is connected to the USB host.

View File

@@ -0,0 +1,3 @@
idf_component_register(SRCS "usb_test_main.c"
INCLUDE_DIRS ""
REQUIRES unity)

View File

@@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdio.h>
#include <string.h>
#include "unity.h"
void app_main(void)
{
UNITY_BEGIN();
unity_run_all_tests();
UNITY_END();
}