|
USB Host Shield 2.0
|
#include <masstorage.h>


Protected Member Functions | |
| void | PrintEndpointDescriptor (const USB_ENDPOINT_DESCRIPTOR *ep_ptr) |
| virtual uint8_t | OnInit () |
Static Protected Attributes | |
| static const uint8_t | epDataInIndex = 1 |
| static const uint8_t | epDataOutIndex = 2 |
| static const uint8_t | epInterruptInIndex = 3 |
Definition at line 469 of file masstorage.h.
| BulkOnly::BulkOnly | ( | USB * | p | ) |
Definition at line 229 of file masstorage.cpp.
|
protected |
| ep_ptr |
Definition at line 1220 of file masstorage.cpp.
Definition at line 499 of file masstorage.h.
|
inline |
Definition at line 505 of file masstorage.h.
|
inline |
Definition at line 509 of file masstorage.h.
|
inline |
Definition at line 513 of file masstorage.h.
Test if LUN is write protected
| lun | Logical Unit Number |
Definition at line 77 of file masstorage.cpp.
Media control, for spindle motor and media tray or door. This includes CDROM, TAPE and anything with a media loader.
| lun | Logical Unit Number |
| ctl | 0x00 Stop Motor, 0x01 Start Motor, 0x02 Eject Media, 0x03 Load Media |
Definition at line 137 of file masstorage.cpp.
| uint8_t BulkOnly::Read | ( | uint8_t | lun, |
| uint32_t | addr, | ||
| uint16_t | bsize, | ||
| uint8_t | blocks, | ||
| uint8_t * | buf | ||
| ) |
Read data from media
| lun | Logical Unit Number |
| addr | LBA address on media to read |
| bsize | size of a block (we should probably use the cached size) |
| blocks | how many blocks to read |
| buf | memory that is able to hold the requested data |
Definition at line 161 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 1247 of file masstorage.cpp.
| uint8_t BulkOnly::Write | ( | uint8_t | lun, |
| uint32_t | addr, | ||
| uint16_t | bsize, | ||
| uint8_t | blocks, | ||
| const uint8_t * | buf | ||
| ) |
Write data to media
| lun | Logical Unit Number |
| addr | LBA address on media to write |
| bsize | size of a block (we should probably use the cached size) |
| blocks | how many blocks to write |
| buf | memory that contains the data to write |
Definition at line 195 of file masstorage.cpp.
Lock or Unlock the tray or door on device. Caution: Some devices with buggy firmware will lock up.
| lun | Logical Unit Number |
| lock | 1 to lock, 0 to unlock |
Definition at line 121 of file masstorage.cpp.
Test if LUN is ready for use
| lun | Logical Unit Number |
Definition at line 67 of file masstorage.cpp.
Get the capacity of the media
| lun | Logical Unit Number |
Definition at line 43 of file masstorage.cpp.
Get the sector (block) size used on the media
| lun | Logical Unit Number |
Definition at line 55 of file masstorage.cpp.
| parent | (not used) |
| port | (not used) |
| lowspeed | true if device is low speed |
Reimplemented from USBDeviceConfig.
Definition at line 333 of file masstorage.cpp.
USB_ERROR_CONFIG_REQUIRES_ADDITIONAL_RESET == success We need to standardize either the rcode, or change the API to return values so a signal that additional actions are required can be produced. Some of these codes do exist already.
TECHNICAL: We could do most of this code elsewhere, with the exception of checking the class instance. Doing so would save some program memory when using multiple drivers.
| parent | USB address of parent |
| port | address of port on parent |
| lowspeed | true if device is low speed |
Reimplemented from USBDeviceConfig.
Definition at line 258 of file masstorage.cpp.
|
virtual |
For driver use only.
Reimplemented from USBDeviceConfig.
Definition at line 598 of file masstorage.cpp.
|
virtual |
For driver use only.
Reimplemented from USBDeviceConfig.
Definition at line 676 of file masstorage.cpp.
Reimplemented from USBDeviceConfig.
Definition at line 535 of file masstorage.h.
|
virtual |
For driver use only.
| conf | |
| iface | |
| alt | |
| proto | |
| pep |
Reimplemented from UsbConfigXtracter.
Definition at line 550 of file masstorage.cpp.
Reimplemented from USBDeviceConfig.
Definition at line 542 of file masstorage.h.
Wrap and execute a SCSI CDB with length of 6
| cdb | CDB to execute |
| buf_size | Size of expected transaction |
| buf | Buffer |
| dir | MASS_CMD_DIR_IN | MASS_CMD_DIR_OUT |
Definition at line 90 of file masstorage.cpp.
Wrap and execute a SCSI CDB with length of 10
| cdb | CDB to execute |
| buf_size | Size of expected transaction |
| buf | Buffer |
| dir | MASS_CMD_DIR_IN | MASS_CMD_DIR_OUT |
Definition at line 106 of file masstorage.cpp.
Definition at line 471 of file masstorage.h.
Definition at line 472 of file masstorage.h.
Definition at line 473 of file masstorage.h.
|
protected |
Definition at line 475 of file masstorage.h.
|
protected |
Definition at line 476 of file masstorage.h.
|
protected |
Definition at line 477 of file masstorage.h.
|
protected |
Definition at line 478 of file masstorage.h.
|
protected |
Definition at line 479 of file masstorage.h.
|
protected |
Definition at line 480 of file masstorage.h.
|
protected |
Definition at line 481 of file masstorage.h.
|
protected |
Definition at line 483 of file masstorage.h.
|
protected |
Definition at line 485 of file masstorage.h.
|
protected |
Definition at line 487 of file masstorage.h.
|
protected |
Definition at line 488 of file masstorage.h.
|
protected |
Definition at line 489 of file masstorage.h.
|
protected |
Definition at line 490 of file masstorage.h.
|
protected |
Definition at line 491 of file masstorage.h.
|
protected |
Definition at line 492 of file masstorage.h.
|
protected |
Definition at line 493 of file masstorage.h.