Numworks Epsilon  1.4.1
Graphing Calculator Operating System
Ion::USB::Device::Endpoint0 Class Reference

#include <endpoint0.h>

Public Types

enum  State {
  State::Idle, State::Stalled, State::DataIn, State::LastDataIn,
  State::StatusIn, State::DataOut, State::LastDataOut, State::StatusOut
}
 

Public Member Functions

 Endpoint0 (RequestRecipient *device, RequestRecipient *interface)
 
void setup ()
 
void setupOut ()
 
void setOutNAK (bool nak)
 
void enableOut ()
 
void reset ()
 
bool NAKForced () const
 
void readAndDispatchSetupPacket ()
 
void processINpacket ()
 
void processOUTpacket ()
 
void flushTxFifo ()
 
void flushRxFifo ()
 
void setReceivedPacketSize (uint16_t size)
 
void discardUnreadData ()
 
void stallTransaction ()
 
void computeZeroLengthPacketNeeded ()
 
void setState (State state)
 
void sendSomeData ()
 
void clearForOutTransactions (uint16_t wLength)
 

Static Public Attributes

static constexpr int k_maxPacketSize = 64
 
static constexpr int MaxTransferSize = 2048
 

Detailed Description

Definition at line 12 of file endpoint0.h.

Member Enumeration Documentation

◆ State

Enumerator
Idle 
Stalled 
DataIn 
LastDataIn 
StatusIn 
DataOut 
LastDataOut 
StatusOut 

Definition at line 14 of file endpoint0.h.

Constructor & Destructor Documentation

◆ Endpoint0()

Ion::USB::Device::Endpoint0::Endpoint0 ( RequestRecipient device,
RequestRecipient interface 
)
inline

Definition at line 29 of file endpoint0.h.

Member Function Documentation

◆ clearForOutTransactions()

void Ion::USB::Device::Endpoint0::clearForOutTransactions ( uint16_t  wLength)

Definition at line 254 of file endpoint0.cpp.

◆ computeZeroLengthPacketNeeded()

void Ion::USB::Device::Endpoint0::computeZeroLengthPacketNeeded ( )

Definition at line 331 of file endpoint0.cpp.

◆ discardUnreadData()

void Ion::USB::Device::Endpoint0::discardUnreadData ( )

Definition at line 226 of file endpoint0.cpp.

◆ enableOut()

void Ion::USB::Device::Endpoint0::enableOut ( )

Definition at line 80 of file endpoint0.cpp.

◆ flushRxFifo()

void Ion::USB::Device::Endpoint0::flushRxFifo ( )

Definition at line 207 of file endpoint0.cpp.

◆ flushTxFifo()

void Ion::USB::Device::Endpoint0::flushTxFifo ( )

Definition at line 180 of file endpoint0.cpp.

◆ NAKForced()

bool Ion::USB::Device::Endpoint0::NAKForced ( ) const
inline

Definition at line 46 of file endpoint0.h.

◆ processINpacket()

void Ion::USB::Device::Endpoint0::processINpacket ( )

Definition at line 112 of file endpoint0.cpp.

◆ processOUTpacket()

void Ion::USB::Device::Endpoint0::processOUTpacket ( )

Definition at line 141 of file endpoint0.cpp.

◆ readAndDispatchSetupPacket()

void Ion::USB::Device::Endpoint0::readAndDispatchSetupPacket ( )

Definition at line 89 of file endpoint0.cpp.

◆ reset()

void Ion::USB::Device::Endpoint0::reset ( )

Definition at line 84 of file endpoint0.cpp.

◆ sendSomeData()

void Ion::USB::Device::Endpoint0::sendSomeData ( )

Definition at line 233 of file endpoint0.cpp.

◆ setOutNAK()

void Ion::USB::Device::Endpoint0::setOutNAK ( bool  nak)

Definition at line 69 of file endpoint0.cpp.

◆ setReceivedPacketSize()

void Ion::USB::Device::Endpoint0::setReceivedPacketSize ( uint16_t  size)
inline

Definition at line 52 of file endpoint0.h.

◆ setState()

void Ion::USB::Device::Endpoint0::setState ( State  state)
inline

Definition at line 56 of file endpoint0.h.

◆ setup()

void Ion::USB::Device::Endpoint0::setup ( )

Definition at line 14 of file endpoint0.cpp.

◆ setupOut()

void Ion::USB::Device::Endpoint0::setupOut ( )

Definition at line 56 of file endpoint0.cpp.

◆ stallTransaction()

void Ion::USB::Device::Endpoint0::stallTransaction ( )

Definition at line 326 of file endpoint0.cpp.

Member Data Documentation

◆ k_maxPacketSize

constexpr int Ion::USB::Device::Endpoint0::k_maxPacketSize = 64
static

Definition at line 25 of file endpoint0.h.

◆ MaxTransferSize

constexpr int Ion::USB::Device::Endpoint0::MaxTransferSize = 2048
static

Definition at line 26 of file endpoint0.h.


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