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
 

Detailed Description

Definition at line 185 of file masstorage.h.

Constructor & Destructor Documentation

BulkOnly::BulkOnly ( USB p)

Definition at line 54 of file masstorage.cpp.

Member Function Documentation

void BulkOnly::PrintEndpointDescriptor ( const USB_ENDPOINT_DESCRIPTOR ep_ptr)
protected

Definition at line 630 of file masstorage.cpp.

bool BulkOnly::IsValidCBW ( uint8_t  size,
uint8_t *  pcbw 
)
protected

Definition at line 343 of file masstorage.cpp.

bool BulkOnly::IsMeaningfulCBW ( uint8_t  size,
uint8_t *  pcbw 
)
protected

Definition at line 350 of file masstorage.cpp.

uint8_t BulkOnly::ClearEpHalt ( uint8_t  index)
protected

Definition at line 413 of file masstorage.cpp.

uint8_t BulkOnly::Transaction ( CommandBlockWrapper cbw,
uint16_t  bsize,
void *  buf,
uint8_t  flags 
)
protected

Definition at line 545 of file masstorage.cpp.

uint8_t BulkOnly::HandleUsbError ( uint8_t  index)
protected

Definition at line 388 of file masstorage.cpp.

uint8_t BulkOnly::GetLastUsbError ( )
inline

Definition at line 229 of file masstorage.h.

uint8_t BulkOnly::Reset ( )

Definition at line 360 of file masstorage.cpp.

uint8_t BulkOnly::GetMaxLUN ( uint8_t *  max_lun)

Definition at line 365 of file masstorage.cpp.

uint8_t BulkOnly::ResetRecovery ( )

Definition at line 419 of file masstorage.cpp.

uint8_t BulkOnly::Inquiry ( uint8_t  lun,
uint16_t  size,
uint8_t *  buf 
)

Definition at line 442 of file masstorage.cpp.

uint8_t BulkOnly::TestUnitReady ( uint8_t  lun)

Definition at line 502 of file masstorage.cpp.

uint8_t BulkOnly::ReadCapacity ( uint8_t  lun,
uint16_t  size,
uint8_t *  buf 
)

Definition at line 482 of file masstorage.cpp.

uint8_t BulkOnly::RequestSense ( uint8_t  lun,
uint16_t  size,
uint8_t *  buf 
)

Definition at line 462 of file masstorage.cpp.

uint8_t BulkOnly::Read ( uint8_t  lun,
uint32_t  addr,
uint16_t  bsize,
USBReadParser prs 
)

Definition at line 521 of file masstorage.cpp.

uint8_t BulkOnly::Init ( uint8_t  parent,
uint8_t  port,
bool  lowspeed 
)
virtual

Implements USBDeviceConfig.

Definition at line 76 of file masstorage.cpp.

uint8_t BulkOnly::Release ( )
virtual

Implements USBDeviceConfig.

Definition at line 293 of file masstorage.cpp.

uint8_t BulkOnly::Poll ( )
virtual

Implements USBDeviceConfig.

Definition at line 306 of file masstorage.cpp.

virtual uint8_t BulkOnly::GetAddress ( )
inlinevirtual

Implements USBDeviceConfig.

Definition at line 246 of file masstorage.h.

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

Implements UsbConfigXtracter.

Definition at line 265 of file masstorage.cpp.

Member Data Documentation

const uint8_t BulkOnly::epDataInIndex = 1
staticprotected

Definition at line 188 of file masstorage.h.

const uint8_t BulkOnly::epDataOutIndex = 2
staticprotected

Definition at line 189 of file masstorage.h.

const uint8_t BulkOnly::epInterruptInIndex = 3
staticprotected

Definition at line 190 of file masstorage.h.

USB* BulkOnly::pUsb
protected

Definition at line 192 of file masstorage.h.

uint8_t BulkOnly::bAddress
protected

Definition at line 193 of file masstorage.h.

uint8_t BulkOnly::bConfNum
protected

Definition at line 194 of file masstorage.h.

uint8_t BulkOnly::bIface
protected

Definition at line 195 of file masstorage.h.

uint8_t BulkOnly::bNumEP
protected

Definition at line 196 of file masstorage.h.

uint32_t BulkOnly::qNextPollTime
protected

Definition at line 197 of file masstorage.h.

bool BulkOnly::bPollEnable
protected

Definition at line 198 of file masstorage.h.

EpInfo BulkOnly::epInfo[MASS_MAX_ENDPOINTS]
protected

Definition at line 200 of file masstorage.h.

uint32_t BulkOnly::dCBWTag
protected

Definition at line 202 of file masstorage.h.

uint32_t BulkOnly::dCBWDataTransferLength
protected

Definition at line 203 of file masstorage.h.

uint8_t BulkOnly::bMaxLUN
protected

Definition at line 204 of file masstorage.h.

uint8_t BulkOnly::bLastUsbError
protected

Definition at line 205 of file masstorage.h.


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