VSF Documented
|
#include "component/usb/vsf_usb_cfg.h"
#include "../common/usb_common.h"
#include "../common/usb_desc.h"
#include "kernel/vsf_kernel.h"
#include "./extension/bos/vsf_usbd_bos.h"
#include "./extension/winusb/vsf_usbd_winusb.h"
#include "./extension/webusb/vsf_usbd_webusb.h"
#include "./extension/ms/vsf_usbd_ms.h"
#include "hal/vsf_hal.h"
#include "../driver/otg/musb/fdrc/vsf_musb_fdrc_dcd.h"
#include "../driver/otg/dwcotg/vsf_dwcotg_dcd.h"
#include "../driver/dcd/usbip_dcd/vsf_usbip_dcd.h"
#include "./vsf_usbd_drv_ifs.h"
#include "utilities/ooc_class.h"
Go to the source code of this file.
Data Structures | |
struct | vk_usbd_desc_t |
class | vk_usbd_trans_t |
struct | vk_usbd_ctrl_handler_t |
Macros | |
#define | __VSF_CLASS_INHERIT__ |
#define | VSF_USBD_CFG_AUTOSETUP ENABLED |
#define | VSF_USBD_CFG_USE_EDA VSF_USE_KERNEL |
#define | VSF_USBD_CFG_EDA_PRIORITY vsf_prio_0 |
#define | VSF_USBD_CFG_HW_PRIORITY vsf_arch_prio_0 |
#define | VSF_USBD_DESC_DEVICE(__DESC, __SIZE) {USB_DT_DEVICE, 0, 0, (__SIZE), (uint8_t*)(__DESC)} |
#define | VSF_USBD_DESC_CONFIG(__INDEX, __DESC, __SIZE) {USB_DT_CONFIG, (__INDEX), 0, (__SIZE), (uint8_t*)(__DESC)} |
#define | VSF_USBD_DESC_STRING(__LANGID, __INDEX, __DESC, __SIZE) {USB_DT_STRING, (__INDEX), (__LANGID), (__SIZE), (uint8_t*)(__DESC)} |
#define | VSF_USBD_DESC_QUALIFIER(__DESC) {USB_DT_DEVICE_QUALIFIER, 0, 0, USB_DT_DEVICE_QUALIFIER_SIZE, (uint8_t*)(__DESC)} |
#define | __USB_IFS(__DRV, __PARAM) |
#define | USB_IFS(__DRV, __PARAM) __USB_IFS((__DRV), (__PARAM)) |
#define | usb_unicode_t wchar_t |
#define | __describe_usbd_version_langid_bcd_ver( __name, __vid, __pid, __speed, __version, __lang_id, __bcd_ver) |
#define | __describe_usbd_version_langid( __name, __vid, __pid, __speed, __version, __lang_id) __describe_usbd_version_langid_bcd_ver(__name, __vid, __pid, __speed, __version, __lang_id, 0x0100) |
#define | __describe_usbd_version(__name, __vid, __pid, __speed, __version) __describe_usbd_version_langid(__name, __vid, __pid, __speed, __version, 0x0409) |
#define | __describe_usbd( __name, __vid, __pid, __speed) __describe_usbd_version(__name, __vid, __pid, __speed, 0x0200) |
#define | __describe_usbd4 __describe_usbd |
#define | __describe_usbd5 __describe_usbd_version |
#define | __describe_usbd6 __describe_usbd_version_langid |
#define | __describe_usbd7 __describe_usbd_version_langid_bcd_ver |
#define | __usbd_str_desc(__name, __type, __str) |
#define | usbd_str_desc(__name, __type, __str) __usbd_str_desc(__name, __type, __str) |
#define | __usbd_str_product_desc(__name, __str_product) __usbd_str_desc(__name, product, __str_product) |
#define | usbd_str_product_desc(__name, __str_product) __usbd_str_product_desc(__name, __str_product) |
#define | __usbd_str_vendor_desc(__name, __str_vendor) __usbd_str_desc(__name, vendor, __str_vendor) |
#define | usbd_str_vendor_desc(__name, __str_vendor) __usbd_str_vendor_desc(__name, __str_vendor) |
#define | __usbd_str_serial_desc(__name, __str_serial) __usbd_str_desc(__name, serial, __str_serial) |
#define | usbd_str_serial_desc(__name, __str_serial) __usbd_str_serial_desc(__name, __str_serial) |
#define | __usbd_str_langid_desc(__name) |
#define | usbd_str_langid_desc(__name) __usbd_str_langid_desc(__name) |
#define | __usbd_device_iad_desc(__name) |
#define | usbd_device_iad_desc(__name) __usbd_device_iad_desc(__name) |
#define | __usbd_device_desc(__name, __class, __subclass, __protocol) |
#define | usbd_device_desc(__name, __class, __subclass, __protocol) __usbd_device_desc(__name, (__class), (__subclass), (__protocol)) |
#define | __usbd_config_desc(__name, __func_desc_size, __func_ifs_num, __attribute, __max_power_ma) |
#define | usbd_config_desc(__name, __func_desc_size, __func_ifs_num, __attribute, __max_power_ma) __usbd_config_desc(__name, (__func_desc_size), (__func_ifs_num), (__attribute), (__max_power_ma)) |
#define | __usbd_basic_desc(__name, __func_ifs_num, __ep0_size) |
#define | usbd_basic_desc(__name, __func_ifs_num, __ep0_size) __usbd_basic_desc(__name, (__func_ifs_num), (__ep0_size)) |
#define | __usbd_common_desc( __name, __str_product, __str_vendor, __str_serial, __class, __subclass, __protocol, __ep0_size, __func_desc_size, __func_ifs_num, __attribute, __max_power_ma) |
#define | __usbd_common_desc_iad( __name, __str_product, __str_vendor, __str_serial, __ep0_size, __func_desc_size, __func_ifs_num, __attribute, __max_power_ma) __usbd_common_desc(__name, (__str_product), (__str_vendor), (__str_serial), USB_CLASS_MISC, 0x02, 0x01, (__ep0_size), (__func_desc_size), (__func_ifs_num), (__attribute), (__max_power_ma)) |
#define | __usbd_func_str_desc(__name, __func_id, __str_func) __usbd_str_desc(__name, func##__func_id, __str_func) |
#define | __usbd_qualifier_desc(__name) |
#define | __usbd_std_desc_table(__name) |
#define | __usbd_str_desc_table4(__name, __index, __type, __langid) VSF_USBD_DESC_STRING((__langid), (__index), &__##__name##_str_##__type, sizeof(__##__name##_str_##__type)), |
#define | __usbd_str_desc_table3(__name, __index, __type) VSF_USBD_DESC_STRING(__##__name##_langid, (__index), &__##__name##_str_##__type, sizeof(__##__name##_str_##__type)), |
#define | usbd_str_desc_table(__name, __index, __type, ...) __PLOOC_EVAL(__usbd_str_desc_table, __name, __index, __type, ##__VA_ARGS__)(__name, (__index), __type, ##__VA_ARGS__) |
#define | __usbd_func_str_desc_table_langid(__name, __func_id, __lang_id) VSF_USBD_DESC_STRING((__lang_id), 4 + __func_id, &__##__name##_str_func##__func_id, sizeof(__##__name##_str_func##__func_id)), |
#define | __usbd_func_str_desc_table(__name, __func_id) __usbd_func_str_desc_table_langid(__name, __func_id, __##__name##_langid) |
#define | __usbd_func_str_desc_table2 __usbd_func_str_desc_table |
#define | __usbd_func_str_desc_table3 __usbd_func_str_desc_table_langid |
#define | __usbd_qualifier_desc_table(__name) VSF_USBD_DESC_QUALIFIER(&__##__name##_qualifier_desc), |
#define | __usbd_ifs(__name) vk_usbd_ifs_t __##__name##_ifs[__##__name##_ifsnum] = { |
#define | __end_describe_usbd(__name, __drv, ...) |
#define | describe_usbd(__name, __vid, __pid, __speed, ...) |
#define | usbd_common_desc_iad(__name, __str_product, __str_vendor, __str_serial, __ep0_size, __func_desc_size, __func_ifs_num, __attribute, __max_power_ma, ...) |
#define | usbd_common_desc(__name, __str_product, __str_vendor, __str_serial, __class, __subclass, __protocol, __ep0_size, __func_desc_size, __func_ifs_num, __attribute, __max_power_ma, ...) |
#define | usbd_func_str_desc(__name, __func_id, __str_func) __usbd_func_str_desc(__name, __func_id, __str_func) |
#define | usbd_qualifier_desc(__name) __usbd_qualifier_desc(__name) |
#define | usbd_std_desc_table(__name, ...) |
#define | usbd_func_str_desc_table(__name, __func_id, ...) __PLOOC_EVAL(__usbd_func_str_desc_table, __name, __func_id, ##__VA_ARGS__)(__name, __func_id, ##__VA_ARGS__) |
#define | usbd_qualifier_desc_table(__name) __usbd_qualifier_desc_table(__name) |
#define | usbd_func(__name, ...) __VA_ARGS__ |
#define | usbd_ifs(__name, ...) |
#define | end_describe_usbd(__name, __drv, ...) __end_describe_usbd(__name, (__drv), ##__VA_ARGS__) |
Typedefs | |
typedef enum vk_usbd_evt_t | vk_usbd_evt_t |
typedef struct vk_usbd_desc_t | vk_usbd_desc_t |
typedef struct vk_usbd_ctrl_handler_t | vk_usbd_ctrl_handler_t |
Enumerations | |
enum | vk_usbd_evt_t { USB_ON_INIT = USB_USR_EVT + 0 , USB_ON_FINI = USB_USR_EVT + 1 , USB_ON_STATUS_QUERY = USB_USR_EVT + 2 , VSF_USBD_MAX_EVT } |
#define __VSF_CLASS_INHERIT__ |
#define VSF_USBD_CFG_AUTOSETUP ENABLED |
#define VSF_USBD_CFG_USE_EDA VSF_USE_KERNEL |
#define VSF_USBD_CFG_EDA_PRIORITY vsf_prio_0 |
#define VSF_USBD_CFG_HW_PRIORITY vsf_arch_prio_0 |
#define VSF_USBD_DESC_DEVICE | ( | __DESC, | |
__SIZE | |||
) | {USB_DT_DEVICE, 0, 0, (__SIZE), (uint8_t*)(__DESC)} |
#define VSF_USBD_DESC_CONFIG | ( | __INDEX, | |
__DESC, | |||
__SIZE | |||
) | {USB_DT_CONFIG, (__INDEX), 0, (__SIZE), (uint8_t*)(__DESC)} |
#define VSF_USBD_DESC_STRING | ( | __LANGID, | |
__INDEX, | |||
__DESC, | |||
__SIZE | |||
) | {USB_DT_STRING, (__INDEX), (__LANGID), (__SIZE), (uint8_t*)(__DESC)} |
#define VSF_USBD_DESC_QUALIFIER | ( | __DESC | ) | {USB_DT_DEVICE_QUALIFIER, 0, 0, USB_DT_DEVICE_QUALIFIER_SIZE, (uint8_t*)(__DESC)} |
#define __USB_IFS | ( | __DRV, | |
__PARAM | |||
) |
#define USB_IFS | ( | __DRV, | |
__PARAM | |||
) | __USB_IFS((__DRV), (__PARAM)) |
#define usb_unicode_t wchar_t |
#define __describe_usbd_version_langid_bcd_ver | ( | __name, | |
__vid, | |||
__pid, | |||
__speed, | |||
__version, | |||
__lang_id, | |||
__bcd_ver | |||
) |
#define __describe_usbd_version_langid | ( | __name, | |
__vid, | |||
__pid, | |||
__speed, | |||
__version, | |||
__lang_id | |||
) | __describe_usbd_version_langid_bcd_ver(__name, __vid, __pid, __speed, __version, __lang_id, 0x0100) |
#define __describe_usbd_version | ( | __name, | |
__vid, | |||
__pid, | |||
__speed, | |||
__version | |||
) | __describe_usbd_version_langid(__name, __vid, __pid, __speed, __version, 0x0409) |
#define __describe_usbd | ( | __name, | |
__vid, | |||
__pid, | |||
__speed | |||
) | __describe_usbd_version(__name, __vid, __pid, __speed, 0x0200) |
#define __describe_usbd4 __describe_usbd |
#define __describe_usbd5 __describe_usbd_version |
#define __describe_usbd6 __describe_usbd_version_langid |
#define __describe_usbd7 __describe_usbd_version_langid_bcd_ver |
#define usbd_str_desc | ( | __name, | |
__type, | |||
__str | |||
) | __usbd_str_desc(__name, __type, __str) |
#define __usbd_str_product_desc | ( | __name, | |
__str_product | |||
) | __usbd_str_desc(__name, product, __str_product) |
#define usbd_str_product_desc | ( | __name, | |
__str_product | |||
) | __usbd_str_product_desc(__name, __str_product) |
#define __usbd_str_vendor_desc | ( | __name, | |
__str_vendor | |||
) | __usbd_str_desc(__name, vendor, __str_vendor) |
#define usbd_str_vendor_desc | ( | __name, | |
__str_vendor | |||
) | __usbd_str_vendor_desc(__name, __str_vendor) |
#define __usbd_str_serial_desc | ( | __name, | |
__str_serial | |||
) | __usbd_str_desc(__name, serial, __str_serial) |
#define usbd_str_serial_desc | ( | __name, | |
__str_serial | |||
) | __usbd_str_serial_desc(__name, __str_serial) |
#define __usbd_str_langid_desc | ( | __name | ) |
#define usbd_str_langid_desc | ( | __name | ) | __usbd_str_langid_desc(__name) |
#define __usbd_device_iad_desc | ( | __name | ) |
#define usbd_device_iad_desc | ( | __name | ) | __usbd_device_iad_desc(__name) |
#define __usbd_device_desc | ( | __name, | |
__class, | |||
__subclass, | |||
__protocol | |||
) |
#define usbd_device_desc | ( | __name, | |
__class, | |||
__subclass, | |||
__protocol | |||
) | __usbd_device_desc(__name, (__class), (__subclass), (__protocol)) |
#define __usbd_config_desc | ( | __name, | |
__func_desc_size, | |||
__func_ifs_num, | |||
__attribute, | |||
__max_power_ma | |||
) |
#define usbd_config_desc | ( | __name, | |
__func_desc_size, | |||
__func_ifs_num, | |||
__attribute, | |||
__max_power_ma | |||
) | __usbd_config_desc(__name, (__func_desc_size), (__func_ifs_num), (__attribute), (__max_power_ma)) |
#define __usbd_basic_desc | ( | __name, | |
__func_ifs_num, | |||
__ep0_size | |||
) |
#define usbd_basic_desc | ( | __name, | |
__func_ifs_num, | |||
__ep0_size | |||
) | __usbd_basic_desc(__name, (__func_ifs_num), (__ep0_size)) |
#define __usbd_common_desc | ( | __name, | |
__str_product, | |||
__str_vendor, | |||
__str_serial, | |||
__class, | |||
__subclass, | |||
__protocol, | |||
__ep0_size, | |||
__func_desc_size, | |||
__func_ifs_num, | |||
__attribute, | |||
__max_power_ma | |||
) |
#define __usbd_common_desc_iad | ( | __name, | |
__str_product, | |||
__str_vendor, | |||
__str_serial, | |||
__ep0_size, | |||
__func_desc_size, | |||
__func_ifs_num, | |||
__attribute, | |||
__max_power_ma | |||
) | __usbd_common_desc(__name, (__str_product), (__str_vendor), (__str_serial), USB_CLASS_MISC, 0x02, 0x01, (__ep0_size), (__func_desc_size), (__func_ifs_num), (__attribute), (__max_power_ma)) |
#define __usbd_func_str_desc | ( | __name, | |
__func_id, | |||
__str_func | |||
) | __usbd_str_desc(__name, func##__func_id, __str_func) |
#define __usbd_qualifier_desc | ( | __name | ) |
#define __usbd_std_desc_table | ( | __name | ) |
#define __usbd_str_desc_table4 | ( | __name, | |
__index, | |||
__type, | |||
__langid | |||
) | VSF_USBD_DESC_STRING((__langid), (__index), &__##__name##_str_##__type, sizeof(__##__name##_str_##__type)), |
#define __usbd_str_desc_table3 | ( | __name, | |
__index, | |||
__type | |||
) | VSF_USBD_DESC_STRING(__##__name##_langid, (__index), &__##__name##_str_##__type, sizeof(__##__name##_str_##__type)), |
#define usbd_str_desc_table | ( | __name, | |
__index, | |||
__type, | |||
... | |||
) | __PLOOC_EVAL(__usbd_str_desc_table, __name, __index, __type, ##__VA_ARGS__)(__name, (__index), __type, ##__VA_ARGS__) |
#define __usbd_func_str_desc_table_langid | ( | __name, | |
__func_id, | |||
__lang_id | |||
) | VSF_USBD_DESC_STRING((__lang_id), 4 + __func_id, &__##__name##_str_func##__func_id, sizeof(__##__name##_str_func##__func_id)), |
#define __usbd_func_str_desc_table | ( | __name, | |
__func_id | |||
) | __usbd_func_str_desc_table_langid(__name, __func_id, __##__name##_langid) |
#define __usbd_func_str_desc_table2 __usbd_func_str_desc_table |
#define __usbd_func_str_desc_table3 __usbd_func_str_desc_table_langid |
#define __usbd_qualifier_desc_table | ( | __name | ) | VSF_USBD_DESC_QUALIFIER(&__##__name##_qualifier_desc), |
#define __end_describe_usbd | ( | __name, | |
__drv, | |||
... | |||
) |
#define describe_usbd | ( | __name, | |
__vid, | |||
__pid, | |||
__speed, | |||
... | |||
) |
#define usbd_common_desc_iad | ( | __name, | |
__str_product, | |||
__str_vendor, | |||
__str_serial, | |||
__ep0_size, | |||
__func_desc_size, | |||
__func_ifs_num, | |||
__attribute, | |||
__max_power_ma, | |||
... | |||
) |
#define usbd_common_desc | ( | __name, | |
__str_product, | |||
__str_vendor, | |||
__str_serial, | |||
__class, | |||
__subclass, | |||
__protocol, | |||
__ep0_size, | |||
__func_desc_size, | |||
__func_ifs_num, | |||
__attribute, | |||
__max_power_ma, | |||
... | |||
) |
#define usbd_func_str_desc | ( | __name, | |
__func_id, | |||
__str_func | |||
) | __usbd_func_str_desc(__name, __func_id, __str_func) |
#define usbd_qualifier_desc | ( | __name | ) | __usbd_qualifier_desc(__name) |
#define usbd_std_desc_table | ( | __name, | |
... | |||
) |
#define usbd_func_str_desc_table | ( | __name, | |
__func_id, | |||
... | |||
) | __PLOOC_EVAL(__usbd_func_str_desc_table, __name, __func_id, ##__VA_ARGS__)(__name, __func_id, ##__VA_ARGS__) |
#define usbd_qualifier_desc_table | ( | __name | ) | __usbd_qualifier_desc_table(__name) |
#define usbd_func | ( | __name, | |
... | |||
) | __VA_ARGS__ |
#define usbd_ifs | ( | __name, | |
... | |||
) |
#define end_describe_usbd | ( | __name, | |
__drv, | |||
... | |||
) | __end_describe_usbd(__name, (__drv), ##__VA_ARGS__) |
typedef enum vk_usbd_evt_t vk_usbd_evt_t |
typedef struct vk_usbd_desc_t vk_usbd_desc_t |
typedef struct vk_usbd_ctrl_handler_t vk_usbd_ctrl_handler_t |
enum vk_usbd_evt_t |