18#ifndef __VSF_DWCOTG_DCD_H__
19#define __VSF_DWCOTG_DCD_H__
25#if VSF_USE_USB_DEVICE == ENABLED && VSF_USBD_USE_DCD_DWCOTG == ENABLED
29#if defined(__VSF_DWCOTG_DCD_CLASS_IMPLEMENT)
30# undef __VSF_DWCOTG_DCD_CLASS_IMPLEMENT
31# define __VSF_CLASS_IMPLEMENT__
43#define vsf_usb_dc_from_dwcotg_ip(__n, __obj, __drv_name) \
44 __USB_DC_FROM_IP(__n, (__obj), __drv_name, vk_dwcotg_dcd)
49 const i_usb_dc_ip_t *
op;
vsf_err_t
Definition __type.h:42
Definition vsf_dwcotg_dcd.h:79
Definition vsf_dwcotg_dcd.h:63
unsigned short uint16_t
Definition lvgl.h:41
unsigned int uint32_t
Definition lvgl.h:43
unsigned char uint8_t
Definition lvgl.h:40
#define vsf_class(__name)
Definition ooc_class.h:48
unsigned char uint_fast8_t
Definition stdint.h:23
unsigned int uint_fast32_t
Definition stdint.h:27
unsigned short uint_fast16_t
Definition stdint.h:25
Definition vsf_template_usb.h:316
Definition vsf_template_usb.h:408
Definition vsf_dwcotg_dcd.h:53
void(* phy_init)(void *usb_param, vk_dwcotg_dcd_param_t *param)
Definition vsf_dwcotg_dcd.h:59
void * param
Definition vsf_dwcotg_dcd.h:58
usb_dc_ip_info_t vk_dwcotg_hw_info_t struct vk_dwcotg_dc_ip_info_t::@238 vendor
Definition vsf_dwcotg_dcd.h:48
const i_usb_dc_ip_t * op
Definition vsf_dwcotg_dcd.h:49
Definition vsf_dwcotg_hw.h:38
Definition vsf_dwcotg_common.h:49
Definition vsf_dwcotg_common.h:88
vk_av_control_type_t type
Definition vsf_audio.h:170
#define VSF_DWCOTG_DCD_CFG_EP_NUM
Definition vsf_dwcotg_common.h:42
void vk_dwcotg_dcd_get_setup(vk_dwcotg_dcd_t *dwcotg_dcd, uint8_t *buffer)
Definition vsf_dwcotg_dcd.c:213
vsf_err_t vk_dwcotg_dcd_ep_add(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep, usb_ep_type_t type, uint_fast16_t size)
Definition vsf_dwcotg_dcd.c:247
vsf_err_t vk_dwcotg_dcd_ep_transfer_recv(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep, uint8_t *buffer, uint_fast32_t size)
Definition vsf_dwcotg_dcd.c:538
vsf_err_t vk_dwcotg_dcd_init(vk_dwcotg_dcd_t *dwcotg_dcd, usb_dc_cfg_t *cfg)
Definition vsf_dwcotg_dcd.c:73
vsf_err_t vk_dwcotg_dcd_ep_transaction_set_data_size(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep, uint_fast16_t size)
Definition vsf_dwcotg_dcd.c:396
void vk_dwcotg_dcd_irq(vk_dwcotg_dcd_t *dwcotg_dcd)
Definition vsf_dwcotg_dcd.c:655
vsf_err_t vk_dwcotg_dcd_ep_transaction_read_buffer(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep, uint8_t *buffer, uint_fast16_t size)
Definition vsf_dwcotg_dcd.c:384
vsf_err_t vk_dwcotg_dcd_ep_set_stall(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep)
Definition vsf_dwcotg_dcd.c:343
uint_fast16_t vk_dwcotg_dcd_get_frame_number(vk_dwcotg_dcd_t *dwcotg_dcd)
Definition vsf_dwcotg_dcd.c:203
vsf_err_t vk_dwcotg_dcd_ep_transaction_write_buffer(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep, uint8_t *buffer, uint_fast16_t size)
Definition vsf_dwcotg_dcd.c:402
uint_fast8_t vk_dwcotg_dcd_ep_get_feature(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep, uint_fast8_t feature)
Definition vsf_dwcotg_dcd.c:235
void vk_dwcotg_dcd_connect(vk_dwcotg_dcd_t *dwcotg_dcd)
Definition vsf_dwcotg_dcd.c:179
uint_fast8_t vk_dwcotg_dcd_get_mframe_number(vk_dwcotg_dcd_t *dwcotg_dcd)
Definition vsf_dwcotg_dcd.c:208
void vk_dwcotg_dcd_fini(vk_dwcotg_dcd_t *dwcotg_dcd)
Definition vsf_dwcotg_dcd.c:156
void vk_dwcotg_dcd_wakeup(vk_dwcotg_dcd_t *dwcotg_dcd)
Definition vsf_dwcotg_dcd.c:189
void vk_dwcotg_dcd_reset(vk_dwcotg_dcd_t *dwcotg_dcd, usb_dc_cfg_t *cfg)
Definition vsf_dwcotg_dcd.c:161
void vk_dwcotg_dcd_disconnect(vk_dwcotg_dcd_t *dwcotg_dcd)
Definition vsf_dwcotg_dcd.c:184
uint_fast32_t vk_dwcotg_dcd_ep_get_data_size(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep)
Definition vsf_dwcotg_dcd.c:482
uint_fast16_t vk_dwcotg_dcd_ep_get_size(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep)
Definition vsf_dwcotg_dcd.c:323
vsf_err_t vk_dwcotg_dcd_ep_clear_stall(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep)
Definition vsf_dwcotg_dcd.c:373
uint_fast8_t vk_dwcotg_dcd_get_address(vk_dwcotg_dcd_t *dwcotg_dcd)
Definition vsf_dwcotg_dcd.c:198
ctrl_transfer_state_t
Definition vsf_dwcotg_dcd.h:73
@ DWCOTG_SETUP_STAGE
Definition vsf_dwcotg_dcd.h:74
@ DWCOTG_DATA_STAGE
Definition vsf_dwcotg_dcd.h:75
@ DWCOTG_STATUS_STAGE
Definition vsf_dwcotg_dcd.h:76
bool vk_dwcotg_dcd_ep_is_stalled(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep)
Definition vsf_dwcotg_dcd.c:363
vsf_err_t vk_dwcotg_dcd_ep_transfer_send(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep, uint8_t *buffer, uint_fast32_t size, bool zlp)
Definition vsf_dwcotg_dcd.c:619
void vk_dwcotg_dcd_set_address(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t addr)
Definition vsf_dwcotg_dcd.c:193
void vk_dwcotg_dcd_status_stage(vk_dwcotg_dcd_t *dwcotg_dcd, bool is_in)
Definition vsf_dwcotg_dcd.c:218
vsf_err_t vk_dwcotg_dcd_ep_transaction_enable_out(vk_dwcotg_dcd_t *dwcotg_dcd, uint_fast8_t ep)
Definition vsf_dwcotg_dcd.c:390
uint32_t size
Definition vsf_memfs.h:50
usb_ep_type_t
Definition vsf_template_usb.h:277
void(* usb_dc_evthandler_t)(void *param, usb_evt_t evt, uint_fast8_t value)
Definition vsf_template_usb.h:309