Struct rp_pac::otp_data_raw::regs::UsbWhiteLabelAddr
source · #[repr(transparent)]pub struct UsbWhiteLabelAddr(pub u32);
Expand description
Row index of the USB_WHITE_LABEL structure within OTP (ECC) The table has 16 rows, each of which are also ECC and marked valid by the corresponding valid bit in USB_BOOT_FLAGS (ECC). The entries are either _VALUEs where the 16 bit value is used as is, or _STRDEFs which acts as a pointers to a string value. The value stored in a _STRDEF is two separate bytes: The low seven bits of the first (LSB) byte indicates the number of characters in the string, and the top bit of the first (LSB) byte if set to indicate that each character in the string is two bytes (Unicode) versus one byte if unset. The second (MSB) byte represents the location of the string data, and is encoded as the number of rows from this USB_WHITE_LABEL_ADDR; i.e. the row of the start of the string is USB_WHITE_LABEL_ADDR value + msb_byte. In each case, the corresponding valid bit enables replacing the default value for the corresponding item provided by the boot rom. Note that Unicode _STRDEFs are only supported for USB_DEVICE_PRODUCT_STRDEF, USB_DEVICE_SERIAL_NUMBER_STRDEF and USB_DEVICE_MANUFACTURER_STRDEF. Unicode values will be ignored if specified for other fields, and non-unicode values for these three items will be converted to Unicode characters by setting the upper 8 bits to zero. Note that if the USB_WHITE_LABEL structure or the corresponding strings are not readable by BOOTSEL mode based on OTP permissions, or if alignment requirements are not met, then the corresponding default values are used. The index values indicate where each field is located (row USB_WHITE_LABEL_ADDR value + index):
Tuple Fields§
§0: u32
Implementations§
source§impl UsbWhiteLabelAddr
impl UsbWhiteLabelAddr
pub const fn usb_white_label_addr(&self) -> UsbWhiteLabelAddr
pub fn set_usb_white_label_addr(&mut self, val: UsbWhiteLabelAddr)
Trait Implementations§
source§impl Clone for UsbWhiteLabelAddr
impl Clone for UsbWhiteLabelAddr
source§fn clone(&self) -> UsbWhiteLabelAddr
fn clone(&self) -> UsbWhiteLabelAddr
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for UsbWhiteLabelAddr
impl Default for UsbWhiteLabelAddr
source§fn default() -> UsbWhiteLabelAddr
fn default() -> UsbWhiteLabelAddr
source§impl PartialEq for UsbWhiteLabelAddr
impl PartialEq for UsbWhiteLabelAddr
impl Copy for UsbWhiteLabelAddr
impl Eq for UsbWhiteLabelAddr
impl StructuralPartialEq for UsbWhiteLabelAddr
Auto Trait Implementations§
impl Freeze for UsbWhiteLabelAddr
impl RefUnwindSafe for UsbWhiteLabelAddr
impl Send for UsbWhiteLabelAddr
impl Sync for UsbWhiteLabelAddr
impl Unpin for UsbWhiteLabelAddr
impl UnwindSafe for UsbWhiteLabelAddr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)