Go to the source code of this file.
|
#define | USB_DC_SPEED_UNKNOWN 0 |
|
#define | USB_DC_SPEED_LOW 1 |
|
#define | USB_DC_SPEED_FULL 2 |
|
#define | USB_DC_SPEED_HIGH 3 |
|
#define | USB_DC_SPEED_SUPER 4 |
|
#define | __USB_HC_IP_FUNC_DEF(__N, __VALUE) |
|
#define | __USB_HC_IP_INTERFACE_FUNC_DEF(__N, __VALUE) |
|
#define | __USB_HC_IP_BODY_EX(__N, __OBJ, __HEADER) |
|
#define | __USB_HC_IP_BODY(__N, __HEADER) __USB_HC_IP_BODY_EX(__N, USB_HC##__N##_IP, __HEADER) |
|
#define | __USB_OTG_HC_IP_BODY(__N, __HEADER) __USB_HC_IP_BODY_EX(__N, USB_OTG##__N##_IP, __HEADER) |
|
#define | __USB_DC_IP_FUNC_DEF(__N, __VALUE) |
|
#define | __USB_DC_IP_INTERFACE_FUNC_DEF(__N, __VALUE) |
|
#define | __USB_DC_IP_BODY_EX(__N, __OBJ, __HEADER) |
|
#define | __USB_DC_IP_BODY(__N, __HEADER) __USB_DC_IP_BODY_EX(__N, USB_DC##__N##_IP, __HEADER) |
|
#define | __USB_OTG_DC_IP_BODY(__N, __HEADER) __USB_DC_IP_BODY_EX(__N, USB_OTG##__N##_IP, __HEADER) |
|
#define | __USB_DC_FROM_IP(__N, __OBJ, __DRV_NAME, __HEADER) |
|
#define | __USB_DC_FUNC_DEF(__N, __VALUE) |
|
#define | __USB_DC_INTERFACE_FUNC_DEF(__N, __VALUE) |
|
#define | __USB_DC_BODY_EX(__N, __HEADER, __OBJ) |
|
#define | __USB_DC_BODY(__N, __HEADER) __USB_DC_BODY_EX(__N, __HEADER, USB_DC##__N) |
|
|
enum | usb_dc_feature_t { USB_DC_FEATURE_TRANSFER = 1 << 0
} |
|
enum | usb_ep_type_t {
USB_EP_TYPE_CONTROL = 0
,
USB_EP_TYPE_INTERRUPT = 3
,
USB_EP_TYPE_BULK = 2
,
USB_EP_TYPE_ISO = 1
} |
|
enum | usb_evt_t {
USB_ON_ATTACH
,
USB_ON_DETACH
,
USB_ON_RESET
,
USB_ON_SETUP
,
USB_ON_ERROR
,
USB_ON_SUSPEND
,
USB_ON_RESUME
,
USB_ON_SOF
,
USB_ON_IN
,
USB_ON_NAK
,
USB_ON_OUT
,
USB_ON_STATUS
,
USB_ON_UNDERFLOW
,
USB_ON_OVERFLOW
,
USB_USR_EVT
} |
|
enum | usb_dc_err_t {
USB_DC_ERR_ERROR
,
USB_DC_ERR_INVALID_CRC
,
USB_DC_ERR_SOF_TO
} |
|
|
void(* | Fini )(void) |
|
void(* | Reset )(usb_dc_cfg_t *cfg) |
|
void(* | Connect )(void) |
|
void(* | Disconnect )(void) |
|
void(* | Wakeup )(void) |
|
void(* | SetAddress )(uint_fast8_t addr) |
|
uint_fast8_t(* | GetAddress )(void) |
|
uint_fast16_t(* | GetFrameNo )(void) |
|
uint_fast8_t(* | GetMicroFrameNo )(void) |
|
void(* | GetSetup )(uint8_t *buffer) |
|
void(* | StatusStage )(bool is_in) |
|
struct { | |
|
uint_fast8_t(* GetFeature )(uint_fast8_t ep,
uint_fast8_t feature) | |
|
vsf_err_t(* Add )(uint_fast8_t ep,
usb_ep_type_t type,
uint_fast16_t size) | |
|
uint_fast16_t(* GetSize )(uint_fast8_t ep) | |
|
vsf_err_t(* SetStall )(uint_fast8_t ep) | |
|
bool(* IsStalled )(uint_fast8_t ep) | |
|
vsf_err_t(* ClearStall )(uint_fast8_t ep) | |
|
uint_fast32_t(* GetDataSize )(uint_fast8_t ep) | |
|
struct { | |
|
vsf_err_t(* ReadBuffer )(uint_fast8_t ep, uint8_t
*buffer, uint_fast16_t size) | |
|
vsf_err_t(* EnableOut )(uint_fast8_t ep) | |
|
vsf_err_t(* SetDataSize )(uint_fast8_t ep,
uint_fast16_t size) | |
|
vsf_err_t(* WriteBuffer )(uint_fast8_t ep, uint8_t
*buffer, uint_fast16_t size) | |
|
} Transaction | |
|
struct { | |
|
vsf_err_t(* Recv )(uint_fast8_t ep, uint8_t
*buffer, uint_fast32_t size) | |
|
vsf_err_t(* Send )(uint_fast8_t ep, uint8_t
*buffer, uint_fast32_t size,
bool zlp) | |
|
} Transfer | |
|
} | Ep | |
|
void(* | Irq )(void) |
| irq handler
|
|
| def_interface (i_usb_dc_t) vsf_err_t(*Init)(usb_dc_cfg_t *cfg) |
|
◆ USB_DC_SPEED_UNKNOWN
#define USB_DC_SPEED_UNKNOWN 0 |
◆ USB_DC_SPEED_LOW
#define USB_DC_SPEED_LOW 1 |
◆ USB_DC_SPEED_FULL
#define USB_DC_SPEED_FULL 2 |
◆ USB_DC_SPEED_HIGH
#define USB_DC_SPEED_HIGH 3 |
◆ USB_DC_SPEED_SUPER
#define USB_DC_SPEED_SUPER 4 |
◆ __USB_HC_IP_FUNC_DEF
#define __USB_HC_IP_FUNC_DEF |
( |
|
__N, |
|
|
|
__VALUE |
|
) |
| |
Value:
static void usb_hc##__N##_irq(void);
vsf_err_t
Definition __type.h:42
void _init()
Definition init.c:12
Definition vsf_template_usb.h:446
usb_hc_ip_cfg_t
Definition vsf_template_usb.h:441
◆ __USB_HC_IP_INTERFACE_FUNC_DEF
#define __USB_HC_IP_INTERFACE_FUNC_DEF |
( |
|
__N, |
|
|
|
__VALUE |
|
) |
| |
Value: { \
.Init = &usb_hc##__N##
_init, \
.GetInfo = &usb_hc##__N##_get_info, \
.Irq = &usb_hc##__N##_irq, \
}
◆ __USB_HC_IP_BODY_EX
#define __USB_HC_IP_BODY_EX |
( |
|
__N, |
|
|
|
__OBJ, |
|
|
|
__HEADER |
|
) |
| |
Value:
{
return __HEADER##
_init(&(__OBJ), cfg); } \
{ __HEADER##_get_info(&(__OBJ), info); } \
static void usb_hc##__N##_irq(void) \
{ __HEADER##_irq(&(__OBJ)); }
◆ __USB_HC_IP_BODY
#define __USB_HC_IP_BODY |
( |
|
__N, |
|
|
|
__HEADER |
|
) |
| __USB_HC_IP_BODY_EX(__N, USB_HC##__N##_IP, __HEADER) |
◆ __USB_OTG_HC_IP_BODY
#define __USB_OTG_HC_IP_BODY |
( |
|
__N, |
|
|
|
__HEADER |
|
) |
| __USB_HC_IP_BODY_EX(__N, USB_OTG##__N##_IP, __HEADER) |
◆ __USB_DC_IP_FUNC_DEF
#define __USB_DC_IP_FUNC_DEF |
( |
|
__N, |
|
|
|
__VALUE |
|
) |
| |
Value:
static void usb_dc##__N##
_fini(
void); \
static void usb_dc##__N##_connect(void); \
static void usb_dc##__N##_disconnect(void); \
static void usb_dc##__N##_irq(void);
void _fini()
Definition init.c:33
Definition vsf_template_usb.h:408
usb_dc_ip_cfg_t
Definition vsf_template_usb.h:403
◆ __USB_DC_IP_INTERFACE_FUNC_DEF
#define __USB_DC_IP_INTERFACE_FUNC_DEF |
( |
|
__N, |
|
|
|
__VALUE |
|
) |
| |
Value: { \
.Init = &usb_dc##__N##
_init, \
.Fini = &usb_dc##__N##
_fini, \
.GetInfo = &usb_dc##__N##_get_info, \
.Connect = &usb_dc##__N##_connect, \
.Disconnect = &usb_dc##__N##_disconnect, \
.Irq = &usb_dc##__N##_irq, \
}
◆ __USB_DC_IP_BODY_EX
#define __USB_DC_IP_BODY_EX |
( |
|
__N, |
|
|
|
__OBJ, |
|
|
|
__HEADER |
|
) |
| |
Value:
{
return __HEADER##
_init(&(__OBJ), cfg); } \
static void usb_dc##__N##
_fini(
void) \
{ __HEADER##
_fini(&(__OBJ)); } \
{ __HEADER##_get_info(&(__OBJ), info); } \
static void usb_dc##__N##_connect(void) \
{ __HEADER##_connect(&(__OBJ)); } \
static void usb_dc##__N##_disconnect(void) \
{ __HEADER##_disconnect(&(__OBJ)); } \
static void usb_dc##__N##_irq(void) \
{ __HEADER##_irq(&(__OBJ)); }
◆ __USB_DC_IP_BODY
#define __USB_DC_IP_BODY |
( |
|
__N, |
|
|
|
__HEADER |
|
) |
| __USB_DC_IP_BODY_EX(__N, USB_DC##__N##_IP, __HEADER) |
◆ __USB_OTG_DC_IP_BODY
#define __USB_OTG_DC_IP_BODY |
( |
|
__N, |
|
|
|
__HEADER |
|
) |
| __USB_DC_IP_BODY_EX(__N, USB_OTG##__N##_IP, __HEADER) |
◆ __USB_DC_FROM_IP
#define __USB_DC_FROM_IP |
( |
|
__N, |
|
|
|
__OBJ, |
|
|
|
__DRV_NAME, |
|
|
|
__HEADER |
|
) |
| |
Value:
__USB_DC_BODY_EX(__N, __HEADER, __OBJ)
#define NULL
Definition lvgl.h:26
#define __USB_DC_INTERFACE_FUNC_DEF(__N, __VALUE)
Definition vsf_template_usb.h:162
#define __USB_DC_FUNC_DEF(__N, __VALUE)
Definition vsf_template_usb.h:109
◆ __USB_DC_FUNC_DEF
#define __USB_DC_FUNC_DEF |
( |
|
__N, |
|
|
|
__VALUE |
|
) |
| |
◆ __USB_DC_INTERFACE_FUNC_DEF
#define __USB_DC_INTERFACE_FUNC_DEF |
( |
|
__N, |
|
|
|
__VALUE |
|
) |
| |
◆ __USB_DC_BODY_EX
#define __USB_DC_BODY_EX |
( |
|
__N, |
|
|
|
__HEADER, |
|
|
|
__OBJ |
|
) |
| |
◆ __USB_DC_BODY
#define __USB_DC_BODY |
( |
|
__N, |
|
|
|
__HEADER |
|
) |
| __USB_DC_BODY_EX(__N, __HEADER, USB_DC##__N) |
◆ usb_ip_irqhandler_t
typedef void(* usb_ip_irqhandler_t) (void *param) |
◆ usb_dc_evthandler_t
◆ usb_dc_speed_t
◆ usb_dc_cfg_t
◆ usb_dc_ip_info_t
◆ usb_hc_ip_info_t
◆ usb_dc_feature_t
Enumerator |
---|
USB_DC_FEATURE_TRANSFER | |
◆ usb_ep_type_t
Enumerator |
---|
USB_EP_TYPE_CONTROL | |
USB_EP_TYPE_INTERRUPT | |
USB_EP_TYPE_BULK | |
USB_EP_TYPE_ISO | |
◆ usb_evt_t
Enumerator |
---|
USB_ON_ATTACH | |
USB_ON_DETACH | |
USB_ON_RESET | |
USB_ON_SETUP | |
USB_ON_ERROR | |
USB_ON_SUSPEND | |
USB_ON_RESUME | |
USB_ON_SOF | |
USB_ON_IN | |
USB_ON_NAK | |
USB_ON_OUT | |
USB_ON_STATUS | |
USB_ON_UNDERFLOW | |
USB_ON_OVERFLOW | |
USB_USR_EVT | |
◆ usb_dc_err_t
Enumerator |
---|
USB_DC_ERR_ERROR | |
USB_DC_ERR_INVALID_CRC | |
USB_DC_ERR_SOF_TO | |
◆ def_interface() [1/3]
def_interface |
( |
i_usb_dc_t |
| ) |
|
◆ def_interface() [2/3]
def_interface |
( |
i_usb_dc_ip_t |
| ) |
|
◆ def_interface() [3/3]
def_interface |
( |
i_usb_hc_ip_t |
| ) |
|
◆ Fini
void(* Fini)(void) |
( |
void |
| ) |
|
◆ Reset
◆ Connect
void(* Connect)(void) |
( |
void |
| ) |
|
◆ Disconnect
void(* Disconnect)(void) |
( |
void |
| ) |
|
◆ Wakeup
void(* Wakeup) (void) |
( |
void |
| ) |
|
◆ SetAddress
◆ GetAddress
◆ GetFrameNo
◆ GetMicroFrameNo
◆ GetSetup
◆ StatusStage
void(* StatusStage) (bool is_in) |
( |
bool |
is_in | ) |
|
◆ GetFeature
◆ Add
◆ GetSize
◆ SetStall
◆ IsStalled
◆ ClearStall
◆ GetDataSize
get the data size in hw-buffer in transaction mode get the all transferred data size in transfer mode
◆ ReadBuffer
◆ EnableOut
◆ SetDataSize
◆ WriteBuffer
◆ [struct]
struct { ... } Transaction |
◆ Recv
◆ Send
◆ [struct]
◆ [struct]
◆ Irq
void(* Irq) (void) |
( |
void |
| ) |
|
◆ usb_dc_ip_cfg_t
typedef struct usb_dc_ip_cfg_t |
< interrupt priority
< irqhandler function
< dcd related parameters
◆ GetInfo
◆ usb_hc_ip_cfg_t
typedef struct usb_hc_ip_cfg_t |
< interrupt priority
< irqhandler function
< hcd related parameters