@si14/si-usbd
usbd::UsbControlEndpoint Class Reference

USB control endpoint implementation class. More...

Inheritance diagram for usbd::UsbControlEndpoint:
Collaboration diagram for usbd::UsbControlEndpoint:

Public Member Functions

void init ()
 
void txComplete ()
 
void setup (SetupData *setupData)
 
- Public Member Functions inherited from usbd::UsbEndpoint
virtual void checkDescriptor (EndpointDescriptor *deviceDesriptor)
 
virtual void rxComplete (int length)
 
void startTx (int length)
 
void stall ()
 

Public Attributes

unsigned char rxBuffer [64]
 
unsigned char txBuffer [64]
 
- Public Attributes inherited from usbd::UsbEndpoint
unsigned char * rxBufferPtr
 
unsigned int rxBufferSize
 
unsigned int rxPacketSize
 
unsigned char * txBufferPtr
 
unsigned int txBufferSize
 
unsigned int txPacketSize
 
EndpointTransferType transferType = INTERRUPT
 
unsigned int index
 
UsbInterfaceinterface
 
UsbDevicedevice
 

Detailed Description

USB control endpoint implementation class.

This class does not need to be subclassed. It may be used as is as member of UsbDevice subclass.

Implements standard device requests. And forwards vendor specific requests to device, interfaces and endpoints.

Member Function Documentation

◆ init()

void usbd::UsbControlEndpoint::init ( )
inlinevirtual

Endpoint initialization.

Called internally from the library.

UsbEndpoint::init() sets packet sizes based on buffer sizes, so the subclass should call super method after setting of rxPacketSize and txPacketSize properties.

Reimplemented from usbd::UsbEndpoint.

◆ setup()

void usbd::UsbControlEndpoint::setup ( SetupData *  setupData)
inlinevirtual

Handler of endpoint control request.

May be overloaded to implement vendor request.

Parameters
setupData

Reimplemented from usbd::UsbEndpoint.

◆ txComplete()

void usbd::UsbControlEndpoint::txComplete ( )
inlinevirtual

Called when data transmitted.

May be overloaded to recognize completed data transmission.

Reimplemented from usbd::UsbEndpoint.

Member Data Documentation

◆ rxBuffer

unsigned char usbd::UsbControlEndpoint::rxBuffer[64]

◆ txBuffer

unsigned char usbd::UsbControlEndpoint::txBuffer[64]

The documentation for this class was generated from the following file: