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 GetbMaxLUN ()
 
uint8_t GetbTheLUN ()
 
uint8_t Reset ()
 
uint8_t GetMaxLUN (uint8_t *max_lun)
 
uint8_t SetCurLUN (uint8_t 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 ModeSense (uint8_t lun, uint8_t pc, uint8_t page, uint8_t subpage, uint8_t len, uint8_t *buf)
 
uint8_t MediaCTL (uint8_t lun, uint8_t ctl)
 
uint8_t Read (uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, uint8_t *buf)
 
uint8_t Read (uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, USBReadParser *prs)
 
uint8_t Write (uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, const uint8_t *buf)
 
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)
 
bool IsValidCSW (CommandStatusWrapper *pcsw, CommandBlockWrapperBase *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 error, uint8_t index)
 
uint8_t HandleSCSIError (uint8_t status)
 
virtual uint8_t OnInit ()
 

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 bLastUsbError
 
uint8_t bMaxLUN
 
uint8_t bTheLUN
 

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 189 of file masstorage.h.

Constructor & Destructor Documentation

BulkOnly::BulkOnly ( USB p)

Definition at line 19 of file masstorage.cpp.

Member Function Documentation

void BulkOnly::PrintEndpointDescriptor ( const USB_ENDPOINT_DESCRIPTOR ep_ptr)
protected

Definition at line 844 of file masstorage.cpp.

bool BulkOnly::IsValidCBW ( uint8_t  size,
uint8_t *  pcbw 
)
protected
bool BulkOnly::IsMeaningfulCBW ( uint8_t  size,
uint8_t *  pcbw 
)
protected
bool BulkOnly::IsValidCSW ( CommandStatusWrapper pcsw,
CommandBlockWrapperBase pcbw 
)
protected

Definition at line 7 of file masstorage.cpp.

uint8_t BulkOnly::ClearEpHalt ( uint8_t  index)
protected

Definition at line 444 of file masstorage.cpp.

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

Definition at line 709 of file masstorage.cpp.

uint8_t BulkOnly::HandleUsbError ( uint8_t  error,
uint8_t  index 
)
protected

Definition at line 401 of file masstorage.cpp.

uint8_t BulkOnly::HandleSCSIError ( uint8_t  status)
protected

Definition at line 794 of file masstorage.cpp.

uint8_t BulkOnly::GetLastUsbError ( )
inline

Definition at line 227 of file masstorage.h.

uint8_t BulkOnly::GetbMaxLUN ( )
inline

Definition at line 231 of file masstorage.h.

uint8_t BulkOnly::GetbTheLUN ( )
inline

Definition at line 235 of file masstorage.h.

uint8_t BulkOnly::Reset ( )

Definition at line 388 of file masstorage.cpp.

uint8_t BulkOnly::GetMaxLUN ( uint8_t *  max_lun)

Definition at line 392 of file masstorage.cpp.

uint8_t BulkOnly::SetCurLUN ( uint8_t  lun)

Definition at line 786 of file masstorage.cpp.

uint8_t BulkOnly::ResetRecovery ( )

Definition at line 465 of file masstorage.cpp.

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

Definition at line 490 of file masstorage.cpp.

uint8_t BulkOnly::TestUnitReady ( uint8_t  lun)

Definition at line 556 of file masstorage.cpp.

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

Definition at line 534 of file masstorage.cpp.

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

Definition at line 512 of file masstorage.cpp.

uint8_t BulkOnly::ModeSense ( uint8_t  lun,
uint8_t  pc,
uint8_t  page,
uint8_t  subpage,
uint8_t  len,
uint8_t *  buf 
)

Definition at line 685 of file masstorage.cpp.

uint8_t BulkOnly::MediaCTL ( uint8_t  lun,
uint8_t  ctl 
)

Definition at line 581 of file masstorage.cpp.

uint8_t BulkOnly::Read ( uint8_t  lun,
uint32_t  addr,
uint16_t  bsize,
uint8_t  blocks,
uint8_t *  buf 
)

Definition at line 604 of file masstorage.cpp.

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

Definition at line 630 of file masstorage.cpp.

uint8_t BulkOnly::Write ( uint8_t  lun,
uint32_t  addr,
uint16_t  bsize,
uint8_t  blocks,
const uint8_t *  buf 
)

Definition at line 658 of file masstorage.cpp.

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

Implements USBDeviceConfig.

Definition at line 40 of file masstorage.cpp.

uint8_t BulkOnly::Release ( )
virtual

Implements USBDeviceConfig.

Definition at line 363 of file masstorage.cpp.

uint8_t BulkOnly::Poll ( )
virtual

Implements USBDeviceConfig.

Definition at line 379 of file masstorage.cpp.

virtual uint8_t BulkOnly::GetAddress ( )
inlinevirtual

Implements USBDeviceConfig.

Definition at line 259 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 336 of file masstorage.cpp.

virtual uint8_t BulkOnly::OnInit ( )
inlineprotectedvirtual

Definition at line 269 of file masstorage.h.

Member Data Documentation

const uint8_t BulkOnly::epDataInIndex = 1
staticprotected

Definition at line 191 of file masstorage.h.

const uint8_t BulkOnly::epDataOutIndex = 2
staticprotected

Definition at line 192 of file masstorage.h.

const uint8_t BulkOnly::epInterruptInIndex = 3
staticprotected

Definition at line 193 of file masstorage.h.

USB* BulkOnly::pUsb
protected

Definition at line 195 of file masstorage.h.

uint8_t BulkOnly::bAddress
protected

Definition at line 196 of file masstorage.h.

uint8_t BulkOnly::bConfNum
protected

Definition at line 197 of file masstorage.h.

uint8_t BulkOnly::bIface
protected

Definition at line 198 of file masstorage.h.

uint8_t BulkOnly::bNumEP
protected

Definition at line 199 of file masstorage.h.

uint32_t BulkOnly::qNextPollTime
protected

Definition at line 200 of file masstorage.h.

bool BulkOnly::bPollEnable
protected

Definition at line 201 of file masstorage.h.

EpInfo BulkOnly::epInfo[MASS_MAX_ENDPOINTS]
protected

Definition at line 203 of file masstorage.h.

uint32_t BulkOnly::dCBWTag
protected

Definition at line 205 of file masstorage.h.

uint32_t BulkOnly::dCBWDataTransferLength
protected

Definition at line 206 of file masstorage.h.

uint8_t BulkOnly::bLastUsbError
protected

Definition at line 207 of file masstorage.h.

uint8_t BulkOnly::bMaxLUN
protected

Definition at line 208 of file masstorage.h.

uint8_t BulkOnly::bTheLUN
protected

Definition at line 209 of file masstorage.h.


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