PDL for FM4  Version1.2
Peripheral Driverl Library for FM4
USB Device Middleware: LibUSB

Macros

#define BUFFER_SIZE_ENDPOINT1   512
 

Functions

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)
 

Detailed Description

Provided functions of USB Device LibUSB module:

Used to communicate with LibUSB backend

Macro Definition Documentation

#define BUFFER_SIZE_ENDPOINT1   512

Definition at line 96 of file UsbDeviceLibUsb.h.

Referenced by UsbDeviceLibUsb_Init(), and UsbDeviceLibUsb_RxCallbackEp1().

Function Documentation

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

Is used to use get the sent status of endpoint 2

Definition at line 239 of file UsbDeviceLibUsb.c.

References DataSentFlags.

uint32_t UsbDeviceLibUsb_GetReceivedDataEndpoint1 ( uint8_t **  ppu8Buffer)

Is used to use received data from endpoint

Parameters
ppu8Bufferpointer to buffer

Definition at line 184 of file UsbDeviceLibUsb.c.

References DataReceivedFlags, stc_usbn_endpoint_data::pstcEndpointBuffer, stc_usbn_endpoint_buffer::pu8Buffer, and u32LastReceivedSize1.

boolean_t UsbDeviceLibUsb_SendDataVia2 ( stc_usbn_t *  pstcUsb,
uint8_t *  pu8Buffer,
uint32_t  u32DataSize,
en_usbsend_mode_t  enMode 
)

Is called from main application to send data via endpoint

Parameters
pstcUsbUSB Handle
pu8BufferBuffer to send
u32DataSizeBuffersize
enModepolled sending, interrupt sending or DMA
Returns
1: if succesful, 0: if usb was not ready

Definition at line 207 of file UsbDeviceLibUsb.c.

References DataSentFlags, UsbConfigured, UsbDevice_GetStatus(), UsbDevice_SendData(), and UsbPOLL.

Here is the call graph for this function: