ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_usb_hmsc_internal.h File Reference

Cross-TU surface shared between the host-MSC class layer(ra8_usb_hmsc.c) and the polled enumeration ladder (ra8_usb_hmsc_enum.c). More...

#include <stdint.h>
Include dependency graph for ra8_usb_hmsc_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  ra8_usb_hmsc_setup_field_t : uint8_t {
  k_ra8_hmsc_bm_std_dev_in = 0x80U ,
  k_ra8_hmsc_bm_std_dev_out = 0x00U ,
  k_ra8_hmsc_bm_std_iface_out = 0x01U ,
  k_ra8_hmsc_breq_get_descriptor = 0x06U ,
  k_ra8_hmsc_breq_set_address = 0x05U ,
  k_ra8_hmsc_breq_set_config = 0x09U ,
  k_ra8_hmsc_breq_set_interface = 0x0BU ,
  k_ra8_hmsc_bm_class_iface_in = 0xA1U ,
  k_ra8_hmsc_desc_device = 0x01U ,
  k_ra8_hmsc_desc_configuration = 0x02U ,
  k_ra8_hmsc_desc_interface = 0x04U ,
  k_ra8_hmsc_desc_endpoint = 0x05U
}
 Standard chapter-9 + MSC class request encodings. More...
enum  ra8_usb_hmsc_size_t : uint16_t {
  k_ra8_hmsc_dev_desc_len = 18U ,
  k_ra8_hmsc_cfg_desc_len = 9U ,
  k_ra8_hmsc_iface_desc_len = 9U ,
  k_ra8_hmsc_ep_desc_len = 7U ,
  k_ra8_hmsc_assigned_address = 1U ,
  k_ra8_hmsc_default_config = 1U ,
  k_ra8_hmsc_get_max_lun_len = 1U ,
  k_ra8_hmsc_cbw_len = 31U ,
  k_ra8_hmsc_csw_len = 13U ,
  k_ra8_hmsc_cdb_max_len = 16U ,
  k_ra8_hmsc_cdb6_len = 6U ,
  k_ra8_hmsc_cdb10_len = 10U
}
 Standard descriptor sizes and BOT wrapper sizes. More...

Detailed Description

Cross-TU surface shared between the host-MSC class layer

(ra8_usb_hmsc.c) and the polled enumeration ladder (ra8_usb_hmsc_enum.c).

Tag
[Ring 3 / HAL] {World: NS}

The native host-MSC class layer is split across two translation units so each stays under the 1000-line file-size cap. This src/-local header carries the typed-enum constants that both TUs reference: the chapter-9 SETUP field encodings (used to assemble GET_DESCRIPTOR / SET_ADDRESS / SET_CONFIGURATION requests during enumeration) and the standard descriptor / BOT wrapper sizes. It is NOT part of the public API: the public contract lives in ra8_usb_hmsc.h, and the shadow-state singleton g_usb_hmsc_state is shared through ra8_hal_internal.h.

Since
0.1.0

Definition in file ra8_usb_hmsc_internal.h.

Enumeration Type Documentation

◆ ra8_usb_hmsc_setup_field_t

Standard chapter-9 + MSC class request encodings.

Enumerator
k_ra8_hmsc_bm_std_dev_in 

Std | Device | In.

k_ra8_hmsc_bm_std_dev_out 

Std | Device | Out.

k_ra8_hmsc_bm_std_iface_out 

Std | Interface | Out.

k_ra8_hmsc_breq_get_descriptor 

GET_DESCRIPTOR.

k_ra8_hmsc_breq_set_address 

SET_ADDRESS.

k_ra8_hmsc_breq_set_config 

SET_CONFIGURATION.

k_ra8_hmsc_breq_set_interface 

SET_INTERFACE.

k_ra8_hmsc_bm_class_iface_in 

Class | Interface | In.

k_ra8_hmsc_desc_device 

DEVICE descriptor.

k_ra8_hmsc_desc_configuration 

CONFIGURATION descriptor.

k_ra8_hmsc_desc_interface 

INTERFACE descriptor.

k_ra8_hmsc_desc_endpoint 

ENDPOINT descriptor.

Definition at line 38 of file ra8_usb_hmsc_internal.h.

◆ ra8_usb_hmsc_size_t

enum ra8_usb_hmsc_size_t : uint16_t

Standard descriptor sizes and BOT wrapper sizes.

The CBW / CSW lengths are nailed down by USB MSC BBB rev 1.0 sections 5.1 and 5.2 respectively.

Enumerator
k_ra8_hmsc_dev_desc_len 

USB DEVICE descriptor.

k_ra8_hmsc_cfg_desc_len 

CONFIGURATION descriptor hdr.

k_ra8_hmsc_iface_desc_len 

INTERFACE descriptor.

k_ra8_hmsc_ep_desc_len 

ENDPOINT descriptor.

k_ra8_hmsc_assigned_address 

First assigned device addr.

k_ra8_hmsc_default_config 

bConfigurationValue = 1.

k_ra8_hmsc_get_max_lun_len 

Get-Max-LUN response len.

k_ra8_hmsc_cbw_len 

CBW length (BBB sec 5.1).

k_ra8_hmsc_csw_len 

CSW length (BBB sec 5.2).

k_ra8_hmsc_cdb_max_len 

CDB ceiling.

k_ra8_hmsc_cdb6_len 

6-byte SCSI CDB.

k_ra8_hmsc_cdb10_len 

10-byte SCSI CDB.

Definition at line 63 of file ra8_usb_hmsc_internal.h.