tiny_usb: rename Kconfig name

1. Renamed Kconfig file of tinyusb (distinguish tinyusb stack from usb
   peripheral)
2. bugfix/typofix/doc update of tinyusb
This commit is contained in:
morris
2021-07-09 11:15:26 +08:00
parent 2218204aa7
commit 81448dcae8
25 changed files with 589 additions and 497 deletions

View File

@@ -27,9 +27,9 @@ extern "C" {
/* tinyusb uses buffers with type of uint8_t[] but in our driver we are reading them as a 32-bit word */
#if (CFG_TUD_ENDOINT0_SIZE < 4)
# define CFG_TUD_ENDOINT0_SIZE 4
# warning "CFG_TUD_ENDOINT0_SIZE was too low and was set to 4"
#if (CFG_TUD_ENDPOINT0_SIZE < 4)
# define CFG_TUD_ENDPOINT0_SIZE 4
# warning "CFG_TUD_ENDPOINT0_SIZE was too low and was set to 4"
#endif
#if TUSB_OPT_DEVICE_ENABLED
@@ -72,13 +72,30 @@ extern "C" {
*/
typedef struct {
tusb_desc_device_t *descriptor; /*!< Pointer to a device descriptor */
char **string_descriptor; /*!< Pointer to an array of string descriptors */
const char **string_descriptor; /*!< Pointer to an array of string descriptors */
bool external_phy; /*!< Should USB use an external PHY */
} tinyusb_config_t;
/**
* @brief This is an all-in-one helper function, including:
* 1. USB device driver initialization
* 2. Descriptors preparation
* 3. TinyUSB stack initialization
* 4. Creates and start a task to handle usb events
*
* @note Don't change Custom descriptor, but if it has to be done,
* Suggest to define as follows in order to match the Interface Association Descriptor (IAD):
* bDeviceClass = TUSB_CLASS_MISC,
* bDeviceSubClass = MISC_SUBCLASS_COMMON,
*
* @param config tinyusb stack specific configuration
* @retval ESP_ERR_INVALID_ARG Install driver and tinyusb stack failed because of invalid argument
* @retval ESP_FAIL Install driver and tinyusb stack failed because of internal error
* @retval ESP_OK Install driver and tinyusb stack successfully
*/
esp_err_t tinyusb_driver_install(const tinyusb_config_t *config);
// TODO esp_err_t tinyusb_driver_uninstall(void); (IDF-1474)
// TODO esp_err_t tinyusb_driver_uninstall(void); (IDF-1474)
#ifdef __cplusplus
}