// Copyright (C) 2023 Richard Hughes <richard@hughsie.com>
// SPDX-License-Identifier: LGPL-2.1+

#[derive(New, Validate, Parse)]
struct CfuRspGetFirmwareVersion {
    component_cnt: u8,
    _reserved: u16le,
    flags: u8,
}
#[derive(New, Validate, Parse)]
struct CfuRspGetFirmwareVersionComponent {
    fw_version: u32le,
    flags: u8,
    component_id: u8,
    _vendor_specific: u16le,
}
#[derive(Parse)]
struct CfuRspFirmwareUpdateOffer {
    _reserved1: [u8; 3],
    token: u8,
    _reserved2: [u8; 4],
    rr_code: u8,
    _reserved3: [u8; 3],
    status: u8,
    _reserved3: [u8; 3],
}
#[derive(New, Getters)]
struct CfuReqFirmwareUpdateContent {
    flags: u8,
    data_length: u8,
    seq_number: u16le,
    address: u32le,
}
#[derive(New, Getters)]
struct CfuRspFirmwareUpdateContent {
    seq_number: u16le,
    _reserved1: u16le,
    status: u8,
    _reserved2: [u8; 3],
    _reserved3: [u8; 4],
    _reserved4: [u8; 4],
}
