USB_Host_Shield_2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BulkOnly Class Reference

#include <masstorage.h>

Inheritance diagram for BulkOnly:
Inheritance graph
[legend]
Collaboration diagram for BulkOnly:
Collaboration graph
[legend]

Public Member Functions

 BulkOnly (USB *p)
 
uint8_t GetLastUsbError ()
 
uint8_t Reset ()
 
uint8_t GetMaxLUN (uint8_t *max_lun)
 
uint8_t ResetRecovery ()
 
uint8_t Inquiry (uint8_t lun, uint16_t size, uint8_t *buf)
 
uint8_t TestUnitReady (uint8_t lun)
 
uint8_t ReadCapacity (uint8_t lun, uint16_t size, uint8_t *buf)
 
uint8_t RequestSense (uint8_t lun, uint16_t size, uint8_t *buf)
 
uint8_t Read (uint8_t lun, uint32_t addr, uint16_t bsize, USBReadParser *prs)
 
virtual uint8_t Init (uint8_t parent, uint8_t port, bool lowspeed)
 
virtual uint8_t Release ()
 
virtual uint8_t Poll ()
 
virtual uint8_t GetAddress ()
 
virtual void EndpointXtract (uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep)
 

Protected Member Functions

void PrintEndpointDescriptor (const USB_ENDPOINT_DESCRIPTOR *ep_ptr)
 
bool IsValidCBW (uint8_t size, uint8_t *pcbw)
 
bool IsMeaningfulCBW (uint8_t size, uint8_t *pcbw)
 
uint8_t ClearEpHalt (uint8_t index)
 
uint8_t Transaction (CommandBlockWrapper *cbw, uint16_t bsize, void *buf, uint8_t flags)
 
uint8_t HandleUsbError (uint8_t index)
 

Protected Attributes

USBpUsb
 
uint8_t bAddress
 
uint8_t bConfNum
 
uint8_t bIface
 
uint8_t bNumEP
 
uint32_t qNextPollTime
 
bool bPollEnable
 
EpInfo epInfo [MASS_MAX_ENDPOINTS]
 
uint32_t dCBWTag
 
uint32_t dCBWDataTransferLength
 
uint8_t bMaxLUN
 
uint8_t bLastUsbError
 

Static Protected Attributes

static const uint8_t epDataInIndex = 1
 
static const uint8_t epDataOutIndex = 2
 
static const uint8_t epInterruptInIndex = 3
 

Constructor & Destructor Documentation

BulkOnly::BulkOnly ( USB p)

Member Function Documentation

uint8_t BulkOnly::ClearEpHalt ( uint8_t  index)
protected
void BulkOnly::EndpointXtract ( uint8_t  conf,
uint8_t  iface,
uint8_t  alt,
uint8_t  proto,
const USB_ENDPOINT_DESCRIPTOR ep 
)
virtual

Implements UsbConfigXtracter.

virtual uint8_t BulkOnly::GetAddress ( )
inlinevirtual

Implements USBDeviceConfig.

uint8_t BulkOnly::GetLastUsbError ( )
inline
uint8_t BulkOnly::GetMaxLUN ( uint8_t *  max_lun)
uint8_t BulkOnly::HandleUsbError ( uint8_t  index)
protected
uint8_t BulkOnly::Init ( uint8_t  parent,
uint8_t  port,
bool  lowspeed 
)
virtual

Implements USBDeviceConfig.

uint8_t BulkOnly::Inquiry ( uint8_t  lun,
uint16_t  size,
uint8_t *  buf 
)
bool BulkOnly::IsMeaningfulCBW ( uint8_t  size,
uint8_t *  pcbw 
)
protected
bool BulkOnly::IsValidCBW ( uint8_t  size,
uint8_t *  pcbw 
)
protected
uint8_t BulkOnly::Poll ( )
virtual

Implements USBDeviceConfig.

void BulkOnly::PrintEndpointDescriptor ( const USB_ENDPOINT_DESCRIPTOR ep_ptr)
protected
uint8_t BulkOnly::Read ( uint8_t  lun,
uint32_t  addr,
uint16_t  bsize,
USBReadParser prs 
)
uint8_t BulkOnly::ReadCapacity ( uint8_t  lun,
uint16_t  size,
uint8_t *  buf 
)
uint8_t BulkOnly::Release ( )
virtual

Implements USBDeviceConfig.

uint8_t BulkOnly::RequestSense ( uint8_t  lun,
uint16_t  size,
uint8_t *  buf 
)
uint8_t BulkOnly::Reset ( )
uint8_t BulkOnly::ResetRecovery ( )
uint8_t BulkOnly::TestUnitReady ( uint8_t  lun)
uint8_t BulkOnly::Transaction ( CommandBlockWrapper cbw,
uint16_t  bsize,
void *  buf,
uint8_t  flags 
)
protected

Member Data Documentation

uint8_t BulkOnly::bAddress
protected
uint8_t BulkOnly::bConfNum
protected
uint8_t BulkOnly::bIface
protected
uint8_t BulkOnly::bLastUsbError
protected
uint8_t BulkOnly::bMaxLUN
protected
uint8_t BulkOnly::bNumEP
protected
bool BulkOnly::bPollEnable
protected
uint32_t BulkOnly::dCBWDataTransferLength
protected
uint32_t BulkOnly::dCBWTag
protected
const uint8_t BulkOnly::epDataInIndex = 1
staticprotected
const uint8_t BulkOnly::epDataOutIndex = 2
staticprotected
EpInfo BulkOnly::epInfo[MASS_MAX_ENDPOINTS]
protected
const uint8_t BulkOnly::epInterruptInIndex = 3
staticprotected
USB* BulkOnly::pUsb
protected
uint32_t BulkOnly::qNextPollTime
protected

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