/* auto-generated, do not modify */
#pragma once
#include <fwupd-common.h>
typedef enum {
    FU_KINETIC_DP_FAMILY_UNKNOWN,
    FU_KINETIC_DP_FAMILY_MUSTANG,
    FU_KINETIC_DP_FAMILY_JAGUAR,
    FU_KINETIC_DP_FAMILY_PUMA,
} FuKineticDpFamily;
const gchar *fu_kinetic_dp_family_to_string(FuKineticDpFamily val);
typedef enum {
    FU_KINETIC_DP_CHIP_NONE = 0,
    FU_KINETIC_DP_CHIP_BOBCAT_2800 = 1,
    FU_KINETIC_DP_CHIP_BOBCAT_2850 = 2,
    FU_KINETIC_DP_CHIP_PEGASUS = 3,
    FU_KINETIC_DP_CHIP_MYSTIQUE = 4,
    FU_KINETIC_DP_CHIP_DP2VGA = 5,
    FU_KINETIC_DP_CHIP_PUMA_2900 = 6,
    FU_KINETIC_DP_CHIP_PUMA_2920 = 7,
    FU_KINETIC_DP_CHIP_JAGUAR_5000 = 8,
    FU_KINETIC_DP_CHIP_MUSTANG_5200 = 9,
} FuKineticDpChip;
const gchar *fu_kinetic_dp_chip_to_string(FuKineticDpChip val);
typedef enum {
    FU_KINETIC_DP_DEV_HOST = 0,
    FU_KINETIC_DP_DEV_PORT1 = 1,
    FU_KINETIC_DP_DEV_PORT2 = 2,
    FU_KINETIC_DP_DEV_PORT3 = 3,
    FU_KINETIC_DP_DEV_MAX_NUM = 4,
} FuKineticDpDev;
typedef enum {
    FU_KINETIC_DP_BANK_A = 0,
    FU_KINETIC_DP_BANK_B = 1,
    FU_KINETIC_DP_BANK_NONE = 0xFF,
} FuKineticDpBank;
const gchar *fu_kinetic_dp_bank_to_string(FuKineticDpBank val);
typedef enum {
    FU_KINETIC_DP_FIRMWARE_IDX_ISP_DRV = 0,
    FU_KINETIC_DP_FIRMWARE_IDX_APP_FW = 1,
} FuKineticDpFirmwareIdx;
typedef enum {
    FU_KINETIC_DP_FW_STATE_NONE = 0,
    FU_KINETIC_DP_FW_STATE_IROM = 1,
    FU_KINETIC_DP_FW_STATE_BOOT_CODE = 2,
    FU_KINETIC_DP_FW_STATE_APP = 3,
} FuKineticDpFwState;
const gchar *fu_kinetic_dp_fw_state_to_string(FuKineticDpFwState val);
typedef enum {
    FU_KINETIC_DP_PUMA_MODE_CHUNK_PROCESSED = 0x03,
    FU_KINETIC_DP_PUMA_MODE_CHUNK_RECEIVED = 0x07,
    FU_KINETIC_DP_PUMA_MODE_FLASH_INFO_READY = 0xA1,
    FU_KINETIC_DP_PUMA_MODE_UPDATE_ABORT = 0x55,
} FuKineticDpPumaMode;
const gchar *fu_kinetic_dp_puma_mode_to_string(FuKineticDpPumaMode val);
typedef enum {
    FU_KINETIC_DP_PUMA_REQUEST_CHIP_RESET_REQUEST = 0,
    FU_KINETIC_DP_PUMA_REQUEST_CODE_LOAD_REQUEST = 0x01,
    FU_KINETIC_DP_PUMA_REQUEST_CODE_LOAD_READY = 0x03,
    FU_KINETIC_DP_PUMA_REQUEST_CODE_BOOTUP_DONE = 0x07,
    FU_KINETIC_DP_PUMA_REQUEST_CMDB_GETINFO_REQ = 0xA0,
    FU_KINETIC_DP_PUMA_REQUEST_CMDB_GETINFO_READ = 0xA1,
    FU_KINETIC_DP_PUMA_REQUEST_CMDB_GETINFO_INVALID = 0xA2,
    FU_KINETIC_DP_PUMA_REQUEST_CMDB_GETINFO_DONE = 0xA3,
    FU_KINETIC_DP_PUMA_REQUEST_FLASH_ERASE_DONE = 0xE0,
    FU_KINETIC_DP_PUMA_REQUEST_FLASH_RRASE_FAIL = 0xE1,
    FU_KINETIC_DP_PUMA_REQUEST_FLASH_RRASE_REQUEST = 0xEE,
    FU_KINETIC_DP_PUMA_REQUEST_FW_UPDATE_DONE = 0xF8,
    FU_KINETIC_DP_PUMA_REQUEST_FW_UPDATE_READY = 0xFC,
    FU_KINETIC_DP_PUMA_REQUEST_FW_UPDATE_REQUEST = 0xFE,
} FuKineticDpPumaRequest;
typedef enum {
    FU_KINETIC_DP_DPCD_CMD_STS_NONE = 0x0,
    FU_KINETIC_DP_DPCD_STS_INVALID_INFO = 0x01,
    FU_KINETIC_DP_DPCD_STS_CRC_FAILURE = 0x02,
    FU_KINETIC_DP_DPCD_STS_INVALID_IMAGE = 0x03,
    FU_KINETIC_DP_DPCD_STS_SECURE_ENABLED = 0x04,
    FU_KINETIC_DP_DPCD_STS_SECURE_DISABLED = 0x05,
    FU_KINETIC_DP_DPCD_STS_SPI_FLASH_FAILURE = 0x06,
    FU_KINETIC_DP_DPCD_CMD_PREPARE_FOR_ISP_MODE = 0x23,
    FU_KINETIC_DP_DPCD_CMD_ENTER_CODE_LOADING_MODE = 0x24,
    FU_KINETIC_DP_DPCD_CMD_EXECUTE_RAM_CODE = 0x25,
    FU_KINETIC_DP_DPCD_CMD_ENTER_FW_UPDATE_MODE = 0x26,
    FU_KINETIC_DP_DPCD_CMD_CHUNK_DATA_PROCESSED = 0x27,
    FU_KINETIC_DP_DPCD_CMD_INSTALL_IMAGES = 0x28,
    FU_KINETIC_DP_DPCD_CMD_RESET_SYSTEM = 0x29,
    FU_KINETIC_DP_DPCD_CMD_ENABLE_AUX_FORWARD = 0x31,
    FU_KINETIC_DP_DPCD_CMD_DISABLE_AUX_FORWARD = 0x32,
    FU_KINETIC_DP_DPCD_CMD_GET_ACTIVE_FLASH_BANK = 0x33,
    FU_KINETIC_DP_DPCD_CMD_RESERVED = 0x7f,
} FuKineticDpDpcd;
const gchar *fu_kinetic_dp_dpcd_to_string(FuKineticDpDpcd val);

GByteArray *fu_struct_kinetic_dp_puma_header_parse_bytes(GBytes *blob, gsize offset, GError **error);
#define FU_STRUCT_KINETIC_DP_PUMA_HEADER_OFFSET_OBJECT_COUNT 0x1
#define FU_STRUCT_KINETIC_DP_PUMA_HEADER_SIZE 0x2
#define FU_STRUCT_KINETIC_DP_PUMA_HEADER_DEFAULT_OBJECT_COUNT 8

GByteArray *fu_struct_kinetic_dp_puma_header_info_parse_bytes(GBytes *blob, gsize offset, GError **error);
guint8 fu_struct_kinetic_dp_puma_header_info_get_type(const GByteArray *st);
guint8 fu_struct_kinetic_dp_puma_header_info_get_subtype(const GByteArray *st);
guint32 fu_struct_kinetic_dp_puma_header_info_get_length(const GByteArray *st);
#define FU_STRUCT_KINETIC_DP_PUMA_HEADER_INFO_OFFSET_TYPE 0x0
#define FU_STRUCT_KINETIC_DP_PUMA_HEADER_INFO_OFFSET_SUBTYPE 0x1
#define FU_STRUCT_KINETIC_DP_PUMA_HEADER_INFO_OFFSET_LENGTH 0x2
#define FU_STRUCT_KINETIC_DP_PUMA_HEADER_INFO_SIZE 0x6

GByteArray *fu_struct_kinetic_dp_jaguar_footer_parse_bytes(GBytes *blob, gsize offset, GError **error);
guint32 fu_struct_kinetic_dp_jaguar_footer_get_app_id_struct_ver(const GByteArray *st);
const guint8 *fu_struct_kinetic_dp_jaguar_footer_get_app_id(const GByteArray *st, gsize *bufsz);
guint32 fu_struct_kinetic_dp_jaguar_footer_get_app_ver_id(const GByteArray *st);
guint16 fu_struct_kinetic_dp_jaguar_footer_get_fw_ver(const GByteArray *st);
guint8 fu_struct_kinetic_dp_jaguar_footer_get_fw_rev(const GByteArray *st);
guint8 fu_struct_kinetic_dp_jaguar_footer_get_customer_fw_project_id(const GByteArray *st);
guint16 fu_struct_kinetic_dp_jaguar_footer_get_customer_fw_ver(const GByteArray *st);
guint8 fu_struct_kinetic_dp_jaguar_footer_get_chip_rev(const GByteArray *st);
guint8 fu_struct_kinetic_dp_jaguar_footer_get_is_fpga_enabled(const GByteArray *st);
#define FU_STRUCT_KINETIC_DP_JAGUAR_FOOTER_OFFSET_APP_ID_STRUCT_VER 0x0
#define FU_STRUCT_KINETIC_DP_JAGUAR_FOOTER_OFFSET_APP_ID 0x4
#define FU_STRUCT_KINETIC_DP_JAGUAR_FOOTER_OFFSET_APP_VER_ID 0x8
#define FU_STRUCT_KINETIC_DP_JAGUAR_FOOTER_OFFSET_FW_VER 0xC
#define FU_STRUCT_KINETIC_DP_JAGUAR_FOOTER_OFFSET_FW_REV 0xE
#define FU_STRUCT_KINETIC_DP_JAGUAR_FOOTER_OFFSET_CUSTOMER_FW_PROJECT_ID 0xF
#define FU_STRUCT_KINETIC_DP_JAGUAR_FOOTER_OFFSET_CUSTOMER_FW_VER 0x10
#define FU_STRUCT_KINETIC_DP_JAGUAR_FOOTER_OFFSET_CHIP_REV 0x12
#define FU_STRUCT_KINETIC_DP_JAGUAR_FOOTER_OFFSET_IS_FPGA_ENABLED 0x13
#define FU_STRUCT_KINETIC_DP_JAGUAR_FOOTER_SIZE_APP_ID 0x4
#define FU_STRUCT_KINETIC_DP_JAGUAR_FOOTER_SIZE 0x20

GByteArray *fu_struct_kinetic_dp_flash_info_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint16 fu_struct_kinetic_dp_flash_info_get_id(const GByteArray *st);
guint16 fu_struct_kinetic_dp_flash_info_get_size(const GByteArray *st);
guint16 fu_struct_kinetic_dp_flash_info_get_erase_time(const GByteArray *st);
#define FU_STRUCT_KINETIC_DP_FLASH_INFO_OFFSET_ID 0x0
#define FU_STRUCT_KINETIC_DP_FLASH_INFO_OFFSET_SIZE 0x2
#define FU_STRUCT_KINETIC_DP_FLASH_INFO_OFFSET_ERASE_TIME 0x4
#define FU_STRUCT_KINETIC_DP_FLASH_INFO_SIZE 0x6
