mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/corrected_typo_in_example_peripherals_usb_v4.4' into 'release/v4.4'
example: peripherals/usb: fix typo naming of local variables (backport v4.4) See merge request espressif/esp-idf!19100
This commit is contained in:
commit
d4507a380e
@ -98,7 +98,7 @@ If the CDC option is enabled in Menuconfig, the USB Serial Device could be initi
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
tinyusb_config_cdcacm_t amc_cfg = {
|
||||
tinyusb_config_cdcacm_t acm_cfg = {
|
||||
.usb_dev = TINYUSB_USBDEV_0,
|
||||
.cdc_port = TINYUSB_CDC_ACM_0,
|
||||
.rx_unread_buf_sz = 64,
|
||||
@ -107,7 +107,7 @@ If the CDC option is enabled in Menuconfig, the USB Serial Device could be initi
|
||||
.callback_line_state_changed = NULL,
|
||||
.callback_line_coding_changed = NULL
|
||||
};
|
||||
tusb_cdc_acm_init(&amc_cfg);
|
||||
tusb_cdc_acm_init(&acm_cfg);
|
||||
|
||||
To specify callbacks you can either set the pointer to your :cpp:type:`tusb_cdcacm_callback_t` function in the configuration structure or call :cpp:func:`tinyusb_cdcacm_register_callback` after initialization.
|
||||
|
||||
|
@ -34,8 +34,8 @@ void app_main(void)
|
||||
tinyusb_config_t tusb_cfg = { 0 }; // the configuration uses default values
|
||||
ESP_ERROR_CHECK(tinyusb_driver_install(&tusb_cfg));
|
||||
|
||||
tinyusb_config_cdcacm_t amc_cfg = { 0 }; // the configuration uses default values
|
||||
ESP_ERROR_CHECK(tusb_cdc_acm_init(&amc_cfg));
|
||||
tinyusb_config_cdcacm_t acm_cfg = { 0 }; // the configuration uses default values
|
||||
ESP_ERROR_CHECK(tusb_cdc_acm_init(&acm_cfg));
|
||||
|
||||
ESP_LOGI(TAG, "USB initialization DONE");
|
||||
while (1) {
|
||||
|
@ -54,7 +54,7 @@ void app_main(void)
|
||||
tinyusb_config_t tusb_cfg = {}; // the configuration using default values
|
||||
ESP_ERROR_CHECK(tinyusb_driver_install(&tusb_cfg));
|
||||
|
||||
tinyusb_config_cdcacm_t amc_cfg = {
|
||||
tinyusb_config_cdcacm_t acm_cfg = {
|
||||
.usb_dev = TINYUSB_USBDEV_0,
|
||||
.cdc_port = TINYUSB_CDC_ACM_0,
|
||||
.rx_unread_buf_sz = 64,
|
||||
@ -64,7 +64,7 @@ void app_main(void)
|
||||
.callback_line_coding_changed = NULL
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(tusb_cdc_acm_init(&amc_cfg));
|
||||
ESP_ERROR_CHECK(tusb_cdc_acm_init(&acm_cfg));
|
||||
/* the second way to register a callback */
|
||||
ESP_ERROR_CHECK(tinyusb_cdcacm_register_callback(
|
||||
TINYUSB_CDC_ACM_0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user