/* auto-generated, do not modify */
#pragma once
#include <fwupd-common.h>
typedef enum {
    FU_DFU_CSR_REPORT_ID_COMMAND = 0x01,
    FU_DFU_CSR_REPORT_ID_STATUS = 0x02,
    FU_DFU_CSR_REPORT_ID_CONTROL = 0x03,
} FuDfuCsrReportId;
typedef enum {
    FU_DFU_CSR_COMMAND_UPGRADE = 0x01,
} FuDfuCsrCommand;

GByteArray *fu_struct_dfu_csr_file_parse_bytes(GBytes *blob, gsize offset, GError **error);
gboolean fu_struct_dfu_csr_file_validate_bytes(GBytes *blob, gsize offset, GError **error);
guint32 fu_struct_dfu_csr_file_get_file_len(const GByteArray *st);
guint16 fu_struct_dfu_csr_file_get_file_hdr_len(const GByteArray *st);
#define FU_STRUCT_DFU_CSR_FILE_OFFSET_FILE_ID 0x0
#define FU_STRUCT_DFU_CSR_FILE_OFFSET_FILE_VERSION 0x8
#define FU_STRUCT_DFU_CSR_FILE_OFFSET_FILE_LEN 0xA
#define FU_STRUCT_DFU_CSR_FILE_OFFSET_FILE_HDR_LEN 0xE
#define FU_STRUCT_DFU_CSR_FILE_SIZE_FILE_ID 0x8
#define FU_STRUCT_DFU_CSR_FILE_SIZE 0x10
#define FU_STRUCT_DFU_CSR_FILE_DEFAULT_FILE_ID "CSR-dfu2"
#define FU_STRUCT_DFU_CSR_FILE_DEFAULT_FILE_VERSION 0x02

GByteArray *fu_struct_dfu_csr_command_header_new(void);
void fu_struct_dfu_csr_command_header_set_report_id(GByteArray *st, FuDfuCsrReportId value);
void fu_struct_dfu_csr_command_header_set_command(GByteArray *st, FuDfuCsrCommand value);
void fu_struct_dfu_csr_command_header_set_idx(GByteArray *st, guint16 value);
void fu_struct_dfu_csr_command_header_set_chunk_sz(GByteArray *st, guint16 value);
#define FU_STRUCT_DFU_CSR_COMMAND_HEADER_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_DFU_CSR_COMMAND_HEADER_OFFSET_COMMAND 0x1
#define FU_STRUCT_DFU_CSR_COMMAND_HEADER_OFFSET_IDX 0x2
#define FU_STRUCT_DFU_CSR_COMMAND_HEADER_OFFSET_CHUNK_SZ 0x4
#define FU_STRUCT_DFU_CSR_COMMAND_HEADER_SIZE 0x6
