/*
 * This file is auto-generated, do not modify!
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#pragma once
#include <fu-input-stream.h>
/**
 * FuElanTsPid:
 *
 * =========================================================================
 * SECTION 0: ELAN TS CHIP CONFIGURATION
 * =========================================================================
 */
typedef enum {
    /**
     * FU_ELAN_TS_PID_BRIDGE:
     */
    FU_ELAN_TS_PID_BRIDGE = 0x0007,
    /**
     * FU_ELAN_TS_PID_BRIDGE_B:
     */
    FU_ELAN_TS_PID_BRIDGE_B = 0x000B,
}  FuElanTsPid;
/**
 * FuElanTsReportId:
 */
typedef enum {
    /**
     * FU_ELAN_TS_REPORT_ID_FINGER:
     */
    FU_ELAN_TS_REPORT_ID_FINGER = 0x01,
    /**
     * FU_ELAN_TS_REPORT_ID_INPUT:
     */
    FU_ELAN_TS_REPORT_ID_INPUT = 0x02,
    /**
     * FU_ELAN_TS_REPORT_ID_OUTPUT:
     */
    FU_ELAN_TS_REPORT_ID_OUTPUT = 0x03,
    /**
     * FU_ELAN_TS_REPORT_ID_PEN:
     */
    FU_ELAN_TS_REPORT_ID_PEN = 0x07,
    /**
     * FU_ELAN_TS_REPORT_ID_PEN_DEBUG:
     */
    FU_ELAN_TS_REPORT_ID_PEN_DEBUG = 0x17,
}  FuElanTsReportId;
/**
 * FuElanTsMemAddr:
 */
typedef enum {
    /**
     * FU_ELAN_TS_MEM_ADDR_INFO_PAGE_WRITE:
     */
    FU_ELAN_TS_MEM_ADDR_INFO_PAGE_WRITE = 0x0040,
    /**
     * FU_ELAN_TS_MEM_ADDR_INFO_ROM:
     */
    FU_ELAN_TS_MEM_ADDR_INFO_ROM = 0x8000,
    /**
     * FU_ELAN_TS_MEM_ADDR_REMARK_ID:
     */
    FU_ELAN_TS_MEM_ADDR_REMARK_ID = 0x801F,
    /**
     * FU_ELAN_TS_MEM_ADDR_PAGE1:
     */
    FU_ELAN_TS_MEM_ADDR_PAGE1 = 0x8040,
    /**
     * FU_ELAN_TS_MEM_ADDR_UPDATE_COUNTER:
     */
    FU_ELAN_TS_MEM_ADDR_UPDATE_COUNTER = 0x8060,
    /**
     * FU_ELAN_TS_MEM_ADDR_LAST_UPDATE_YEAR:
     */
    FU_ELAN_TS_MEM_ADDR_LAST_UPDATE_YEAR = 0x8061,
    /**
     * FU_ELAN_TS_MEM_ADDR_LAST_UPDATE_MONTH_DAY:
     */
    FU_ELAN_TS_MEM_ADDR_LAST_UPDATE_MONTH_DAY = 0x8062,
    /**
     * FU_ELAN_TS_MEM_ADDR_LAST_UPDATE_TIME:
     */
    FU_ELAN_TS_MEM_ADDR_LAST_UPDATE_TIME = 0x8063,
    /**
     * FU_ELAN_TS_MEM_ADDR_INFO_ROM_FWID:
     */
    FU_ELAN_TS_MEM_ADDR_INFO_ROM_FWID = 0x8080,
}  FuElanTsMemAddr;
/**
 * FuElanTsFwType:
 *
 * Enumeration of FwType Value of FW BIN Header
 */
typedef enum {
    /**
     * FU_ELAN_TS_FW_TYPE_UNKNOWN:
     */
    FU_ELAN_TS_FW_TYPE_UNKNOWN = 0x00,
    /**
     * FU_ELAN_TS_FW_TYPE_EKT:
     */
    FU_ELAN_TS_FW_TYPE_EKT = 0x01,
    /**
     * FU_ELAN_TS_FW_TYPE_EKTL:
     */
    FU_ELAN_TS_FW_TYPE_EKTL = 0x02,
}  FuElanTsFwType;
/**
 * FuElanTsDebugSetting:
 *
 * Enumeration of Debug Setting Value of FW BIN Header
 */
typedef enum {
    /**
     * FU_ELAN_TS_DEBUG_SETTING_NONE:
     */
    FU_ELAN_TS_DEBUG_SETTING_NONE = 0,
    /**
     * FU_ELAN_TS_DEBUG_SETTING_ENABLE_DEBUG_MSG:
     */
    FU_ELAN_TS_DEBUG_SETTING_ENABLE_DEBUG_MSG = 1 << 0,
    /**
     * FU_ELAN_TS_DEBUG_SETTING_SKIP_INFO_DATA_UPDATE:
     */
    FU_ELAN_TS_DEBUG_SETTING_SKIP_INFO_DATA_UPDATE = 1 << 1,
    /**
     * FU_ELAN_TS_DEBUG_SETTING_SKIP_REMARK_ID_CHECK:
     */
    FU_ELAN_TS_DEBUG_SETTING_SKIP_REMARK_ID_CHECK = 1 << 2,
    /**
     * FU_ELAN_TS_DEBUG_SETTING_FORCE_UPDATE:
     */
    FU_ELAN_TS_DEBUG_SETTING_FORCE_UPDATE = 1 << 3,
} G_GNUC_FLAG_ENUM FuElanTsDebugSetting;
/**
 * FuElanTsState:
 *
 * Enumeration of State of Elan Touchscreen Controller
 */
typedef enum {
    /**
     * FU_ELAN_TS_STATE_UNKNOWN:
     */
    FU_ELAN_TS_STATE_UNKNOWN = 0x00,
    /**
     * FU_ELAN_TS_STATE_NORMAL_MODE:
     */
    FU_ELAN_TS_STATE_NORMAL_MODE = 0x01,
    /**
     * FU_ELAN_TS_STATE_RECOVERY_MODE:
     */
    FU_ELAN_TS_STATE_RECOVERY_MODE = 0x02,
}  FuElanTsState;
/**
 * FuElanTsSolutionId:
 *
 * Solution ID (High Byte of FW Version) with multi-IC and repack suffix mapping
 */
typedef enum {
    /**
     * FU_ELAN_TS_SOLUTION_ID_EKTH6315X1:
     *
     * Single eKTH6315 IC solution
     */
    FU_ELAN_TS_SOLUTION_ID_EKTH6315X1 = 0x61,
    /**
     * FU_ELAN_TS_SOLUTION_ID_EKTH6315X2:
     *
     * eKTH6315 Multi-IC solution (2 cascading ICs)
     */
    FU_ELAN_TS_SOLUTION_ID_EKTH6315X2 = 0x62,
    /**
     * FU_ELAN_TS_SOLUTION_ID_EKTH6315_TO_5015M:
     *
     * eKTH6315 remarked to 5015M Repack solution
     */
    FU_ELAN_TS_SOLUTION_ID_EKTH6315_TO_5015M = 0x59,
    /**
     * FU_ELAN_TS_SOLUTION_ID_EKTH6315_TO_3915P:
     *
     * eKTH6315 remarked to 3915P Repack solution
     */
    FU_ELAN_TS_SOLUTION_ID_EKTH6315_TO_3915P = 0x15,
    /**
     * FU_ELAN_TS_SOLUTION_ID_EKTH6308X1:
     *
     * Single eKTH6308 IC solution
     */
    FU_ELAN_TS_SOLUTION_ID_EKTH6308X1 = 0x63,
    /**
     * FU_ELAN_TS_SOLUTION_ID_EKTH7315X1:
     *
     * Single eKTH7315 IC solution
     */
    FU_ELAN_TS_SOLUTION_ID_EKTH7315X1 = 0x64,
    /**
     * FU_ELAN_TS_SOLUTION_ID_EKTH7315X2:
     *
     * eKTH7315 Multi-IC solution (2 cascading ICs)
     */
    FU_ELAN_TS_SOLUTION_ID_EKTH7315X2 = 0x65,
    /**
     * FU_ELAN_TS_SOLUTION_ID_EKTH7318X1:
     *
     * Single eKTH7318 IC solution
     */
    FU_ELAN_TS_SOLUTION_ID_EKTH7318X1 = 0x67,
}  FuElanTsSolutionId;
/**
 * FuElanTsBcVerHighByte:
 *
 * High Byte of Boot Code Version with multi-IC and repack suffix mapping
 */
typedef enum {
    /**
     * FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTA6315X1:
     *
     * Single eKTA6315 IC solution
     */
    FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTA6315X1 = 0xA7,
    /**
     * FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTH6315_TO_5015M:
     *
     * eKTH6315 remarked to 5015M Repack solution
     */
    FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTH6315_TO_5015M = 0xE6,
    /**
     * FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTH6315_TO_3915P:
     *
     * eKTH6315 remarked to 3915P Repack solution
     */
    FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTH6315_TO_3915P = 0xF6,
    /**
     * FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTA6308X1:
     *
     * Single eKTA6308 IC solution
     */
    FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTA6308X1 = 0xA8,
    /**
     * FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTA7315X1:
     *
     * Single eKTA7315 IC solution
     */
    FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTA7315X1 = 0xA9,
    /**
     * FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTH7318X1:
     *
     * Single eKTH7318 IC solution
     */
    FU_ELAN_TS_BC_VER_HIGH_BYTE_EKTH7318X1 = 0xAA,
}  FuElanTsBcVerHighByte;
/**
 * FuElanTsVendorCmd:
 *
 * =========================================================================
 * SECTION 2: ELAN TS VENDOR COMMAND (1-BYTE) & RESPONSE
 * =========================================================================
 * Enumeration of Single-byte Vendor Commands
 */
typedef enum {
    /**
     * FU_ELAN_TS_VENDOR_CMD_READ_HELLO_PKT_AND_BC_VER:
     */
    FU_ELAN_TS_VENDOR_CMD_READ_HELLO_PKT_AND_BC_VER = 0x18,
    /**
     * FU_ELAN_TS_VENDOR_CMD_FLASH_WRITE:
     */
    FU_ELAN_TS_VENDOR_CMD_FLASH_WRITE = 0x22,
}  FuElanTsVendorCmd;
const gchar *fu_elan_ts_vendor_cmd_to_string(FuElanTsVendorCmd val) G_GNUC_CONST;
/**
 * FuElanTsHelloPacket:
 *
 * Hello Packet values for Elan Touchscreen
 */
typedef enum {
    /**
     * FU_ELAN_TS_HELLO_PACKET_NORMAL_MODE:
     */
    FU_ELAN_TS_HELLO_PACKET_NORMAL_MODE = 0x20,
    /**
     * FU_ELAN_TS_HELLO_PACKET_RECOVERY_MODE:
     */
    FU_ELAN_TS_HELLO_PACKET_RECOVERY_MODE = 0x56,
}  FuElanTsHelloPacket;
/**
 * FuElanTsCmdType:
 *
 * =========================================================================
 * SECTION 3: ELAN TS COMMAND (4-BYTE) & RESPONSE
 * =========================================================================
 * Command types
 */
typedef enum {
    /**
     * FU_ELAN_TS_CMD_TYPE_READ_CMD:
     */
    FU_ELAN_TS_CMD_TYPE_READ_CMD = 0x53,
    /**
     * FU_ELAN_TS_CMD_TYPE_WRITE_CMD:
     */
    FU_ELAN_TS_CMD_TYPE_WRITE_CMD = 0x54,
    /**
     * FU_ELAN_TS_CMD_TYPE_SHOW_BULK_ROM_DATA_CMD:
     */
    FU_ELAN_TS_CMD_TYPE_SHOW_BULK_ROM_DATA_CMD = 0x59,
    /**
     * FU_ELAN_TS_CMD_TYPE_READ_ROM_DATA_CMD:
     */
    FU_ELAN_TS_CMD_TYPE_READ_ROM_DATA_CMD = 0x96,
}  FuElanTsCmdType;
const gchar *fu_elan_ts_cmd_type_to_string(FuElanTsCmdType val) G_GNUC_CONST;
/**
 * FuElanTsWriteCmdId:
 *
 * Command identifiers for write operations
 */
typedef enum {
    /**
     * FU_ELAN_TS_WRITE_CMD_ID_ENTER_IAP:
     */
    FU_ELAN_TS_WRITE_CMD_ID_ENTER_IAP = 0x00,
    /**
     * FU_ELAN_TS_WRITE_CMD_ID_REK:
     */
    FU_ELAN_TS_WRITE_CMD_ID_REK = 0x29,
    /**
     * FU_ELAN_TS_WRITE_CMD_ID_WRITE_FLASH_KEY:
     */
    FU_ELAN_TS_WRITE_CMD_ID_WRITE_FLASH_KEY = 0xC0,
}  FuElanTsWriteCmdId;
const gchar *fu_elan_ts_write_cmd_id_to_string(FuElanTsWriteCmdId val) G_GNUC_CONST;
/**
 * FuElanTsRspType:
 *
 * Response types
 */
typedef enum {
    /**
     * FU_ELAN_TS_RSP_TYPE_READ_CMD_RSP:
     */
    FU_ELAN_TS_RSP_TYPE_READ_CMD_RSP = 0x52,
    /**
     * FU_ELAN_TS_RSP_TYPE_READ_ROM_CMD_RSP:
     */
    FU_ELAN_TS_RSP_TYPE_READ_ROM_CMD_RSP = 0x95,
    /**
     * FU_ELAN_TS_RSP_TYPE_SHOW_BULK_ROM_DATA_CMD_RSP:
     */
    FU_ELAN_TS_RSP_TYPE_SHOW_BULK_ROM_DATA_CMD_RSP = 0x99,
}  FuElanTsRspType;
const gchar *fu_elan_ts_rsp_type_to_string(FuElanTsRspType val) G_GNUC_CONST;
/**
 * FuElanTsReadCmdId:
 *
 * Command identifiers for read operations
 */
typedef enum {
    /**
     * FU_ELAN_TS_READ_CMD_ID_FW_VERSION:
     */
    FU_ELAN_TS_READ_CMD_ID_FW_VERSION = 0x00,
    /**
     * FU_ELAN_TS_READ_CMD_ID_BOOT_CODE_VERSION:
     */
    FU_ELAN_TS_READ_CMD_ID_BOOT_CODE_VERSION = 0x10,
    /**
     * FU_ELAN_TS_READ_CMD_ID_TEST_SOLUTION_VERSION:
     */
    FU_ELAN_TS_READ_CMD_ID_TEST_SOLUTION_VERSION = 0xE0,
    /**
     * FU_ELAN_TS_READ_CMD_ID_FW_ID:
     */
    FU_ELAN_TS_READ_CMD_ID_FW_ID = 0xF0,
}  FuElanTsReadCmdId;
const gchar *fu_elan_ts_read_cmd_id_to_string(FuElanTsReadCmdId val) G_GNUC_CONST;
/**
 * FuElanTsReadRomCmdMode:
 *
 * =========================================================================
 * SECTION 4: ELAN TS COMMAND (6-BYTE) & RESPONSE
 * =========================================================================
 * mode specification based on ic generation for read rom data command
 */
typedef enum {
    /**
     * FU_ELAN_TS_READ_ROM_CMD_MODE_EKTH53XX:
     */
    FU_ELAN_TS_READ_ROM_CMD_MODE_EKTH53XX = 0x11,
    /**
     * FU_ELAN_TS_READ_ROM_CMD_MODE_EKTH63XX_73XX:
     */
    FU_ELAN_TS_READ_ROM_CMD_MODE_EKTH63XX_73XX = 0x21,
}  FuElanTsReadRomCmdMode;
const gchar *fu_elan_ts_read_rom_cmd_mode_to_string(FuElanTsReadRomCmdMode val) G_GNUC_CONST;
/**
 * FuElanTsShowBulkRomMode:
 *
 * operating modes used in Show Bulk ROM Data Command
 */
typedef enum {
    /**
     * FU_ELAN_TS_SHOW_BULK_ROM_MODE_BOOT_CODE:
     */
    FU_ELAN_TS_SHOW_BULK_ROM_MODE_BOOT_CODE = 0x00,
    /**
     * FU_ELAN_TS_SHOW_BULK_ROM_MODE_MAIN_CODE:
     */
    FU_ELAN_TS_SHOW_BULK_ROM_MODE_MAIN_CODE = 0x10,
}  FuElanTsShowBulkRomMode;
const gchar *fu_elan_ts_show_bulk_rom_mode_to_string(FuElanTsShowBulkRomMode val) G_GNUC_CONST;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsInfoPage;

FuStructElanTsInfoPage *fu_struct_elan_ts_info_page_ref(FuStructElanTsInfoPage *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_info_page_unref(FuStructElanTsInfoPage *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsInfoPage, fu_struct_elan_ts_info_page_unref)
FuStructElanTsInfoPage *fu_struct_elan_ts_info_page_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elan_ts_info_page_get_update_counter(const FuStructElanTsInfoPage *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elan_ts_info_page_get_update_year(const FuStructElanTsInfoPage *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_elan_ts_info_page_get_update_month(const FuStructElanTsInfoPage *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_elan_ts_info_page_get_update_day(const FuStructElanTsInfoPage *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_elan_ts_info_page_get_update_hour(const FuStructElanTsInfoPage *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_elan_ts_info_page_get_update_minute(const FuStructElanTsInfoPage *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_ts_info_page_set_update_counter(FuStructElanTsInfoPage *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_info_page_set_update_year(FuStructElanTsInfoPage *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_info_page_set_update_month(FuStructElanTsInfoPage *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_info_page_set_update_day(FuStructElanTsInfoPage *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_info_page_set_update_hour(FuStructElanTsInfoPage *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_info_page_set_update_minute(FuStructElanTsInfoPage *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_INFO_PAGE_OFFSET_UPDATE_COUNTER 0x40
#define FU_STRUCT_ELAN_TS_INFO_PAGE_OFFSET_UPDATE_YEAR 0x42
#define FU_STRUCT_ELAN_TS_INFO_PAGE_OFFSET_UPDATE_MONTH 0x44
#define FU_STRUCT_ELAN_TS_INFO_PAGE_OFFSET_UPDATE_DAY 0x45
#define FU_STRUCT_ELAN_TS_INFO_PAGE_OFFSET_UPDATE_HOUR 0x46
#define FU_STRUCT_ELAN_TS_INFO_PAGE_OFFSET_UPDATE_MINUTE 0x47
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_INFO_PAGE_SIZE 0x80
#endif

#ifndef __GI_SCANNER__
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsFwBinHeaderLvfsType1;

FuStructElanTsFwBinHeaderLvfsType1 *fu_struct_elan_ts_fw_bin_header_lvfs_type1_ref(FuStructElanTsFwBinHeaderLvfsType1 *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_fw_bin_header_lvfs_type1_unref(FuStructElanTsFwBinHeaderLvfsType1 *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsFwBinHeaderLvfsType1, fu_struct_elan_ts_fw_bin_header_lvfs_type1_unref)
FuStructElanTsFwBinHeaderLvfsType1 *fu_struct_elan_ts_fw_bin_header_lvfs_type1_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_struct_elan_ts_fw_bin_header_lvfs_type1_validate_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuElanTsFwType fu_struct_elan_ts_fw_bin_header_lvfs_type1_get_fw_type(const FuStructElanTsFwBinHeaderLvfsType1 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_elan_ts_fw_bin_header_lvfs_type1_get_debug(const FuStructElanTsFwBinHeaderLvfsType1 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_elan_ts_fw_bin_header_lvfs_type1_get_security_code(const FuStructElanTsFwBinHeaderLvfsType1 *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_elan_ts_fw_bin_header_lvfs_type1_get_bin_size(const FuStructElanTsFwBinHeaderLvfsType1 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_BIN_HEADER_LVFS_TYPE1_OFFSET_FW_BIN_HEADER_GUID 0x0
#define FU_STRUCT_ELAN_TS_FW_BIN_HEADER_LVFS_TYPE1_OFFSET_FW_TYPE 0x10
#define FU_STRUCT_ELAN_TS_FW_BIN_HEADER_LVFS_TYPE1_OFFSET_DEBUG 0x11
#define FU_STRUCT_ELAN_TS_FW_BIN_HEADER_LVFS_TYPE1_OFFSET_SECURITY_CODE 0x15
#define FU_STRUCT_ELAN_TS_FW_BIN_HEADER_LVFS_TYPE1_OFFSET_BIN_SIZE 0x35
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_BIN_HEADER_LVFS_TYPE1_SIZE_SECURITY_CODE 0x20
#define FU_STRUCT_ELAN_TS_FW_BIN_HEADER_LVFS_TYPE1_N_ELEMENTS_SECURITY_CODE 32
#define FU_STRUCT_ELAN_TS_FW_BIN_HEADER_LVFS_TYPE1_SIZE 0x439
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_BIN_HEADER_LVFS_TYPE1_DEFAULT_FW_BIN_HEADER_GUID "\x10\xe2\x8d\x99\x81\x19\xbf\x4e\x87\x4f\x27\xbd\x6c\x26\x44\x84"
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsInputReport;

FuStructElanTsInputReport *fu_struct_elan_ts_input_report_ref(FuStructElanTsInputReport *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_input_report_unref(FuStructElanTsInputReport *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsInputReport, fu_struct_elan_ts_input_report_unref)
FuStructElanTsInputReport *fu_struct_elan_ts_input_report_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuElanTsReportId fu_struct_elan_ts_input_report_get_report_id(const FuStructElanTsInputReport *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_elan_ts_input_report_get_data_len(const FuStructElanTsInputReport *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_elan_ts_input_report_get_payload(const FuStructElanTsInputReport *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_INPUT_REPORT_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_ELAN_TS_INPUT_REPORT_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_ELAN_TS_INPUT_REPORT_OFFSET_PAYLOAD 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_INPUT_REPORT_SIZE_PAYLOAD 0x3F
#define FU_STRUCT_ELAN_TS_INPUT_REPORT_N_ELEMENTS_PAYLOAD 63
#define FU_STRUCT_ELAN_TS_INPUT_REPORT_SIZE 0x41
#endif

#ifndef __GI_SCANNER__
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsHidWriteFrameData;

FuStructElanTsHidWriteFrameData *fu_struct_elan_ts_hid_write_frame_data_ref(FuStructElanTsHidWriteFrameData *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_hid_write_frame_data_unref(FuStructElanTsHidWriteFrameData *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsHidWriteFrameData, fu_struct_elan_ts_hid_write_frame_data_unref)
FuStructElanTsHidWriteFrameData *fu_struct_elan_ts_hid_write_frame_data_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_ts_hid_write_frame_data_set_offset(FuStructElanTsHidWriteFrameData *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_hid_write_frame_data_set_data_len(FuStructElanTsHidWriteFrameData *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_HID_WRITE_FRAME_DATA_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_ELAN_TS_HID_WRITE_FRAME_DATA_OFFSET_SUBCOMMAND 0x1
#define FU_STRUCT_ELAN_TS_HID_WRITE_FRAME_DATA_OFFSET_OFFSET 0x2
#define FU_STRUCT_ELAN_TS_HID_WRITE_FRAME_DATA_OFFSET_DATA_LEN 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_HID_WRITE_FRAME_DATA_SIZE 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_HID_WRITE_FRAME_DATA_DEFAULT_REPORT_ID FU_ELAN_TS_REPORT_ID_OUTPUT
#define FU_STRUCT_ELAN_TS_HID_WRITE_FRAME_DATA_DEFAULT_SUBCOMMAND 0x21
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsHidWriteCommand;

FuStructElanTsHidWriteCommand *fu_struct_elan_ts_hid_write_command_ref(FuStructElanTsHidWriteCommand *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_hid_write_command_unref(FuStructElanTsHidWriteCommand *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsHidWriteCommand, fu_struct_elan_ts_hid_write_command_unref)
FuStructElanTsHidWriteCommand *fu_struct_elan_ts_hid_write_command_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_ts_hid_write_command_set_report_id(FuStructElanTsHidWriteCommand *st, FuElanTsReportId value) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_hid_write_command_set_data_len(FuStructElanTsHidWriteCommand *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_HID_WRITE_COMMAND_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_ELAN_TS_HID_WRITE_COMMAND_OFFSET_SUBCOMMAND 0x1
#define FU_STRUCT_ELAN_TS_HID_WRITE_COMMAND_OFFSET_DATA_LEN 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_HID_WRITE_COMMAND_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_HID_WRITE_COMMAND_DEFAULT_REPORT_ID FU_ELAN_TS_REPORT_ID_OUTPUT
#define FU_STRUCT_ELAN_TS_HID_WRITE_COMMAND_DEFAULT_SUBCOMMAND 0x00
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsVendorCmd;

FuStructElanTsVendorCmd *fu_struct_elan_ts_vendor_cmd_ref(FuStructElanTsVendorCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_vendor_cmd_unref(FuStructElanTsVendorCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsVendorCmd, fu_struct_elan_ts_vendor_cmd_unref)
FuStructElanTsVendorCmd *fu_struct_elan_ts_vendor_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_ts_vendor_cmd_set_cmd(FuStructElanTsVendorCmd *st, FuElanTsVendorCmd value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_VENDOR_CMD_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_ELAN_TS_VENDOR_CMD_OFFSET_CMD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_VENDOR_CMD_SIZE 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_VENDOR_CMD_DEFAULT_REPORT_ID FU_ELAN_TS_REPORT_ID_OUTPUT
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsHelloPktAndBcVerRsp;

FuStructElanTsHelloPktAndBcVerRsp *fu_struct_elan_ts_hello_pkt_and_bc_ver_rsp_ref(FuStructElanTsHelloPktAndBcVerRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_hello_pkt_and_bc_ver_rsp_unref(FuStructElanTsHelloPktAndBcVerRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsHelloPktAndBcVerRsp, fu_struct_elan_ts_hello_pkt_and_bc_ver_rsp_unref)
FuStructElanTsHelloPktAndBcVerRsp *fu_struct_elan_ts_hello_pkt_and_bc_ver_rsp_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuElanTsHelloPacket fu_struct_elan_ts_hello_pkt_and_bc_ver_rsp_get_hello_packet(const FuStructElanTsHelloPktAndBcVerRsp *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elan_ts_hello_pkt_and_bc_ver_rsp_get_bc_version(const FuStructElanTsHelloPktAndBcVerRsp *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_HELLO_PKT_AND_BC_VER_RSP_OFFSET_HELLO_PACKET 0x0
#define FU_STRUCT_ELAN_TS_HELLO_PKT_AND_BC_VER_RSP_OFFSET_BC_VERSION 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_HELLO_PKT_AND_BC_VER_RSP_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsFlashWriteRsp;

FuStructElanTsFlashWriteRsp *fu_struct_elan_ts_flash_write_rsp_ref(FuStructElanTsFlashWriteRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_flash_write_rsp_unref(FuStructElanTsFlashWriteRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsFlashWriteRsp, fu_struct_elan_ts_flash_write_rsp_unref)
FuStructElanTsFlashWriteRsp *fu_struct_elan_ts_flash_write_rsp_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FLASH_WRITE_RSP_OFFSET_PAYLOAD 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FLASH_WRITE_RSP_SIZE 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FLASH_WRITE_RSP_DEFAULT_PAYLOAD 0xAAAA
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsI2cAddrCmd;

FuStructElanTsI2cAddrCmd *fu_struct_elan_ts_i2c_addr_cmd_ref(FuStructElanTsI2cAddrCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_i2c_addr_cmd_unref(FuStructElanTsI2cAddrCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsI2cAddrCmd, fu_struct_elan_ts_i2c_addr_cmd_unref)
FuStructElanTsI2cAddrCmd *fu_struct_elan_ts_i2c_addr_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_I2C_ADDR_CMD_OFFSET_ADDR_7BIT 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_I2C_ADDR_CMD_SIZE 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_I2C_ADDR_CMD_DEFAULT_ADDR_7BIT 0x10
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsI2cAddrRsp;

FuStructElanTsI2cAddrRsp *fu_struct_elan_ts_i2c_addr_rsp_ref(FuStructElanTsI2cAddrRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_i2c_addr_rsp_unref(FuStructElanTsI2cAddrRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsI2cAddrRsp, fu_struct_elan_ts_i2c_addr_rsp_unref)
FuStructElanTsI2cAddrRsp *fu_struct_elan_ts_i2c_addr_rsp_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_I2C_ADDR_RSP_OFFSET_ADDR_8BIT 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_I2C_ADDR_RSP_SIZE 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_I2C_ADDR_RSP_DEFAULT_ADDR_8BIT 0x20
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsWriteCmd;

FuStructElanTsWriteCmd *fu_struct_elan_ts_write_cmd_ref(FuStructElanTsWriteCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_write_cmd_unref(FuStructElanTsWriteCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsWriteCmd, fu_struct_elan_ts_write_cmd_unref)
FuStructElanTsWriteCmd *fu_struct_elan_ts_write_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_ts_write_cmd_set_cmd_id(FuStructElanTsWriteCmd *st, FuElanTsWriteCmdId value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_WRITE_CMD_OFFSET_CMD_TYPE 0x0
#define FU_STRUCT_ELAN_TS_WRITE_CMD_OFFSET_CMD_ID 0x1
#define FU_STRUCT_ELAN_TS_WRITE_CMD_OFFSET_PAYLOAD 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_WRITE_CMD_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_WRITE_CMD_DEFAULT_CMD_TYPE FU_ELAN_TS_CMD_TYPE_WRITE_CMD
#define FU_STRUCT_ELAN_TS_WRITE_CMD_DEFAULT_PAYLOAD 0x0001
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsReadCmd;

FuStructElanTsReadCmd *fu_struct_elan_ts_read_cmd_ref(FuStructElanTsReadCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_read_cmd_unref(FuStructElanTsReadCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsReadCmd, fu_struct_elan_ts_read_cmd_unref)
FuStructElanTsReadCmd *fu_struct_elan_ts_read_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_ts_read_cmd_set_cmd_id(FuStructElanTsReadCmd *st, FuElanTsReadCmdId value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_READ_CMD_OFFSET_CMD_TYPE 0x0
#define FU_STRUCT_ELAN_TS_READ_CMD_OFFSET_CMD_ID 0x1
#define FU_STRUCT_ELAN_TS_READ_CMD_OFFSET_PAYLOAD 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_READ_CMD_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_READ_CMD_DEFAULT_CMD_TYPE FU_ELAN_TS_CMD_TYPE_READ_CMD
#define FU_STRUCT_ELAN_TS_READ_CMD_DEFAULT_PAYLOAD 0x0001
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsEnterIapCmd;

FuStructElanTsEnterIapCmd *fu_struct_elan_ts_enter_iap_cmd_ref(FuStructElanTsEnterIapCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_enter_iap_cmd_unref(FuStructElanTsEnterIapCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsEnterIapCmd, fu_struct_elan_ts_enter_iap_cmd_unref)
FuStructElanTsEnterIapCmd *fu_struct_elan_ts_enter_iap_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_ENTER_IAP_CMD_OFFSET_CMD_TYPE 0x0
#define FU_STRUCT_ELAN_TS_ENTER_IAP_CMD_OFFSET_CMD_ID 0x1
#define FU_STRUCT_ELAN_TS_ENTER_IAP_CMD_OFFSET_PAYLOAD 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_ENTER_IAP_CMD_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_ENTER_IAP_CMD_DEFAULT_CMD_TYPE FU_ELAN_TS_CMD_TYPE_WRITE_CMD
#define FU_STRUCT_ELAN_TS_ENTER_IAP_CMD_DEFAULT_CMD_ID FU_ELAN_TS_WRITE_CMD_ID_ENTER_IAP
#define FU_STRUCT_ELAN_TS_ENTER_IAP_CMD_DEFAULT_PAYLOAD 0x1234
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsWriteFlashKeyCmd;

FuStructElanTsWriteFlashKeyCmd *fu_struct_elan_ts_write_flash_key_cmd_ref(FuStructElanTsWriteFlashKeyCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_write_flash_key_cmd_unref(FuStructElanTsWriteFlashKeyCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsWriteFlashKeyCmd, fu_struct_elan_ts_write_flash_key_cmd_unref)
FuStructElanTsWriteFlashKeyCmd *fu_struct_elan_ts_write_flash_key_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_WRITE_FLASH_KEY_CMD_OFFSET_CMD_TYPE 0x0
#define FU_STRUCT_ELAN_TS_WRITE_FLASH_KEY_CMD_OFFSET_CMD_ID 0x1
#define FU_STRUCT_ELAN_TS_WRITE_FLASH_KEY_CMD_OFFSET_PAYLOAD 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_WRITE_FLASH_KEY_CMD_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_WRITE_FLASH_KEY_CMD_DEFAULT_CMD_TYPE FU_ELAN_TS_CMD_TYPE_WRITE_CMD
#define FU_STRUCT_ELAN_TS_WRITE_FLASH_KEY_CMD_DEFAULT_CMD_ID FU_ELAN_TS_WRITE_CMD_ID_WRITE_FLASH_KEY
#define FU_STRUCT_ELAN_TS_WRITE_FLASH_KEY_CMD_DEFAULT_PAYLOAD 0xE15A
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsRekCmd;

FuStructElanTsRekCmd *fu_struct_elan_ts_rek_cmd_ref(FuStructElanTsRekCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_rek_cmd_unref(FuStructElanTsRekCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsRekCmd, fu_struct_elan_ts_rek_cmd_unref)
FuStructElanTsRekCmd *fu_struct_elan_ts_rek_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_REK_CMD_OFFSET_CMD_TYPE 0x0
#define FU_STRUCT_ELAN_TS_REK_CMD_OFFSET_CMD_ID 0x1
#define FU_STRUCT_ELAN_TS_REK_CMD_OFFSET_PAYLOAD 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_REK_CMD_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_REK_CMD_DEFAULT_CMD_TYPE FU_ELAN_TS_CMD_TYPE_WRITE_CMD
#define FU_STRUCT_ELAN_TS_REK_CMD_DEFAULT_CMD_ID FU_ELAN_TS_WRITE_CMD_ID_REK
#define FU_STRUCT_ELAN_TS_REK_CMD_DEFAULT_PAYLOAD 0x0001
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsCalibrationRsp;

FuStructElanTsCalibrationRsp *fu_struct_elan_ts_calibration_rsp_ref(FuStructElanTsCalibrationRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_calibration_rsp_unref(FuStructElanTsCalibrationRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsCalibrationRsp, fu_struct_elan_ts_calibration_rsp_unref)
FuStructElanTsCalibrationRsp *fu_struct_elan_ts_calibration_rsp_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_CALIBRATION_RSP_OFFSET_PAYLOAD 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_CALIBRATION_RSP_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_CALIBRATION_RSP_DEFAULT_PAYLOAD 0x66666666
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsBcVersionCmd;

FuStructElanTsBcVersionCmd *fu_struct_elan_ts_bc_version_cmd_ref(FuStructElanTsBcVersionCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_bc_version_cmd_unref(FuStructElanTsBcVersionCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsBcVersionCmd, fu_struct_elan_ts_bc_version_cmd_unref)
FuStructElanTsBcVersionCmd *fu_struct_elan_ts_bc_version_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_BC_VERSION_CMD_OFFSET_CMD_TYPE 0x0
#define FU_STRUCT_ELAN_TS_BC_VERSION_CMD_OFFSET_CMD_ID 0x1
#define FU_STRUCT_ELAN_TS_BC_VERSION_CMD_OFFSET_PAYLOAD 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_BC_VERSION_CMD_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_BC_VERSION_CMD_DEFAULT_CMD_TYPE FU_ELAN_TS_CMD_TYPE_READ_CMD
#define FU_STRUCT_ELAN_TS_BC_VERSION_CMD_DEFAULT_CMD_ID FU_ELAN_TS_READ_CMD_ID_BOOT_CODE_VERSION
#define FU_STRUCT_ELAN_TS_BC_VERSION_CMD_DEFAULT_PAYLOAD 0x0001
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsBcVersionRsp;

FuStructElanTsBcVersionRsp *fu_struct_elan_ts_bc_version_rsp_ref(FuStructElanTsBcVersionRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_bc_version_rsp_unref(FuStructElanTsBcVersionRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsBcVersionRsp, fu_struct_elan_ts_bc_version_rsp_unref)
FuStructElanTsBcVersionRsp *fu_struct_elan_ts_bc_version_rsp_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_elan_ts_bc_version_rsp_get_payload(const FuStructElanTsBcVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_BC_VERSION_RSP_OFFSET_RSP_TYPE 0x0
#define FU_STRUCT_ELAN_TS_BC_VERSION_RSP_OFFSET_PAYLOAD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_BC_VERSION_RSP_SIZE_PAYLOAD 0x3
#define FU_STRUCT_ELAN_TS_BC_VERSION_RSP_N_ELEMENTS_PAYLOAD 3
#define FU_STRUCT_ELAN_TS_BC_VERSION_RSP_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_BC_VERSION_RSP_DEFAULT_RSP_TYPE FU_ELAN_TS_RSP_TYPE_READ_CMD_RSP
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsFwIdCmd;

FuStructElanTsFwIdCmd *fu_struct_elan_ts_fw_id_cmd_ref(FuStructElanTsFwIdCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_fw_id_cmd_unref(FuStructElanTsFwIdCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsFwIdCmd, fu_struct_elan_ts_fw_id_cmd_unref)
FuStructElanTsFwIdCmd *fu_struct_elan_ts_fw_id_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_ID_CMD_OFFSET_CMD_TYPE 0x0
#define FU_STRUCT_ELAN_TS_FW_ID_CMD_OFFSET_CMD_ID 0x1
#define FU_STRUCT_ELAN_TS_FW_ID_CMD_OFFSET_PAYLOAD 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_ID_CMD_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_ID_CMD_DEFAULT_CMD_TYPE FU_ELAN_TS_CMD_TYPE_READ_CMD
#define FU_STRUCT_ELAN_TS_FW_ID_CMD_DEFAULT_CMD_ID FU_ELAN_TS_READ_CMD_ID_FW_ID
#define FU_STRUCT_ELAN_TS_FW_ID_CMD_DEFAULT_PAYLOAD 0x0001
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsFwIdRsp;

FuStructElanTsFwIdRsp *fu_struct_elan_ts_fw_id_rsp_ref(FuStructElanTsFwIdRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_fw_id_rsp_unref(FuStructElanTsFwIdRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsFwIdRsp, fu_struct_elan_ts_fw_id_rsp_unref)
FuStructElanTsFwIdRsp *fu_struct_elan_ts_fw_id_rsp_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_elan_ts_fw_id_rsp_get_payload(const FuStructElanTsFwIdRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_ID_RSP_OFFSET_RSP_TYPE 0x0
#define FU_STRUCT_ELAN_TS_FW_ID_RSP_OFFSET_PAYLOAD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_ID_RSP_SIZE_PAYLOAD 0x3
#define FU_STRUCT_ELAN_TS_FW_ID_RSP_N_ELEMENTS_PAYLOAD 3
#define FU_STRUCT_ELAN_TS_FW_ID_RSP_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_ID_RSP_DEFAULT_RSP_TYPE FU_ELAN_TS_RSP_TYPE_READ_CMD_RSP
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsFwVersionCmd;

FuStructElanTsFwVersionCmd *fu_struct_elan_ts_fw_version_cmd_ref(FuStructElanTsFwVersionCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_fw_version_cmd_unref(FuStructElanTsFwVersionCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsFwVersionCmd, fu_struct_elan_ts_fw_version_cmd_unref)
FuStructElanTsFwVersionCmd *fu_struct_elan_ts_fw_version_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_VERSION_CMD_OFFSET_CMD_TYPE 0x0
#define FU_STRUCT_ELAN_TS_FW_VERSION_CMD_OFFSET_CMD_ID 0x1
#define FU_STRUCT_ELAN_TS_FW_VERSION_CMD_OFFSET_PAYLOAD 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_VERSION_CMD_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_VERSION_CMD_DEFAULT_CMD_TYPE FU_ELAN_TS_CMD_TYPE_READ_CMD
#define FU_STRUCT_ELAN_TS_FW_VERSION_CMD_DEFAULT_CMD_ID FU_ELAN_TS_READ_CMD_ID_FW_VERSION
#define FU_STRUCT_ELAN_TS_FW_VERSION_CMD_DEFAULT_PAYLOAD 0x0001
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsFwVersionRsp;

FuStructElanTsFwVersionRsp *fu_struct_elan_ts_fw_version_rsp_ref(FuStructElanTsFwVersionRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_fw_version_rsp_unref(FuStructElanTsFwVersionRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsFwVersionRsp, fu_struct_elan_ts_fw_version_rsp_unref)
FuStructElanTsFwVersionRsp *fu_struct_elan_ts_fw_version_rsp_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_elan_ts_fw_version_rsp_get_payload(const FuStructElanTsFwVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_VERSION_RSP_OFFSET_RSP_TYPE 0x0
#define FU_STRUCT_ELAN_TS_FW_VERSION_RSP_OFFSET_PAYLOAD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_VERSION_RSP_SIZE_PAYLOAD 0x3
#define FU_STRUCT_ELAN_TS_FW_VERSION_RSP_N_ELEMENTS_PAYLOAD 3
#define FU_STRUCT_ELAN_TS_FW_VERSION_RSP_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_FW_VERSION_RSP_DEFAULT_RSP_TYPE FU_ELAN_TS_RSP_TYPE_READ_CMD_RSP
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsTestSolutionVersionCmd;

FuStructElanTsTestSolutionVersionCmd *fu_struct_elan_ts_test_solution_version_cmd_ref(FuStructElanTsTestSolutionVersionCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_test_solution_version_cmd_unref(FuStructElanTsTestSolutionVersionCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsTestSolutionVersionCmd, fu_struct_elan_ts_test_solution_version_cmd_unref)
FuStructElanTsTestSolutionVersionCmd *fu_struct_elan_ts_test_solution_version_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_CMD_OFFSET_CMD_TYPE 0x0
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_CMD_OFFSET_CMD_ID 0x1
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_CMD_OFFSET_PAYLOAD 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_CMD_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_CMD_DEFAULT_CMD_TYPE FU_ELAN_TS_CMD_TYPE_READ_CMD
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_CMD_DEFAULT_CMD_ID FU_ELAN_TS_READ_CMD_ID_TEST_SOLUTION_VERSION
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_CMD_DEFAULT_PAYLOAD 0x0001
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsTestSolutionVersionRsp;

FuStructElanTsTestSolutionVersionRsp *fu_struct_elan_ts_test_solution_version_rsp_ref(FuStructElanTsTestSolutionVersionRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_test_solution_version_rsp_unref(FuStructElanTsTestSolutionVersionRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsTestSolutionVersionRsp, fu_struct_elan_ts_test_solution_version_rsp_unref)
FuStructElanTsTestSolutionVersionRsp *fu_struct_elan_ts_test_solution_version_rsp_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_elan_ts_test_solution_version_rsp_get_payload(const FuStructElanTsTestSolutionVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_RSP_OFFSET_RSP_TYPE 0x0
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_RSP_OFFSET_PAYLOAD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_RSP_SIZE_PAYLOAD 0x3
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_RSP_N_ELEMENTS_PAYLOAD 3
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_RSP_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_TEST_SOLUTION_VERSION_RSP_DEFAULT_RSP_TYPE FU_ELAN_TS_RSP_TYPE_READ_CMD_RSP
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsEnterTestModeCmd;

FuStructElanTsEnterTestModeCmd *fu_struct_elan_ts_enter_test_mode_cmd_ref(FuStructElanTsEnterTestModeCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_enter_test_mode_cmd_unref(FuStructElanTsEnterTestModeCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsEnterTestModeCmd, fu_struct_elan_ts_enter_test_mode_cmd_unref)
FuStructElanTsEnterTestModeCmd *fu_struct_elan_ts_enter_test_mode_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_ENTER_TEST_MODE_CMD_OFFSET_PAYLOAD 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_ENTER_TEST_MODE_CMD_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_ENTER_TEST_MODE_CMD_DEFAULT_PAYLOAD 0x55555555
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsExitTestModeCmd;

FuStructElanTsExitTestModeCmd *fu_struct_elan_ts_exit_test_mode_cmd_ref(FuStructElanTsExitTestModeCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_exit_test_mode_cmd_unref(FuStructElanTsExitTestModeCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsExitTestModeCmd, fu_struct_elan_ts_exit_test_mode_cmd_unref)
FuStructElanTsExitTestModeCmd *fu_struct_elan_ts_exit_test_mode_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_EXIT_TEST_MODE_CMD_OFFSET_PAYLOAD 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_EXIT_TEST_MODE_CMD_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_EXIT_TEST_MODE_CMD_DEFAULT_PAYLOAD 0xA5A5A5A5
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsReadRomCmd;

FuStructElanTsReadRomCmd *fu_struct_elan_ts_read_rom_cmd_ref(FuStructElanTsReadRomCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_read_rom_cmd_unref(FuStructElanTsReadRomCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsReadRomCmd, fu_struct_elan_ts_read_rom_cmd_unref)
FuStructElanTsReadRomCmd *fu_struct_elan_ts_read_rom_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_ts_read_rom_cmd_set_mem_addr(FuStructElanTsReadRomCmd *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_read_rom_cmd_set_mode(FuStructElanTsReadRomCmd *st, FuElanTsReadRomCmdMode value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_READ_ROM_CMD_OFFSET_CMD_TYPE 0x0
#define FU_STRUCT_ELAN_TS_READ_ROM_CMD_OFFSET_MEM_ADDR 0x1
#define FU_STRUCT_ELAN_TS_READ_ROM_CMD_OFFSET_PAD 0x3
#define FU_STRUCT_ELAN_TS_READ_ROM_CMD_OFFSET_MODE 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_READ_ROM_CMD_SIZE 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_READ_ROM_CMD_DEFAULT_CMD_TYPE FU_ELAN_TS_CMD_TYPE_READ_ROM_DATA_CMD
#define FU_STRUCT_ELAN_TS_READ_ROM_CMD_DEFAULT_PAD 0x0000
#define FU_STRUCT_ELAN_TS_READ_ROM_CMD_DEFAULT_MODE FU_ELAN_TS_READ_ROM_CMD_MODE_EKTH53XX
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsReadRomRsp;

FuStructElanTsReadRomRsp *fu_struct_elan_ts_read_rom_rsp_ref(FuStructElanTsReadRomRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_read_rom_rsp_unref(FuStructElanTsReadRomRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsReadRomRsp, fu_struct_elan_ts_read_rom_rsp_unref)
FuStructElanTsReadRomRsp *fu_struct_elan_ts_read_rom_rsp_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elan_ts_read_rom_rsp_get_mem_addr(const FuStructElanTsReadRomRsp *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elan_ts_read_rom_rsp_get_rom_data(const FuStructElanTsReadRomRsp *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuElanTsReadRomCmdMode fu_struct_elan_ts_read_rom_rsp_get_mode(const FuStructElanTsReadRomRsp *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_READ_ROM_RSP_OFFSET_HEADER 0x0
#define FU_STRUCT_ELAN_TS_READ_ROM_RSP_OFFSET_MEM_ADDR 0x1
#define FU_STRUCT_ELAN_TS_READ_ROM_RSP_OFFSET_ROM_DATA 0x3
#define FU_STRUCT_ELAN_TS_READ_ROM_RSP_OFFSET_MODE 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_READ_ROM_RSP_SIZE 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_READ_ROM_RSP_DEFAULT_HEADER FU_ELAN_TS_RSP_TYPE_READ_ROM_CMD_RSP
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsShowBulkRomDataCmd;

FuStructElanTsShowBulkRomDataCmd *fu_struct_elan_ts_show_bulk_rom_data_cmd_ref(FuStructElanTsShowBulkRomDataCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_show_bulk_rom_data_cmd_unref(FuStructElanTsShowBulkRomDataCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsShowBulkRomDataCmd, fu_struct_elan_ts_show_bulk_rom_data_cmd_unref)
FuStructElanTsShowBulkRomDataCmd *fu_struct_elan_ts_show_bulk_rom_data_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_ts_show_bulk_rom_data_cmd_set_mode(FuStructElanTsShowBulkRomDataCmd *st, FuElanTsShowBulkRomMode value) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_show_bulk_rom_data_cmd_set_mem_addr(FuStructElanTsShowBulkRomDataCmd *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_show_bulk_rom_data_cmd_set_data_size_words(FuStructElanTsShowBulkRomDataCmd *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_DATA_CMD_OFFSET_CMD_TYPE 0x0
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_DATA_CMD_OFFSET_MODE 0x1
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_DATA_CMD_OFFSET_MEM_ADDR 0x2
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_DATA_CMD_OFFSET_DATA_SIZE_WORDS 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_DATA_CMD_SIZE 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_DATA_CMD_DEFAULT_CMD_TYPE FU_ELAN_TS_CMD_TYPE_SHOW_BULK_ROM_DATA_CMD
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_DATA_CMD_DEFAULT_MODE FU_ELAN_TS_SHOW_BULK_ROM_MODE_MAIN_CODE
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanTsShowBulkRomRsp;

FuStructElanTsShowBulkRomRsp *fu_struct_elan_ts_show_bulk_rom_rsp_ref(FuStructElanTsShowBulkRomRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_ts_show_bulk_rom_rsp_unref(FuStructElanTsShowBulkRomRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanTsShowBulkRomRsp, fu_struct_elan_ts_show_bulk_rom_rsp_unref)
FuStructElanTsShowBulkRomRsp *fu_struct_elan_ts_show_bulk_rom_rsp_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_elan_ts_show_bulk_rom_rsp_get_frame_index(const FuStructElanTsShowBulkRomRsp *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_elan_ts_show_bulk_rom_rsp_get_data_size_words(const FuStructElanTsShowBulkRomRsp *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_elan_ts_show_bulk_rom_rsp_get_data(const FuStructElanTsShowBulkRomRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_RSP_OFFSET_HEADER 0x0
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_RSP_OFFSET_FRAME_INDEX 0x1
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_RSP_OFFSET_DATA_SIZE_WORDS 0x2
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_RSP_OFFSET_DATA 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_RSP_SIZE_DATA 0x3C
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_RSP_N_ELEMENTS_DATA 60
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_RSP_SIZE 0x3F
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_TS_SHOW_BULK_ROM_RSP_DEFAULT_HEADER FU_ELAN_TS_RSP_TYPE_SHOW_BULK_ROM_DATA_CMD_RSP
#endif
