PDL for FM4  Version1.2
Peripheral Driverl Library for FM4
UsbDeviceLibUsb.c File Reference
#include "UsbDeviceLibUsb.h"
Include dependency graph for UsbDeviceLibUsb.c:

Go to the source code of this file.

Functions

static void UsbDeviceLibUsb_RxCallbackEp1 (stc_usbn_t *pstcUsb, struct stc_usbn_endpoint_data *pstcEndpoint)
 
static void UsbDeviceLibUsb_TxCallbackEp2 (stc_usbn_t *pstcUsb, struct stc_usbn_endpoint_data *pstcEndpoint)
 
void UsbDeviceLibUsb_Init (stc_usbn_t *pstcUsb)
 
static void ClassSetupRequest0 (stc_usbn_t *pstcUsb, stc_usb_request_t *pstcSetup)
 
uint32_t UsbDeviceLibUsb_GetReceivedDataEndpoint1 (uint8_t **ppu8Buffer)
 
boolean_t UsbDeviceLibUsb_SendDataVia2 (stc_usbn_t *pstcUsb, uint8_t *pu8Buffer, uint32_t u32DataSize, en_usbsend_mode_t enMode)
 
uint8_t UsbDeviceLibUsb_DataSent2 (void)
 

Variables

static uint8_t DataReceivedFlags = 0
 
static uint8_t DataSentFlags = 0
 
static uint32_t u32LastReceivedSize1
 
static stc_usbn_endpoint_buffer_t stcEpBuffer1
 
static uint8_t pu8BufferEp1 [512]
 
static stc_usbn_endpoint_data_t * pstcEpOUT1
 
static stc_usbn_endpoint_data_t * pstcEpIN2
 
stc_usbn_endpoint_buffer_t stcEpBuffer2
 

Detailed Description

CONST USB_ASSISTANT_OFF

A detailed description is available at USB Device LibUSB Module description

History:

  • 2013-10-14 1.1 MSc PDL support added

Definition in file UsbDeviceLibUsb.c.

Function Documentation

static void ClassSetupRequest0 ( stc_usbn_t *  pstcUsb,
stc_usb_request_t *  pstcSetup 
)
static

Class Setup Request handling

Parameters
pstcUsbUSB handle
pstcSetupReceived Setup

Definition at line 155 of file UsbDeviceLibUsb.c.

Referenced by UsbDeviceLibUsb_Init().

Here is the caller graph for this function:

static void UsbDeviceLibUsb_RxCallbackEp1 ( stc_usbn_t *  pstcUsb,
struct stc_usbn_endpoint_data *  pstcEndpoint 
)
static

Is called from UsbDevice.c when a endpoint buffer was received

Parameters
pstcUsbUSB Handle
pstcEndpointEndpoint

Definition at line 168 of file UsbDeviceLibUsb.c.

References BUFFER_SIZE_ENDPOINT1, DataReceivedFlags, stc_usbn_endpoint_data::pstcEndpointBuffer, pu8BufferEp1, stc_usbn_endpoint_buffer::u32DataSize, u32LastReceivedSize1, UsbDevice_ReceiveData(), and UsbIRQ.

Referenced by UsbDeviceLibUsb_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

static void UsbDeviceLibUsb_TxCallbackEp2 ( stc_usbn_t *  pstcUsb,
struct stc_usbn_endpoint_data *  pstcEndpoint 
)
static

Is called from UsbDevice.c when a endpoint buffer was sent

Parameters
pstcUsbUSB Handle
pstcEndpointEndpoint

Definition at line 230 of file UsbDeviceLibUsb.c.

References DataSentFlags.

Referenced by UsbDeviceLibUsb_Init().

Here is the caller graph for this function:

Variable Documentation

uint8_t DataReceivedFlags = 0
static
uint8_t DataSentFlags = 0
static
stc_usbn_endpoint_data_t* pstcEpIN2
static

Definition at line 90 of file UsbDeviceLibUsb.c.

stc_usbn_endpoint_data_t* pstcEpOUT1
static

Definition at line 88 of file UsbDeviceLibUsb.c.

uint8_t pu8BufferEp1[512]
static

Definition at line 87 of file UsbDeviceLibUsb.c.

Referenced by UsbDeviceLibUsb_Init(), and UsbDeviceLibUsb_RxCallbackEp1().

stc_usbn_endpoint_buffer_t stcEpBuffer1
static

Definition at line 86 of file UsbDeviceLibUsb.c.

Referenced by UsbDeviceLibUsb_Init().

Definition at line 91 of file UsbDeviceLibUsb.c.

Referenced by UsbDeviceLibUsb_Init().

uint32_t u32LastReceivedSize1
static