usb_host: Run formatting script

This commit is contained in:
Darian Leung
2023-05-09 00:53:27 +08:00
parent a3e4e9c772
commit ff8c4f79d2
13 changed files with 1604 additions and 1604 deletions

View File

@@ -14,7 +14,7 @@ Warning: The USB Host Library API is still a beta version and may be subject to
#include "freertos/FreeRTOS.h"
#include "esp_err.h"
#include "esp_intr_alloc.h"
//Include the other USB Host Library headers as well
// Include the other USB Host Library headers as well
#include "usb/usb_helpers.h"
#include "usb/usb_types_ch9.h"
#include "usb/usb_types_stack.h"
@@ -34,7 +34,7 @@ extern "C" {
*
* @note Asynchronous API
*/
typedef struct usb_host_client_handle_s * usb_host_client_handle_t;
typedef struct usb_host_client_handle_s *usb_host_client_handle_t;
// ----------------------- Events --------------------------
@@ -116,7 +116,7 @@ typedef struct {
typedef struct {
bool is_synchronous; /**< Whether the client is asynchronous or synchronous or not. Set to false for now. */
int max_num_event_msg; /**< Maximum number of event messages that can be stored (e.g., 3) */
union { //Note: Made into union or future expansion
union { // Note: Made into union or future expansion
struct {
usb_host_client_event_cb_t client_event_callback; /**< Client's event callback function */
void *callback_arg; /**< Event callback function argument */

View File

@@ -346,10 +346,10 @@ ESP_STATIC_ASSERT(sizeof(usb_config_desc_t) == USB_CONFIG_DESC_SIZE, "Size of us
/**
* @brief Bit masks belonging to the bmAttributes field of a configuration descriptor
*/
#define USB_BM_ATTRIBUTES_ONE (1 << 7) //Must be set
#define USB_BM_ATTRIBUTES_SELFPOWER (1 << 6) //Self powered
#define USB_BM_ATTRIBUTES_WAKEUP (1 << 5) //Can wake-up
#define USB_BM_ATTRIBUTES_BATTERY (1 << 4) //Battery powered
#define USB_BM_ATTRIBUTES_ONE (1 << 7) /**< Must be set */
#define USB_BM_ATTRIBUTES_SELFPOWER (1 << 6) /**< Self powered */
#define USB_BM_ATTRIBUTES_WAKEUP (1 << 5) /**< Can wake-up */
#define USB_BM_ATTRIBUTES_BATTERY (1 << 4) /**< Battery powered */
// ---------- Interface Association Descriptor -------------

View File

@@ -43,7 +43,7 @@ typedef enum {
/**
* @brief Handle of a USB Device connected to a USB Host
*/
typedef struct usb_device_handle_s * usb_device_handle_t;
typedef struct usb_device_handle_s *usb_device_handle_t;
/**
* @brief Basic information of an enumerated device
@@ -126,7 +126,7 @@ typedef void (*usb_transfer_cb_t)(usb_transfer_t *transfer);
* @brief USB transfer structure
*
*/
struct usb_transfer_s{
struct usb_transfer_s {
uint8_t *const data_buffer; /**< Pointer to data buffer */
const size_t data_buffer_size; /**< Size of the data buffer in bytes */
int num_bytes; /**< Number of bytes to transfer.