nRF5 SDK v13.0.0
Data Structures | Macros | Enumerations
USB MSC types

nRF52840 only: Types used in the USB MSC class. More...

Data Structures

struct  app_usbd_msc_cbw_t
 Command Block Wrapper (CBW) More...
 
struct  app_usbd_msc_csw_t
 Command Status Wrapper (CSW) More...
 

Macros

#define APP_USBD_MSC_CLASS   0x08
 MSC class definition in interface descriptor. More...
 
#define APP_USBD_MSC_CBW_SIGNATURE   "USBC"
 
#define APP_USBD_MSC_CBW_DIRECTION_IN   (1u <<7)
 
#define APP_USBD_MSC_CSW_SIGNATURE   "USBS"
 
#define APP_USBD_MSC_CSW_STATUS_PASS   0x00
 
#define APP_USBD_MSC_CSW_STATUS_FAIL   0x01
 
#define APP_USBD_MSC_CSW_STATUS_PE   0x02
 

Enumerations

enum  app_usbd_msc_subclass_t {
  APP_USBD_MSC_SUBCLASS_RBC = 0x01,
  APP_USBD_MSC_SUBCLASS_ATAPI = 0x02,
  APP_USBD_MSC_SUBCLASS_QIC_157 = 0x03,
  APP_USBD_MSC_SUBCLASS_UFI = 0x04,
  APP_USBD_MSC_SUBCLASS_SFF_8070I = 0x05,
  APP_USBD_MSC_SUBCLASS_TRANSPARENT = 0x06
}
 MSC subclass possible value. More...
 
enum  app_usbd_msc_protocol_t {
  APP_USBD_MSC_PROTOCOL_CBI = 0x00,
  APP_USBD_MSC_PROTOCOL_CBI_ALT = 0x01,
  APP_USBD_MSC_PROTOCOL_BULK = 0x50
}
 MSC protocol possible value. More...
 
enum  app_usbd_msc_req_t {
  APP_USBD_MSC_REQ_BULK_RESET = 0xFF,
  APP_USBD_MSC_REQ_GET_MAX_LUN = 0xFE
}
 MSC USB requests nrf_drv_usbd_setup_t::bmRequestType. More...
 

Detailed Description

nRF52840 only: Types used in the USB MSC class.

Macro Definition Documentation

#define APP_USBD_MSC_CBW_DIRECTION_IN   (1u <<7)

CBW direction flag

#define APP_USBD_MSC_CBW_SIGNATURE   "USBC"

CBW signature

#define APP_USBD_MSC_CLASS   0x08

MSC class definition in interface descriptor.

app_usbd_descriptor_iface_t::bInterfaceClass

#define APP_USBD_MSC_CSW_SIGNATURE   "USBS"

CSW signature

#define APP_USBD_MSC_CSW_STATUS_FAIL   0x01

CSW status: Command Failed

#define APP_USBD_MSC_CSW_STATUS_PASS   0x00

CSW status: Command Passed

#define APP_USBD_MSC_CSW_STATUS_PE   0x02

CSW status: Phase Error

Enumeration Type Documentation

MSC protocol possible value.

Note
The USB Mass Storage Class Control/Bulk/Interrupt (CBI) Transport specification is approved for use only with full-speed floppy disk drives. CBI shall not be used in high-speed capable devices.
Enumerator
APP_USBD_MSC_PROTOCOL_CBI 

Command/Bulk/Interrupt

APP_USBD_MSC_PROTOCOL_CBI_ALT 

W/o command completion

APP_USBD_MSC_PROTOCOL_BULK 

Bulk-only

MSC USB requests nrf_drv_usbd_setup_t::bmRequestType.

Note
Requests are limited only to APP_USBD_MSC_PROTOCOL_BULK protocol type.
Enumerator
APP_USBD_MSC_REQ_BULK_RESET 

Mass Storage Reset

APP_USBD_MSC_REQ_GET_MAX_LUN 

Get Max LUN

MSC subclass possible value.

Enumerator
APP_USBD_MSC_SUBCLASS_RBC 

Reduced Block Commands

APP_USBD_MSC_SUBCLASS_ATAPI 

CD/DVD devices

APP_USBD_MSC_SUBCLASS_QIC_157 

Tape devices

APP_USBD_MSC_SUBCLASS_UFI 

Floppy disk drives

APP_USBD_MSC_SUBCLASS_SFF_8070I 

Floppy disk drives

APP_USBD_MSC_SUBCLASS_TRANSPARENT 

Determined by INQUIRY


Documentation feedback | Developer Zone | Subscribe | Updated