ClearCore Library
Loading...
Searching...
No Matches
Classes | Namespaces | Macros
UsbManager.h File Reference
#include <stdint.h>
#include <stdio.h>
#include <sam.h>
#include "hpl_usb.h"
#include "cdcdf_acm.h"
#include "cdcdf_acm_desc.h"
#include "hal_usb_device.h"
#include "hri_mclk_e53.h"
#include "hri_gclk_e53.h"
#include "hal_gpio.h"
#include "hri_port_e53.h"
+ Include dependency graph for UsbManager.h:

Go to the source code of this file.

Classes

class  ClearCore::UsbManager
 USB manager Class. More...
 

Namespaces

namespace  ClearCore
 Namespace to encompass the ClearCore board API.
 

Macros

#define USB_SERIAL_BUFFER_SIZE   64
 
#define USB_STATUS_REG_LIST(Func)
 
#define STRUCTIFY(item)   uint32_t item : 1;
 
#define ENUMIFY(item)    item,
 
#define MASKIFY(item)    const uint32_t item##Mask = 1UL << item ;
 
#define MIN(a, b)   (((a) < (b)) ? (a) : (b))
 

Detailed Description

USB manager class to handle USB 2.1 communication as a device.

General Operation: The USB peripheral has a built in DMA separate from the main DMA. It uses this DMA to transfer data to RAM for software to read.

Abbreviations: EP -> Endpoint DIR -> Direction PCK -> Packet CDC -> Communication Device Class ACM -> Abstract Control Model

Macro Definition Documentation

◆ USB_SERIAL_BUFFER_SIZE

#define USB_SERIAL_BUFFER_SIZE   64

USB serial buffer size, in bytes. (64)

◆ USB_STATUS_REG_LIST

#define USB_STATUS_REG_LIST (   Func)
Value:
Func(UnhandledSetupReq) \
Func(UnhandledDescReq) \
Func(UnhandledStringReq) \
Func(UnhandledFeatureReq) \
Func(FailedStandardSetup) \
Func(FailedClassSetup) \
Func(FailedDescriptor) \
Func(FailedTransferIn) \
Func(FailedTransferOut) \
Func(TimeoutRead) \
Func(TimeoutWrite) \
Func(TimeoutSync) \
Func(RamAccessError) \
Func(FrameNumberCrcError) \
Func(ReadBufferOverflow) \