Data Fields

msc_application_data Class Reference
[USB MSC Class Enumerations and Descriptors]

MSC Applicaiton Data. More...

#include <usb_msc.h>

Data Fields

uint8_t interface
uint8_t max_lun
 The maximally numbered LUN.
uint8_t in_endpoint
uint8_t out_endpoint
uint8_t in_endpoint_size
 Size in bytes for IN endpoint.
msc_lun_mask_t media_is_removable_mask
 bitmask, one bit for each LUN
const char * vendor
 SCSI-assigned vendor.
const char * product
 Pointer to global or constant.
const char * revision
 Pointer to global or constant.
uint8_t state
 enum MSCApplicationStates
uint32_t current_tag
uint8_t sense_key
uint8_t additional_sense_code
uint32_t residue
uint8_t status
 enum MSCStatus
uint32_t requested_bytes
uint32_t requested_bytes_cbw
uint32_t transferred_bytes
uint32_t block_size [MSC_MAX_LUNS_PER_INTERFACE]
union {
   const uint8_t *   tx_buf
 Data to be sent to the host.
   uint8_t *   rx_buf
 Data received from the host.
}; 
uint16_t tx_len_remaining
 TX data remaining in the current block.
uint8_t * rx_buf_cur
 Current position in the RX buffer.
size_t rx_buf_len
 Length of the application's block RX buffer.
uint8_t out_ep_missed_transactions
 Number of out transactions not processed.
msc_completion_callback operation_complete_callback

Detailed Description

MSC Applicaiton Data.

have been filled out properly.

Initialize the MSC class for all interfaces.

The application shall provide one of these structures for each interface when the MSC class is initialized and keep it as a persistent object for the lifetime of the application. Global variables work well for this.

The Application shall initialize the variables in the first section. The variables in the second section are used by the MSC class to keep track of the state of the connection.

The application will pass this structure to the MSC class whenever it needs the MSC class to process data for an interface.

Initialize all instances of the MSC class. Call this function with an array containing an MSC interface. The app_data pointer should point to an array of valid

The array should be valid for the lifetime of the application. Global variables work well for this.

Parameters:
app_dataPointer to an array of application data structures
countNumber of structures (size of array) in app_data
Returns:
Returns 0 on success, or -1 if some of the data is invalid. On a -1 return, assume that none of the interfaces have been initialized properly and fail.

Field Documentation

The maximally numbered LUN.

One-less than the number of LUNs.

Pointer to global or constant.

Pointer to global or constant.

Data received from the host.

Data to be sent to the host.

SCSI-assigned vendor.

Pointer to global or constant.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator