Prusa MINI Firmware overview
USB Class Reference

#include <UsbCore.h>

Inheritance diagram for USB:
Collaboration diagram for USB:

Public Member Functions

 USB ()
 
void SetHubPreMask ()
 
void ResetHubPreMask ()
 
AddressPoolGetAddressPool ()
 
uint8_t RegisterDeviceClass (USBDeviceConfig *pdev)
 
void ForEachUsbDevice (UsbDeviceHandleFunc pfunc)
 
uint8_t getUsbTaskState ()
 
void setUsbTaskState (uint8_t state)
 
EpInfogetEpInfoEntry (uint8_t addr, uint8_t ep)
 
uint8_t setEpInfoEntry (uint8_t addr, uint8_t epcount, EpInfo *eprecord_ptr)
 
uint8_t getDevDescr (uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr)
 
uint8_t getConfDescr (uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr)
 
uint8_t getConfDescr (uint8_t addr, uint8_t ep, uint8_t conf, USBReadParser *p)
 
uint8_t getStrDescr (uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t *dataptr)
 
uint8_t setAddr (uint8_t oldaddr, uint8_t ep, uint8_t newaddr)
 
uint8_t setConf (uint8_t addr, uint8_t ep, uint8_t conf_value)
 
uint8_t ctrlData (uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr, bool direction)
 
uint8_t ctrlStatus (uint8_t ep, bool direction, uint16_t nak_limit)
 
uint8_t inTransfer (uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval=0)
 
uint8_t outTransfer (uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data)
 
uint8_t dispatchPkt (uint8_t token, uint8_t ep, uint16_t nak_limit)
 
void Task ()
 
uint8_t DefaultAddressing (uint8_t parent, uint8_t port, bool lowspeed)
 
uint8_t Configuring (uint8_t parent, uint8_t port, bool lowspeed)
 
uint8_t ReleaseDevice (uint8_t addr)
 
uint8_t ctrlReq (uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi, uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t *dataptr, USBReadParser *p)
 
- Public Member Functions inherited from MAX3421e
bool start ()
 
void regWr (uint8_t reg, uint8_t data)
 
uint8_tbytesWr (uint8_t reg, uint8_t nbytes, uint8_t *data_p)
 
void gpioWr (uint8_t data)
 
uint8_t regRd (uint8_t reg)
 
uint8_tbytesRd (uint8_t reg, uint8_t nbytes, uint8_t *data_p)
 
uint8_t gpioRd ()
 
bool reset ()
 
uint8_t getVbusState ()
 
void busprobe ()
 
uint8_t Task ()
 

Constructor & Destructor Documentation

◆ USB()

USB::USB ( )

Member Function Documentation

◆ SetHubPreMask()

void USB::SetHubPreMask ( )
221  {
222  bmHubPre |= bmHUBPRE;
223  };

◆ ResetHubPreMask()

void USB::ResetHubPreMask ( )
225  {
226  bmHubPre &= (~bmHUBPRE);
227  };

◆ GetAddressPool()

AddressPool& USB::GetAddressPool ( )
229  {
230  return (AddressPool&)addrPool;
231  };

◆ RegisterDeviceClass()

uint8_t USB::RegisterDeviceClass ( USBDeviceConfig pdev)
233  {
234  for (uint8_t i = 0; i < USB_NUMDEVICES; i++) {
235  if (!devConfig[i]) {
236  devConfig[i] = pdev;
237  return 0;
238  }
239  }
241  };

◆ ForEachUsbDevice()

void USB::ForEachUsbDevice ( UsbDeviceHandleFunc  pfunc)
243  {
244  addrPool.ForEachUsbDevice(pfunc);
245  };
Here is the call graph for this function:

◆ getUsbTaskState()

uint8_t USB::getUsbTaskState ( )

◆ setUsbTaskState()

void USB::setUsbTaskState ( uint8_t  state)

◆ getEpInfoEntry()

EpInfo* USB::getEpInfoEntry ( uint8_t  addr,
uint8_t  ep 
)

◆ setEpInfoEntry()

uint8_t USB::setEpInfoEntry ( uint8_t  addr,
uint8_t  epcount,
EpInfo eprecord_ptr 
)

◆ getDevDescr()

uint8_t USB::getDevDescr ( uint8_t  addr,
uint8_t  ep,
uint16_t  nbytes,
uint8_t dataptr 
)

◆ getConfDescr() [1/2]

uint8_t USB::getConfDescr ( uint8_t  addr,
uint8_t  ep,
uint16_t  nbytes,
uint8_t  conf,
uint8_t dataptr 
)

◆ getConfDescr() [2/2]

uint8_t USB::getConfDescr ( uint8_t  addr,
uint8_t  ep,
uint8_t  conf,
USBReadParser p 
)

◆ getStrDescr()

uint8_t USB::getStrDescr ( uint8_t  addr,
uint8_t  ep,
uint16_t  nbytes,
uint8_t  index,
uint16_t  langid,
uint8_t dataptr 
)

◆ setAddr()

uint8_t USB::setAddr ( uint8_t  oldaddr,
uint8_t  ep,
uint8_t  newaddr 
)

◆ setConf()

uint8_t USB::setConf ( uint8_t  addr,
uint8_t  ep,
uint8_t  conf_value 
)

◆ ctrlData()

uint8_t USB::ctrlData ( uint8_t  addr,
uint8_t  ep,
uint16_t  nbytes,
uint8_t dataptr,
bool  direction 
)

◆ ctrlStatus()

uint8_t USB::ctrlStatus ( uint8_t  ep,
bool  direction,
uint16_t  nak_limit 
)

◆ inTransfer()

uint8_t USB::inTransfer ( uint8_t  addr,
uint8_t  ep,
uint16_t *  nbytesptr,
uint8_t data,
uint8_t  bInterval = 0 
)

◆ outTransfer()

uint8_t USB::outTransfer ( uint8_t  addr,
uint8_t  ep,
uint16_t  nbytes,
uint8_t data 
)

◆ dispatchPkt()

uint8_t USB::dispatchPkt ( uint8_t  token,
uint8_t  ep,
uint16_t  nak_limit 
)

◆ Task()

void USB::Task ( )

◆ DefaultAddressing()

uint8_t USB::DefaultAddressing ( uint8_t  parent,
uint8_t  port,
bool  lowspeed 
)

◆ Configuring()

uint8_t USB::Configuring ( uint8_t  parent,
uint8_t  port,
bool  lowspeed 
)

◆ ReleaseDevice()

uint8_t USB::ReleaseDevice ( uint8_t  addr)

◆ ctrlReq()

uint8_t USB::ctrlReq ( uint8_t  addr,
uint8_t  ep,
uint8_t  bmReqType,
uint8_t  bRequest,
uint8_t  wValLo,
uint8_t  wValHi,
uint16_t  wInd,
uint16_t  total,
uint16_t  nbytes,
uint8_t dataptr,
USBReadParser p 
)
AddressPool
Definition: address.h:87
i
uint8_t i
Definition: screen_test_graph.c:72
USB_ERROR_UNABLE_TO_REGISTER_DEVICE_CLASS
#define USB_ERROR_UNABLE_TO_REGISTER_DEVICE_CLASS
Definition: UsbCore.h:95
AddressPoolImpl::ForEachUsbDevice
void ForEachUsbDevice(UsbDeviceHandleFunc pfunc)
Definition: address.h:191
uint8_t
const uint8_t[]
Definition: 404_html.c:3
USB_NUMDEVICES
#define USB_NUMDEVICES
Definition: UsbCore.h:115
bmHUBPRE
#define bmHUBPRE
Definition: max3421e.h:173