gadget-man/cdc_ecm_host

1.0.0

uploaded 2 days ago
USB Host CDC-ECM driver

readme

# USB Host CDC-ECM Class Driver

This component contains an implementation of a USB CDC-ECM Host Class Driver that is implemented on top of the [USB Host Library](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/usb_host.html).

It is based on the USB CDC-ACM Host Class Driver provided by Espressif at https://github.com/espressif/esp-usb/blob/b79a9c25ce77d89e934023205ef184e3be1bd59b/host/class/cdc/usb_host_cdc_acm/

## Supported Devices

The CDC-ECM Host driver supports the following types of CDC devices:

1. CDC-ECM devices (e.g. RealTek 8152 / 8153 usb-to-ethernet devices)



## Usage

The following steps outline the typical API call pattern of the CDC-ACM Class Driver

1. Specify CDC-ECM parameters via `static ece_ecm_params_t cdc_ecm_params`
2. Initialise the CDC-ECM driver by calling `cdc_ecm_init(&cdc_ecm_params)`

```
e.g.:
static cdc_ecm_params_t cdc_ecm_params = {
    .vid = 0x0BDA,
    .pids = {0x8152, 0x8153},
    .event_cb = netif_event_handler,
    .callback_arg = NULL,
    .if_key = "cdc_ecm_host",
    .if_desc = "usb cdc ecm host device",
    .hostname = "Espressif CDC-ECM Host Device"
}
```


## Example

- For an example with a CDC-ECM device Realtek 8152, refer to [cdc-ecm-host-exmaple](https://github.com/gadget-man/cdc-ecm-host-example)

Links

Supports all targets

License: Apache-2.0

To add this component to your project, run:

idf.py add-dependency "gadget-man/cdc_ecm_host^1.0.0"

or download archive

Stats

  • Archive size
    Archive size ~ 32.58 KB
  • Downloaded in total
    Downloaded in total 0 times
  • Downloaded this version
    This version: 0 times

Badge

gadget-man/cdc_ecm_host version: 1.0.0
|