Classes | Macros | Typedefs | Functions | Variables
USBD.h File Reference
#include "USBDescriptors.h"
#include "USBRequests.h"
#include "USBLib_Types.h"
#include <stdio.h>
Include dependency graph for USBD.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _USBDDmaDescriptor
 Struct used for USBD DMA Link List Transfer Descriptor, must be 16-bytes aligned. More...
 
struct  _USBDTransferBuffer
 Buffer struct used for multi-buffer-listed transfer. More...
 

Macros

#define USBD_STATE_ADDRESS   4
 
#define USBD_STATE_ATTACHED   1
 
#define USBD_STATE_CONFIGURED   5
 
#define USBD_STATE_DEFAULT   3
 
#define USBD_STATE_POWERED   2
 
#define USBD_STATE_SUSPENDED   0
 
#define USBD_STATUS_ABORTED   USBRC_ABORTED
 
#define USBD_STATUS_CANCELED   USBRC_CANCELED
 
#define USBD_STATUS_HW_NOT_SUPPORTED   USBRC_HW_NOT_SUPPORTED
 
#define USBD_STATUS_INVALID_PARAMETER   USBRC_PARAM_ERR
 
#define USBD_STATUS_LOCKED   USBRC_BUSY
 
#define USBD_STATUS_PARTIAL_DONE   USBRC_PARTIAL_DONE
 
#define USBD_STATUS_RESET   USBRC_RESET
 
#define USBD_STATUS_SUCCESS   USBRC_SUCCESS
 
#define USBD_STATUS_SW_NOT_SUPPORTED   USBRC_SW_NOT_SUPPORTED
 
#define USBD_STATUS_WRONG_STATE   USBRC_STATE_ERR
 

Typedefs

typedef void(* MblTransferCallback) (void *pArg, uint8_t status)
 
typedef void(* TransferCallback) (void *pArg, uint8_t status, uint32_t transferred, uint32_t remaining)
 
typedef struct _USBDTransferBuffer USBDTransferBuffer
 Buffer struct used for multi-buffer-listed transfer. More...
 

Functions

struct _USBDDmaDescriptor __attribute__ ((aligned(16))) USBDDmaDescriptor
 Struct used for USBD DMA Link List Transfer Descriptor, must be 16-bytes aligned. More...
 
void USBD_ConfigureEndpoint (const USBEndpointDescriptor *pDescriptor)
 
void USBD_ConfigureSpeed (uint8_t forceFS)
 
void USBD_Connect (void)
 
void USBD_Disconnect (void)
 
void USBD_ForceFullSpeed (void)
 
uint8_t USBD_GetState (void)
 
void USBD_Halt (uint8_t bEndpoint)
 
void USBD_Init (void)
 
uint8_t USBD_IsHalted (uint8_t bEndpoint)
 
uint8_t USBD_IsHighSpeed (void)
 
uint8_t USBD_Read (uint8_t bEndpoint, void *pData, uint32_t dLength, TransferCallback fCallback, void *pArg)
 
void USBD_RemoteWakeUp (void)
 
void USBD_RequestHandler (uint8_t bEndpoint, const USBGenericRequest *pRequest)
 
void USBD_ResetHandler (void)
 
void USBD_ResumeHandler (void)
 
void USBD_SetAddress (uint8_t address)
 
void USBD_SetConfiguration (uint8_t cfgnum)
 
uint8_t USBD_Stall (uint8_t bEndpoint)
 
void USBD_SuspendHandler (void)
 
void USBD_Test (uint8_t bIndex)
 
void USBD_Unhalt (uint8_t bEndpoint)
 
uint8_t USBD_Write (uint8_t bEndpoint, const void *pData, uint32_t size, TransferCallback callback, void *pArg)
 
void USBDCallbacks_Initialized (void)
 
void USBDCallbacks_RequestReceived (const USBGenericRequest *request)
 
void USBDCallbacks_Reset (void)
 
void USBDCallbacks_Resumed (void)
 
void USBDCallbacks_Suspended (void)
 

Variables

uint32_t bufferLength
 
uint32_t ctrlSettings
 
uint8_t ForceFS
 
void * pDataAddr
 
void * pNxtDesc
 
uint32_t reserved
 
uint32_t used
 

Detailed Description

Purpose

Collection of methods for using the USB device controller on AT91 Microcontrollers.

Usage

Please refer to the corresponding application note.

Definition in file USBD.h.

Function Documentation

◆ USBD_ConfigureSpeed()

void USBD_ConfigureSpeed ( uint8_t  forceFS)

Variable Documentation

◆ bufferLength

uint32_t bufferLength

Not used

Definition at line 91 of file USBD.h.

◆ ctrlSettings

uint32_t ctrlSettings

DMA Control setting register value

Definition at line 91 of file USBD.h.

◆ pDataAddr

void* pDataAddr

Pointer to data buffer address

Definition at line 89 of file USBD.h.

◆ pNxtDesc

void* pNxtDesc

Pointer to Next Descriptor

Definition at line 87 of file USBD.h.

◆ reserved

uint32_t reserved

Control settings

Definition at line 91 of file USBD.h.

◆ used

uint32_t used

Length of buffer Loaded to DMA register, OK to modify

Definition at line 95 of file USBD.h.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:07