VSF Documented
|
#include "component/usb/vsf_usb_cfg.h"
#include "kernel/vsf_kernel.h"
#include "component/usb/host/vsf_usbh.h"
#include "./vsf_libusb_hcd.h"
#include "utilities/ooc_class.h"
#include "libusb.h"
Data Structures | |
struct | libusb_device_descriptor |
struct | libusb_config_descriptor |
struct | vk_libusb_hcd_dev_t |
struct | vk_libusb_hcd_t |
struct | vk_libusb_hcd_urb_t |
Macros | |
#define | __VSF_USBH_CLASS_IMPLEMENT_HCD__ |
#define | __VSF_USBH_CLASS_IMPLEMENT_HUB__ |
#define | __VSF_EDA_CLASS_INHERIT__ |
#define | LIBUSB_CALL |
#define | libusb_hotplug_register_callback(...) (LIBUSB_ERROR_NOT_SUPPORTED) |
#define | libusb_has_capability(...) (false) |
#define | libusb_close usb_close |
#define | libusb_reset_device |
#define | libusb_claim_interface usb_claim_interface |
#define | libusb_control_transfer usb_control_msg |
#define | libusb_get_device_speed(__dev) (LIBUSB_SPEED_UNKNOWN) |
#define | libusb_get_device(__handle) ((libusb_device *)usb_device(__handle)) |
#define | VSF_EVT_LIBUSB_HCD_BASE ((VSF_EVT_USER + 0x100) & ~0xFF) |
#define | VSF_LIBUSB_HCD_DEF_DEV(__N, __BIT) |
Typedefs | |
typedef usb_dev_handle | libusb_device_handle |
typedef struct usb_device | libusb_device |
typedef void * | libusb_context |
typedef struct vk_libusb_hcd_dev_t | vk_libusb_hcd_dev_t |
typedef struct vk_libusb_hcd_t | vk_libusb_hcd_t |
typedef struct vk_libusb_hcd_urb_t | vk_libusb_hcd_urb_t |
typedef enum vk_libusb_hcd_evt_t | vk_libusb_hcd_evt_t |
Enumerations | |
enum | libusb_error { LIBUSB_SUCCESS = 0 , LIBUSB_ERROR_IO = -1 , LIBUSB_ERROR_INVALID_PARAM = -2 , LIBUSB_ERROR_ACCESS = -3 , LIBUSB_ERROR_NO_DEVICE = -4 , LIBUSB_ERROR_NOT_FOUND = -5 , LIBUSB_ERROR_BUSY = -6 , LIBUSB_ERROR_TIMEOUT = -7 , LIBUSB_ERROR_OVERFLOW = -8 , LIBUSB_ERROR_PIPE = -9 , LIBUSB_ERROR_INTERRUPTED = -10 , LIBUSB_ERROR_NO_MEM = -11 , LIBUSB_ERROR_NOT_SUPPORTED = -12 , LIBUSB_ERROR_OTHER = -99 } |
enum | libusb_hotplug_event { LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED = 0x01U , LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT = 0x02U } |
enum | libusb_speed { LIBUSB_SPEED_UNKNOWN , LIBUSB_SPEED_LOW , LIBUSB_SPEED_FULL , LIBUSB_SPEED_HIGH , LIBUSB_SPEED_SUPER , LIBUSB_SPEED_SUPER_PLUS } |
enum | vk_libusb_hcd_evt_t { VSF_EVT_LIBUSB_HCD_ATTACH = VSF_EVT_LIBUSB_HCD_BASE + 0x100 , VSF_EVT_LIBUSB_HCD_DETACH = VSF_EVT_LIBUSB_HCD_BASE + 0x200 , VSF_EVT_LIBUSB_HCD_READY = VSF_EVT_LIBUSB_HCD_BASE + 0x300 } |
Functions | |
int LIBUSB_CALL | libusb_init (libusb_context **ctx) |
libusb_device_handle *LIBUSB_CALL | libusb_open_device_with_vid_pid (libusb_context *ctx, uint16_t vendor_id, uint16_t product_id) |
int LIBUSB_CALL | libusb_get_config_descriptor_by_value (libusb_device *dev, uint8_t bConfigurationValue, struct libusb_config_descriptor **config) |
void LIBUSB_CALL | libusb_free_config_descriptor (struct libusb_config_descriptor *config) |
int LIBUSB_CALL | libusb_bulk_transfer (libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *actual_length, unsigned int timeout) |
int LIBUSB_CALL | libusb_interrupt_transfer (libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *actual_length, unsigned int timeout) |
Variables | |
const vk_usbh_hcd_drv_t | vk_libusb_hcd_drv |
#define __VSF_USBH_CLASS_IMPLEMENT_HCD__ |
#define __VSF_USBH_CLASS_IMPLEMENT_HUB__ |
#define __VSF_EDA_CLASS_INHERIT__ |
#define LIBUSB_CALL |
#define libusb_hotplug_register_callback | ( | ... | ) | (LIBUSB_ERROR_NOT_SUPPORTED) |
#define libusb_has_capability | ( | ... | ) | (false) |
#define libusb_close usb_close |
#define libusb_reset_device |
#define libusb_claim_interface usb_claim_interface |
#define libusb_control_transfer usb_control_msg |
#define libusb_get_device_speed | ( | __dev | ) | (LIBUSB_SPEED_UNKNOWN) |
#define libusb_get_device | ( | __handle | ) | ((libusb_device *)usb_device(__handle)) |
#define VSF_EVT_LIBUSB_HCD_BASE ((VSF_EVT_USER + 0x100) & ~0xFF) |
#define VSF_LIBUSB_HCD_DEF_DEV | ( | __N, | |
__BIT | |||
) |
typedef usb_dev_handle libusb_device_handle |
typedef struct usb_device libusb_device |
typedef void* libusb_context |
typedef struct vk_libusb_hcd_dev_t vk_libusb_hcd_dev_t |
typedef struct vk_libusb_hcd_t vk_libusb_hcd_t |
typedef struct vk_libusb_hcd_urb_t vk_libusb_hcd_urb_t |
typedef enum vk_libusb_hcd_evt_t vk_libusb_hcd_evt_t |
enum libusb_error |
enum libusb_hotplug_event |
enum libusb_speed |
enum vk_libusb_hcd_evt_t |
int LIBUSB_CALL libusb_init | ( | libusb_context ** | ctx | ) |
libusb_device_handle *LIBUSB_CALL libusb_open_device_with_vid_pid | ( | libusb_context * | ctx, |
uint16_t | vendor_id, | ||
uint16_t | product_id | ||
) |
int LIBUSB_CALL libusb_get_config_descriptor_by_value | ( | libusb_device * | dev, |
uint8_t | bConfigurationValue, | ||
struct libusb_config_descriptor ** | config | ||
) |
void LIBUSB_CALL libusb_free_config_descriptor | ( | struct libusb_config_descriptor * | config | ) |
int LIBUSB_CALL libusb_bulk_transfer | ( | libusb_device_handle * | dev_handle, |
unsigned char | endpoint, | ||
unsigned char * | data, | ||
int | length, | ||
int * | actual_length, | ||
unsigned int | timeout | ||
) |
int LIBUSB_CALL libusb_interrupt_transfer | ( | libusb_device_handle * | dev_handle, |
unsigned char | endpoint, | ||
unsigned char * | data, | ||
int | length, | ||
int * | actual_length, | ||
unsigned int | timeout | ||
) |
const vk_usbh_hcd_drv_t vk_libusb_hcd_drv |