example: peripherals/usb: fix typo naming of local variables

This commit is contained in:
jiangguangming
2022-07-18 11:11:25 +08:00
parent 3c2c9206dd
commit e0d9220a6e
4 changed files with 12 additions and 12 deletions

View File

@@ -103,7 +103,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,
@@ -112,7 +112,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.