![]() |
PDL for FM4
Version1.2
Peripheral Driverl Library for FM4
|

Go to the source code of this file.
Macros | |
| #define | __USBDEVICECMSISDAP_C__ |
Functions | |
| static void | RxTxCallback (stc_usbn_t *pstcUsb, struct stc_usbn_endpoint_data *pstcEndpoint) |
| Receive or transmitted data callback. More... | |
| static void | ConfCallback (stc_usbn_t *pstcUsb) |
| Configuration change callback, used to see if configuration is set or cleared. More... | |
| uint32_t | DAP_ProcessVendorCommand (uint8_t *request, uint8_t *response) |
| void | UsbDeviceCmsisDap_Init (stc_usbn_t *pstcUsb) |
| Initialisation callback. More... | |
| boolean_t | UsbDeviceCmsisDap_Send (uint8_t *pu8Buffer, en_usbsend_mode_t enMode) |
| Send data. More... | |
| void | UsbDeviceCmsisDap_Tick (void) |
| boolean_t | UsbDeviceCmsisDap_IsSending () |
| Check if data transfer is still in process. More... | |
| boolean_t | UsbDeviceCmsisDap_DataSent () |
| Check if data transfer was transmitted. More... | |
| uint32_t | UsbDeviceCmsisDap_GetReceivedData (uint8_t *pu8OutBuffer) |
| Send data. More... | |
Variables | |
| static volatile uint8_t | USB_RequestFlag |
| static volatile uint32_t | USB_RequestIn |
| static volatile uint32_t | USB_RequestOut |
| static volatile uint8_t | USB_ResponseIdle |
| static volatile uint8_t | USB_ResponseFlag |
| static volatile uint32_t | USB_ResponseIn |
| static volatile uint32_t | USB_ResponseOut |
| static stc_usbn_endpoint_buffer_t | stcEndpointBufferIN |
| static stc_usbn_endpoint_buffer_t | stcEndpointBufferOUT |
| static uint8_t | USB_Request [DAP_PACKET_COUNT][DAP_PACKET_SIZE] |
| static uint8_t | USB_Response [DAP_PACKET_COUNT][DAP_PACKET_SIZE] |
| uint8_t | pu8BufferOUT [64] |
| uint8_t | pu8BufferIN [64] |
| static stc_usbn_endpoint_data_t * | pstcEndpointIN = NULL |
| static stc_usbn_endpoint_data_t * | pstcEndpointOUT = NULL |
| static boolean_t | bDataReceived = FALSE |
| static boolean_t | bDataSent = TRUE |
| static boolean_t | bReady = FALSE |
| static stc_usbn_t * | pstcUsbHandle = NULL |
CMSIS-DAP HID Communication Backend for protocol layer visit http://www.arm.com
History:
Definition in file UsbDeviceCmsisDap.c.
| #define __USBDEVICECMSISDAP_C__ |
Definition at line 50 of file UsbDeviceCmsisDap.c.
|
static |
Configuration change callback, used to see if configuration is set or cleared.
| pstcUsb | Pointer to USB instance |
Definition at line 131 of file UsbDeviceCmsisDap.c.
References bDataReceived, bDataSent, bReady, FALSE, TRUE, USB_RequestFlag, USB_RequestIn, USB_RequestOut, USB_ResponseFlag, USB_ResponseIdle, USB_ResponseIn, USB_ResponseOut, UsbConfigured, and UsbDevice_GetStatus().
Referenced by UsbDeviceCmsisDap_Init().


| uint32_t DAP_ProcessVendorCommand | ( | uint8_t * | request, |
| uint8_t * | response | ||
| ) |
|
static |
Receive or transmitted data callback.
| pstcUsb | Pointer to USB instance |
| pstcEndpoint | Pointer to endpoint instance |
Definition at line 170 of file UsbDeviceCmsisDap.c.
References bDataReceived, bDataSent, stc_usbn_endpoint_data::pstcEndpointBuffer, stc_usbn_endpoint_buffer::pu8Buffer, pu8BufferOUT, TRUE, stc_usbn_endpoint_data::u8EndpointAddress, USB_Request, USB_RequestFlag, USB_RequestIn, USB_RequestOut, UsbDevice_ReceiveData(), and UsbIRQ.
Referenced by UsbDeviceCmsisDap_Init().


| boolean_t UsbDeviceCmsisDap_DataSent | ( | void | ) |
Check if data transfer was transmitted.
Definition at line 373 of file UsbDeviceCmsisDap.c.
References bDataSent.
| uint32_t UsbDeviceCmsisDap_GetReceivedData | ( | uint8_t * | pu8OutBuffer | ) |
Send data.
| pu8OutBuffer | Pointer to data buffer where to write in data |
Definition at line 387 of file UsbDeviceCmsisDap.c.
References bDataReceived, FALSE, stc_usbn_endpoint_data::pstcEndpointBuffer, pstcUsbHandle, stc_usbn_endpoint_buffer::pu8Buffer, TRUE, stc_usbn_endpoint_buffer::u32BufferSize, UsbDevice_ReceiveData(), and UsbIRQ.

| void UsbDeviceCmsisDap_Init | ( | stc_usbn_t * | pstcUsb | ) |
Initialisation callback.
| pstcUsb | Pointer to USB instance |
Definition at line 213 of file UsbDeviceCmsisDap.c.
References ConfCallback(), stc_usbdevice_class_config::pfnConfCallback, stc_usbdevice_class_config::pfnConnectionCallback, stc_usbdevice_class_config::pfnDisconnectionCallback, stc_usbdevice_endpoint_config::pfnRxTxCallback, stc_usbdevice_class_config::pfnSetupRequestCallback, stc_usbdevice_endpoint_config::pstcEndpointBuffer, pstcUsbHandle, pu8BufferOUT, RxTxCallback(), stcEndpointBufferIN, stcEndpointBufferOUT, stc_usbdevice_endpoint_config::u8EndpointAddress, stc_usbdevice_class_config::u8InterfaceClass, stc_usbdevice_class_config::u8InterfaceNumber, stc_usbdevice_class_config::u8InterfaceProtocoll, stc_usbdevice_class_config::u8InterfaceSubClass, USB_RequestFlag, USB_RequestIn, USB_RequestOut, USB_ResponseFlag, USB_ResponseIdle, USB_ResponseIn, USB_ResponseOut, USBDESCR_ENDPOINT, UsbDevice_ReceiveData(), UsbDevice_RegisterVendorClass(), UsbDevice_SetupEndpoint(), and UsbIRQ.

| boolean_t UsbDeviceCmsisDap_IsSending | ( | void | ) |
Check if data transfer is still in process.
Definition at line 361 of file UsbDeviceCmsisDap.c.
References bDataSent.
| boolean_t UsbDeviceCmsisDap_Send | ( | uint8_t * | pu8Buffer, |
| en_usbsend_mode_t | enMode | ||
| ) |
Send data.
| pu8Buffer | Pointer to data buffer |
| enMode | Transfer mode (UsbPOLL, UsbDMA, UsbIRQ) |
Definition at line 283 of file UsbDeviceCmsisDap.c.
References bDataSent, bReady, FALSE, pstcUsbHandle, TRUE, USB_ResponseFlag, USB_ResponseIdle, USB_ResponseIn, USB_ResponseOut, UsbDevice_SendData(), and UsbPOLL.
Referenced by UsbDeviceCmsisDap_Tick().


| void UsbDeviceCmsisDap_Tick | ( | void | ) |
Definition at line 312 of file UsbDeviceCmsisDap.c.
References DAP_ProcessVendorCommand(), USB_Request, USB_RequestFlag, USB_RequestIn, USB_RequestOut, USB_Response, USB_ResponseFlag, USB_ResponseIdle, USB_ResponseIn, USB_ResponseOut, UsbDeviceCmsisDap_Send(), UsbDMA, and UsbIRQ.

Definition at line 108 of file UsbDeviceCmsisDap.c.
Referenced by ConfCallback(), RxTxCallback(), and UsbDeviceCmsisDap_GetReceivedData().
Definition at line 109 of file UsbDeviceCmsisDap.c.
Referenced by ConfCallback(), RxTxCallback(), UsbDeviceCmsisDap_DataSent(), UsbDeviceCmsisDap_IsSending(), and UsbDeviceCmsisDap_Send().
Definition at line 110 of file UsbDeviceCmsisDap.c.
Referenced by ConfCallback(), and UsbDeviceCmsisDap_Send().
|
static |
Definition at line 105 of file UsbDeviceCmsisDap.c.
|
static |
Definition at line 106 of file UsbDeviceCmsisDap.c.
|
static |
Definition at line 111 of file UsbDeviceCmsisDap.c.
Referenced by UsbDeviceCmsisDap_GetReceivedData(), UsbDeviceCmsisDap_Init(), and UsbDeviceCmsisDap_Send().
| uint8_t pu8BufferIN[64] |
Definition at line 103 of file UsbDeviceCmsisDap.c.
| uint8_t pu8BufferOUT[64] |
Definition at line 102 of file UsbDeviceCmsisDap.c.
Referenced by RxTxCallback(), and UsbDeviceCmsisDap_Init().
|
static |
Definition at line 97 of file UsbDeviceCmsisDap.c.
Referenced by UsbDeviceCmsisDap_Init().
|
static |
Definition at line 98 of file UsbDeviceCmsisDap.c.
Referenced by UsbDeviceCmsisDap_Init().
|
static |
Definition at line 100 of file UsbDeviceCmsisDap.c.
Referenced by RxTxCallback(), and UsbDeviceCmsisDap_Tick().
|
static |
Definition at line 86 of file UsbDeviceCmsisDap.c.
Referenced by ConfCallback(), RxTxCallback(), UsbDeviceCmsisDap_Init(), and UsbDeviceCmsisDap_Tick().
|
static |
Definition at line 87 of file UsbDeviceCmsisDap.c.
Referenced by ConfCallback(), RxTxCallback(), UsbDeviceCmsisDap_Init(), and UsbDeviceCmsisDap_Tick().
|
static |
Definition at line 88 of file UsbDeviceCmsisDap.c.
Referenced by ConfCallback(), RxTxCallback(), UsbDeviceCmsisDap_Init(), and UsbDeviceCmsisDap_Tick().
|
static |
Definition at line 101 of file UsbDeviceCmsisDap.c.
Referenced by UsbDeviceCmsisDap_Tick().
|
static |
Definition at line 91 of file UsbDeviceCmsisDap.c.
Referenced by ConfCallback(), UsbDeviceCmsisDap_Init(), UsbDeviceCmsisDap_Send(), and UsbDeviceCmsisDap_Tick().
|
static |
Definition at line 90 of file UsbDeviceCmsisDap.c.
Referenced by ConfCallback(), UsbDeviceCmsisDap_Init(), UsbDeviceCmsisDap_Send(), and UsbDeviceCmsisDap_Tick().
|
static |
Definition at line 92 of file UsbDeviceCmsisDap.c.
Referenced by ConfCallback(), UsbDeviceCmsisDap_Init(), UsbDeviceCmsisDap_Send(), and UsbDeviceCmsisDap_Tick().
|
static |
Definition at line 93 of file UsbDeviceCmsisDap.c.
Referenced by ConfCallback(), UsbDeviceCmsisDap_Init(), UsbDeviceCmsisDap_Send(), and UsbDeviceCmsisDap_Tick().