INNER CODE UNIT · Rust

config_tlv

TheMaxMur/RS-Key · crates/rsk-devconf/src/lib.rs:125

pub fn config_tlv<S: Storage>(serial: &[u8; 4], fs: &mut Fs<S>, res: &mut ResBuf) -> Sw {
    let mut buf = [0u8; 128];
    let mut n = 1; // byte 0 = overall length, filled at the end.

    push_tlv(
        &mut buf,
        &mut n,
        TAG_USB_SUPPORTED,
        &SUPPORTED_CAPS.to_be_bytes(),
    );
    push_tlv(&mut buf, &mut n, TAG_SERIAL, serial);
    push_tlv(
        &mut buf,
        &mut n,
        TAG_FORM_FACTOR,
        &[FORM_FACTOR_USB_A_KEYCHAIN],
    );
    let (maj, min, patch) = FIRMWARE_VERSION;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…