Classes | Macros | Functions | Variables
USBD_HAL.c File Reference
#include "../../libchip/libchip_compiler.h"
#include "../../libchip/include/usbhs.h"
#include "USBD_HAL.h"
#include "USBLib_Trace.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
Include dependency graph for USBD_HAL.c:

Go to the source code of this file.

Classes

struct  Endpoint
 
struct  MblTransfer
 
struct  Transfer
 
struct  TransferHeader
 
struct  UdphsDmaDescriptor
 

Macros

#define DMA
 
#define MBL_FULL   1
 
#define MBL_NbBuffer(i, o, size)   (((i)>(o))?((i)-(o)):((i)+(size)-(o)))
 
#define MBL_NULL   2
 
#define SHIFT_INTERUPT   12
 
#define UDPHS_ENDPOINT_DISABLED   0
 
#define UDPHS_ENDPOINT_HALTED   1
 
#define UDPHS_ENDPOINT_IDLE   2
 
#define UDPHS_ENDPOINT_RECEIVING   4
 
#define UDPHS_ENDPOINT_RECEIVINGM   6
 
#define UDPHS_ENDPOINT_SENDING   3
 
#define UDPHS_ENDPOINT_SENDINGM   5
 

Functions

 COMPILER_ALIGNED (16)
 
static uint8_t UDPHS_AddWr (uint8_t bEndpoint, const void *pData, uint32_t dLength)
 
static void UDPHS_DmaHandler (uint8_t bEndpoint)
 
static void UDPHS_DmaSingle (uint8_t bEndpoint, Transfer *pXfr, uint32_t dwCfg)
 
static void UDPHS_EndpointHandler (uint8_t bEndpoint)
 
static uint8_t UDPHS_MblUpdate (MblTransfer *pTransfer, USBDTransferBuffer *pBi, uint16_t size, uint8_t forceEnd)
 
static uint8_t UDPHS_MblWriteFifo (uint8_t bEndpoint)
 
static uint8_t UDPHS_Read (uint8_t bEndpoint, void *pData, uint32_t dLength)
 
static void UDPHS_ReadPayload (uint8_t bEndpoint, int32_t wPacketSize)
 
static void UDPHS_ReadRequest (USBGenericRequest *pRequest)
 
static uint8_t UDPHS_Write (uint8_t bEndpoint, const void *pData, uint32_t dLength)
 
static void UDPHS_WritePayload (uint8_t bEndpoint, int32_t size)
 
void USBD_HAL_Activate (void)
 
void USBD_HAL_CancelIo (uint32_t bmEPs)
 
uint8_t USBD_HAL_ConfigureEP (const USBEndpointDescriptor *pDescriptor)
 
void USBD_HAL_Connect (void)
 Enable Pull-up, connect. More...
 
void USBD_HAL_Disable (void)
 
void USBD_HAL_Disconnect (void)
 Disable Pull-up, disconnect. More...
 
uint8_t USBD_HAL_Halt (uint8_t bEndpoint, uint8_t ctl)
 
void USBD_HAL_Init (void)
 
uint8_t USBD_HAL_IsHighSpeed (void)
 
uint8_t USBD_HAL_Read (uint8_t bEndpoint, void *pData, uint32_t dLength)
 
void USBD_HAL_RemoteWakeUp (void)
 
void USBD_HAL_ResetEPs (uint32_t bmEPs, uint8_t bStatus, uint8_t bKeepCfg)
 Reset endpoints and disable them.

  1. Terminate transfer if there is any, with given status;
  2. Reset the endpoint & disable it.
More...
 
void USBD_HAL_SetAddress (uint8_t address)
 
void USBD_HAL_SetConfiguration (uint8_t cfgnum)
 
uint8_t USBD_HAL_SetTransferCallback (uint8_t bEP, TransferCallback fCallback, void *pCbData)
 
uint8_t USBD_HAL_SetupMblTransfer (uint8_t bEndpoint, USBDTransferBuffer *pMbList, uint16_t mblSize, uint16_t startOffset)
 
uint8_t USBD_HAL_Stall (uint8_t bEP)
 
void USBD_HAL_Suspend (void)
 
void USBD_HAL_Test (uint8_t bIndex)
 
void USBD_HAL_WaitReadData (uint8_t bEndpoint)
 
uint8_t USBD_HAL_Write (uint8_t bEndpoint, const void *pData, uint32_t dLength)
 
uint8_t USBD_HAL_WrWithHdr (uint8_t bEndpoint, const void *pHdr, uint8_t bHdrLen, const void *pData, uint32_t dLength)
 
void USBHS_Handler (void)
 

Variables

static Endpoint endpoints [CHIP_USB_NUMENDPOINTS]
 
static const char test_packet_buffer []
 

Detailed Description

Implementation of USB device functions on a UDP controller.

See usbd_api_method USBD API Methods.

Definition in file USBD_HAL.c.



inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:18:00