VSF Documented
Data Structures | Macros | Typedefs | Functions
usb_host_port.c File Reference
#include "../vsf_espidf_cfg.h"
#include "usb/usb_host.h"
#include "component/usb/host/vsf_usbh.h"
#include "../vsf_espidf.h"
#include "service/trace/vsf_trace.h"
#include "kernel/vsf_kernel.h"
#include <string.h>
#include <stdlib.h>
#include "FreeRTOS.h"
#include "queue.h"
#include "event_groups.h"
#include "semphr.h"
#include "task.h"

Data Structures

struct  __vsf_espidf_usbh_dev_node
 
struct  __vsf_espidf_usbh_client_node
 
struct  __vsf_espidf_usbh
 
struct  __vsf_espidf_usbh_transfer_t
 

Macros

#define __VSF_USBH_CLASS_IMPLEMENT
 
#define VSF_ESPIDF_USBH_TRACE(msg, ...)    vsf_trace_info("espidf_usb: " msg VSF_TRACE_CFG_LINEEND, ##__VA_ARGS__)
 
#define VSF_ESPIDF_CFG_USB_HOST_EVT_QUEUE_DEPTH   16
 

Typedefs

typedef struct __vsf_espidf_usbh_dev_node __vsf_espidf_usbh_dev_node_t
 
typedef struct __vsf_espidf_usbh_client_node __vsf_espidf_usbh_client_node_t
 
typedef struct __vsf_espidf_usbh __vsf_espidf_usbh_t
 

Functions

esp_err_t usb_host_install (const usb_host_config_t *config)
 
esp_err_t usb_host_uninstall (void)
 
esp_err_t usb_host_lib_handle_events (TickType_t timeout, uint32_t *flags)
 
esp_err_t usb_host_lib_info (usb_host_lib_info_t *info)
 
esp_err_t usb_host_device_free_all (void)
 
esp_err_t usb_host_client_register (const usb_host_client_config_t *cfg, usb_host_client_handle_t *out)
 
esp_err_t usb_host_client_deregister (usb_host_client_handle_t hdl)
 
esp_err_t usb_host_client_handle_events (usb_host_client_handle_t hdl, TickType_t timeout)
 
esp_err_t usb_host_client_unblock (usb_host_client_handle_t hdl)
 
esp_err_t usb_host_device_open (usb_host_client_handle_t cli, uint8_t addr, usb_device_handle_t *out)
 
esp_err_t usb_host_device_close (usb_host_client_handle_t cli, usb_device_handle_t hdl)
 
esp_err_t usb_host_device_info (usb_device_handle_t hdl, usb_device_info_t *info)
 
esp_err_t usb_host_get_device_descriptor (usb_device_handle_t hdl, const usb_device_desc_t **out)
 
esp_err_t usb_host_get_active_config_descriptor (usb_device_handle_t hdl, const usb_config_desc_t **out)
 
void usb_print_device_descriptor (const usb_device_desc_t *d)
 
void usb_print_config_descriptor (const usb_config_desc_t *c, const usb_interface_desc_t *i)
 
void usb_print_string_descriptor (const usb_str_desc_t *s)
 
esp_err_t usb_host_transfer_alloc (size_t bufsz, int iso_pkts, usb_transfer_t **out)
 
esp_err_t usb_host_transfer_free (usb_transfer_t *t)
 
esp_err_t usb_host_transfer_submit (usb_transfer_t *t)
 
esp_err_t usb_host_transfer_submit_control (usb_host_client_handle_t cli, usb_device_handle_t hdl, const usb_setup_packet_t *setup, usb_transfer_t *t)
 
esp_err_t usb_host_interface_claim (usb_host_client_handle_t cli, usb_device_handle_t hdl, uint8_t ifs, uint8_t alt)
 
esp_err_t usb_host_interface_release (usb_host_client_handle_t cli, usb_device_handle_t hdl, uint8_t ifs)
 
esp_err_t usb_host_endpoint_halt (usb_device_handle_t hdl, uint8_t ep)
 
esp_err_t usb_host_endpoint_flush (usb_device_handle_t hdl, uint8_t ep)
 

Macro Definition Documentation

◆ __VSF_USBH_CLASS_IMPLEMENT

#define __VSF_USBH_CLASS_IMPLEMENT

◆ VSF_ESPIDF_USBH_TRACE

#define VSF_ESPIDF_USBH_TRACE (   msg,
  ... 
)     vsf_trace_info("espidf_usb: " msg VSF_TRACE_CFG_LINEEND, ##__VA_ARGS__)

◆ VSF_ESPIDF_CFG_USB_HOST_EVT_QUEUE_DEPTH

#define VSF_ESPIDF_CFG_USB_HOST_EVT_QUEUE_DEPTH   16

Typedef Documentation

◆ __vsf_espidf_usbh_dev_node_t

◆ __vsf_espidf_usbh_client_node_t

◆ __vsf_espidf_usbh_t

Function Documentation

◆ usb_host_install()

esp_err_t usb_host_install ( const usb_host_config_t config)

◆ usb_host_uninstall()

esp_err_t usb_host_uninstall ( void  )

◆ usb_host_lib_handle_events()

esp_err_t usb_host_lib_handle_events ( TickType_t  timeout,
uint32_t flags 
)

◆ usb_host_lib_info()

esp_err_t usb_host_lib_info ( usb_host_lib_info_t info)

◆ usb_host_device_free_all()

esp_err_t usb_host_device_free_all ( void  )

◆ usb_host_client_register()

esp_err_t usb_host_client_register ( const usb_host_client_config_t cfg,
usb_host_client_handle_t out 
)

◆ usb_host_client_deregister()

esp_err_t usb_host_client_deregister ( usb_host_client_handle_t  hdl)

◆ usb_host_client_handle_events()

esp_err_t usb_host_client_handle_events ( usb_host_client_handle_t  hdl,
TickType_t  timeout 
)

◆ usb_host_client_unblock()

esp_err_t usb_host_client_unblock ( usb_host_client_handle_t  hdl)

◆ usb_host_device_open()

esp_err_t usb_host_device_open ( usb_host_client_handle_t  cli,
uint8_t  addr,
usb_device_handle_t out 
)

◆ usb_host_device_close()

esp_err_t usb_host_device_close ( usb_host_client_handle_t  cli,
usb_device_handle_t  hdl 
)

◆ usb_host_device_info()

esp_err_t usb_host_device_info ( usb_device_handle_t  hdl,
usb_device_info_t info 
)

◆ usb_host_get_device_descriptor()

esp_err_t usb_host_get_device_descriptor ( usb_device_handle_t  hdl,
const usb_device_desc_t **  out 
)

◆ usb_host_get_active_config_descriptor()

esp_err_t usb_host_get_active_config_descriptor ( usb_device_handle_t  hdl,
const usb_config_desc_t **  out 
)

◆ usb_print_device_descriptor()

void usb_print_device_descriptor ( const usb_device_desc_t d)

◆ usb_print_config_descriptor()

void usb_print_config_descriptor ( const usb_config_desc_t c,
const usb_interface_desc_t i 
)

◆ usb_print_string_descriptor()

void usb_print_string_descriptor ( const usb_str_desc_t *  s)

◆ usb_host_transfer_alloc()

esp_err_t usb_host_transfer_alloc ( size_t  bufsz,
int  iso_pkts,
usb_transfer_t **  out 
)

◆ usb_host_transfer_free()

esp_err_t usb_host_transfer_free ( usb_transfer_t t)

◆ usb_host_transfer_submit()

esp_err_t usb_host_transfer_submit ( usb_transfer_t t)

◆ usb_host_transfer_submit_control()

esp_err_t usb_host_transfer_submit_control ( usb_host_client_handle_t  cli,
usb_device_handle_t  hdl,
const usb_setup_packet_t *  setup,
usb_transfer_t t 
)

◆ usb_host_interface_claim()

esp_err_t usb_host_interface_claim ( usb_host_client_handle_t  cli,
usb_device_handle_t  hdl,
uint8_t  ifs,
uint8_t  alt 
)

◆ usb_host_interface_release()

esp_err_t usb_host_interface_release ( usb_host_client_handle_t  cli,
usb_device_handle_t  hdl,
uint8_t  ifs 
)

◆ usb_host_endpoint_halt()

esp_err_t usb_host_endpoint_halt ( usb_device_handle_t  hdl,
uint8_t  ep 
)

◆ usb_host_endpoint_flush()

esp_err_t usb_host_endpoint_flush ( usb_device_handle_t  hdl,
uint8_t  ep 
)
Generated from commit: vsfteam/vsf@c3767bf