![]() |
PDL for FM4
Version1.2
Peripheral Driverl Library for FM4
|
Data Structures | |
| struct | stc_usbdevice_class_config |
| USB device class configuration. More... | |
| struct | stc_usbdevice_intern_data |
| USB device class configuration. More... | |
| struct | stc_usbdevice_config |
| USB device configuration. More... | |
| struct | stc_usbdevice_endpoint_config |
| USB device endpoint configuration. More... | |
| struct | stc_usbdevicen_instance_data |
| USB device instance. More... | |
Macros | |
| #define | USBDEVICE_MAXCLASSES 5 |
| #define | UsbDevice_HalEndpointStatus(x) Usb_HalEndpointStatus(x) |
| #define | UsbDevice_HalEndpointIsBusy(x) Usb_HalEndpointIsBusy(x) |
| #define | UsbDevice_HalStallEndpoint(x) Usb_HalStallEndpoint(x) |
| #define | UsbDevice_HalUnstallEndpoint(x) Usb_HalUnstallEndpoint(x) |
Typedefs | |
| typedef void(* | usbdevice_setuprequest_func_ptr_t )(stc_usbn_t *pstcUsb, stc_usb_request_t *pstcSetup) |
| setup request callback handle More... | |
| typedef void(* | usbdevice_controltranfered_func_ptr_t )(stc_usbn_t *pstcUsb, stc_usbn_endpoint_data_t *pstcEndpoint) |
| control data transferred More... | |
| typedef void(* | usbdevice_initclasses_func_ptr_t )(stc_usbn_t *pstcUsb) |
| init class callback More... | |
| typedef struct stc_usbdevice_class_config | stc_usbdevice_class_config_t |
| USB device class configuration. More... | |
| typedef struct stc_usbdevice_intern_data | stc_usbdevice_intern_data_t |
| USB device class configuration. More... | |
| typedef struct stc_usbdevice_config | stc_usbdevice_config_t |
| USB device configuration. More... | |
| typedef struct stc_usbdevice_endpoint_config | stc_usbdevice_endpoint_config_t |
| USB device endpoint configuration. More... | |
| typedef struct stc_usbdevicen_instance_data | stc_usbdevicen_instance_data_t |
| USB device instance. More... | |
| typedef enum en_usbsend_mode | en_usbsend_mode_t |
| USB device sending mode. More... | |
Enumerations | |
| enum | en_usbsend_mode { UsbPOLL = 0, UsbIRQ = 1, UsbDMA = 2 } |
| USB device sending mode. More... | |
Provided functions of USB module:
Used to transfer data with EP0..EP5, to do enumeration process and support different USB class drivers.
| #define UsbDevice_HalEndpointIsBusy | ( | x | ) | Usb_HalEndpointIsBusy(x) |
Definition at line 258 of file usbdevice.h.
| #define UsbDevice_HalEndpointStatus | ( | x | ) | Usb_HalEndpointStatus(x) |
Definition at line 256 of file usbdevice.h.
| #define UsbDevice_HalStallEndpoint | ( | x | ) | Usb_HalStallEndpoint(x) |
Definition at line 260 of file usbdevice.h.
| #define UsbDevice_HalUnstallEndpoint | ( | x | ) | Usb_HalUnstallEndpoint(x) |
Definition at line 262 of file usbdevice.h.
| #define USBDEVICE_MAXCLASSES 5 |
Definition at line 99 of file usbdevice.h.
| typedef enum en_usbsend_mode en_usbsend_mode_t |
USB device sending mode.
| typedef struct stc_usbdevice_class_config stc_usbdevice_class_config_t |
USB device class configuration.
used to setup USB classes
| typedef struct stc_usbdevice_config stc_usbdevice_config_t |
USB device configuration.
| typedef struct stc_usbdevice_endpoint_config stc_usbdevice_endpoint_config_t |
USB device endpoint configuration.
| typedef struct stc_usbdevice_intern_data stc_usbdevice_intern_data_t |
USB device class configuration.
used to setup USB classes
| typedef struct stc_usbdevicen_instance_data stc_usbdevicen_instance_data_t |
USB device instance.
| typedef void(* usbdevice_controltranfered_func_ptr_t)(stc_usbn_t *pstcUsb, stc_usbn_endpoint_data_t *pstcEndpoint) |
control data transferred
| pstcUsb | USB handle |
| pstcEndpoint | Endpoint handle |
Definition at line 121 of file usbdevice.h.
| typedef void(* usbdevice_initclasses_func_ptr_t)(stc_usbn_t *pstcUsb) |
| typedef void(* usbdevice_setuprequest_func_ptr_t)(stc_usbn_t *pstcUsb, stc_usb_request_t *pstcSetup) |
setup request callback handle
| pstcUsb | USB handle |
| pstcSetup | Pointer to setup request |
Definition at line 110 of file usbdevice.h.
| enum en_usbsend_mode |
USB device sending mode.
| Enumerator | |
|---|---|
| UsbPOLL |
send polled |
| UsbIRQ |
send IRQ |
| UsbDMA |
send DMA |
Definition at line 226 of file usbdevice.h.
| en_usb_status_t UsbDevice_GetStatus | ( | stc_usbn_t * | pstcUsb | ) |
Referenced by ConfCallback(), SendData(), UsbDeviceLibUsb_SendDataVia2(), and UsbDevicePrinter_SendData().

| en_usb_endpoint_status_t UsbDevice_HalEndpointStatus | ( | stc_usbn_endpoint_data_t * | pstcEpHandle | ) |
| void UsbDevice_Init | ( | stc_usbn_t * | pstcUsb, |
| stc_usb_config_t * | pstcUsbConfig, | ||
| stc_usbdevice_config_t * | pstcConfig | ||
| ) |
| void UsbDevice_InitCallback | ( | stc_usbn_t * | pstcUsb, |
| stc_usb_config_t * | pstcUsbConfig | ||
| ) |
| en_result_t UsbDevice_ReceiveData | ( | stc_usbn_t * | pstcUsb, |
| stc_usbn_endpoint_data_t * | pstcEndpoint, | ||
| uint8_t * | pu8Buffer, | ||
| uint32_t | u32DataSize, | ||
| en_usbsend_mode_t | enMode | ||
| ) |
Referenced by RxTxCallback(), UsbDeviceCdcCom_Init(), UsbDeviceCmsisDap_GetReceivedData(), UsbDeviceCmsisDap_Init(), UsbDeviceHidCom_GetReceivedData(), UsbDeviceHidCom_Init(), UsbDeviceLibUsb_Init(), UsbDeviceLibUsb_RxCallbackEp1(), UsbDevicePrinter_Init(), and UsbDevicePrinter_RxCallback().

| void UsbDevice_ReceiveDataControl | ( | stc_usbn_t * | pstcUsb, |
| usbdevice_controltranfered_func_ptr_t | pfnCompletionCallback | ||
| ) |
| en_result_t UsbDevice_RegisterVendorClass | ( | stc_usbn_t * | pstcUsb, |
| stc_usbdevice_class_config_t * | pstcUsbClassConfig, | ||
| uint8_t ** | ppu8Buffer, | ||
| uint8_t * | pu8InterfaceLength | ||
| ) |
Referenced by UsbDeviceCdcCom_Init(), UsbDeviceCmsisDap_Init(), UsbDeviceHidCom_Init(), UsbDeviceHidJoystick_Init(), UsbDeviceHidKeyboard_Init(), UsbDeviceHidMouse_Init(), UsbDeviceLibUsb_Init(), and UsbDevicePrinter_Init().

| en_result_t UsbDevice_SendData | ( | stc_usbn_t * | pstcUsb, |
| stc_usbn_endpoint_data_t * | pstcEndpoint, | ||
| uint8_t * | pu8Buffer, | ||
| uint32_t | u32DataSize, | ||
| en_usbsend_mode_t | enMode | ||
| ) |
Referenced by RxTxCallback(), SendData(), UsbDeviceCmsisDap_Send(), UsbDeviceHidCom_Send(), UsbDeviceLibUsb_SendDataVia2(), and UsbDevicePrinter_SendData().

| void UsbDevice_SendDataControl | ( | stc_usbn_t * | pstcUsb, |
| uint8_t * | pu8Buffer, | ||
| uint32_t | u32DataLength | ||
| ) |
Referenced by DecodeSetupRequest(), and SendLineCoding().

| stc_usbn_endpoint_data_t* UsbDevice_SetupEndpoint | ( | stc_usbn_t * | pstcUsb, |
| stc_usbdevice_endpoint_config_t * | pstcConfig | ||
| ) |
Referenced by UsbDeviceCdcCom_Init(), UsbDeviceCmsisDap_Init(), UsbDeviceHidCom_Init(), UsbDeviceHidJoystick_Init(), UsbDeviceHidKeyboard_Init(), UsbDeviceHidMouse_Init(), UsbDeviceLibUsb_Init(), and UsbDevicePrinter_Init().

| void UsbDevice_Usb0ExintCallback | ( | void | ) |
| void UsbDevice_Usb1ExintCallback | ( | void | ) |