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

#pragma once
#include <fu-input-stream.h>
/**
 * FuElanKbdEp:
 *
 * bootloader endpoints
 */
typedef enum {
    /**
     * FU_ELAN_KBD_EP_CMD:
     */
    FU_ELAN_KBD_EP_CMD = 0x01,
    /**
     * FU_ELAN_KBD_EP_STATUS:
     */
    FU_ELAN_KBD_EP_STATUS = 0x82,
    /**
     * FU_ELAN_KBD_EP_DATA_OUT:
     */
    FU_ELAN_KBD_EP_DATA_OUT = 0x03,
    /**
     * FU_ELAN_KBD_EP_DATA_IN:
     */
    FU_ELAN_KBD_EP_DATA_IN = 0x84,
}  FuElanKbdEp;
/**
 * FuElanKbdFirmwareIdx:
 */
typedef enum {
    /**
     * FU_ELAN_KBD_FIRMWARE_IDX_BOOTLOADER:
     */
    FU_ELAN_KBD_FIRMWARE_IDX_BOOTLOADER,
    /**
     * FU_ELAN_KBD_FIRMWARE_IDX_APP:
     */
    FU_ELAN_KBD_FIRMWARE_IDX_APP,
    /**
     * FU_ELAN_KBD_FIRMWARE_IDX_OPTION:
     */
    FU_ELAN_KBD_FIRMWARE_IDX_OPTION,
}  FuElanKbdFirmwareIdx;
#define FU_ELAN_KBD_FIRMWARE_IDX_LAST 3
/**
 * FuElanKbdCmd:
 */
typedef enum {
    /**
     * FU_ELAN_KBD_CMD_ENTRY_IAP:
     */
    FU_ELAN_KBD_CMD_ENTRY_IAP = 0x20,
    /**
     * FU_ELAN_KBD_CMD_FINISHED_IAP:
     */
    FU_ELAN_KBD_CMD_FINISHED_IAP = 0x21,
    /**
     * FU_ELAN_KBD_CMD_CANCEL_IAP:
     */
    FU_ELAN_KBD_CMD_CANCEL_IAP = 0x23,
    /**
     * FU_ELAN_KBD_CMD_SOFTWARE_RESET:
     */
    FU_ELAN_KBD_CMD_SOFTWARE_RESET = 0x24,
    /**
     * FU_ELAN_KBD_CMD_BOOT_CONDITION:
     */
    FU_ELAN_KBD_CMD_BOOT_CONDITION = 0x25,
    /**
     * FU_ELAN_KBD_CMD_GET_VER_SPEC:
     */
    FU_ELAN_KBD_CMD_GET_VER_SPEC = 0x40,
    /**
     * FU_ELAN_KBD_CMD_GET_VER_FW:
     */
    FU_ELAN_KBD_CMD_GET_VER_FW = 0x41,
    /**
     * FU_ELAN_KBD_CMD_GET_STATUS:
     */
    FU_ELAN_KBD_CMD_GET_STATUS = 0x42,
    /**
     * FU_ELAN_KBD_CMD_EXIT_AUTH_MODE:
     */
    FU_ELAN_KBD_CMD_EXIT_AUTH_MODE = 0x43,
    /**
     * FU_ELAN_KBD_CMD_GET_AUTH_LOCK:
     */
    FU_ELAN_KBD_CMD_GET_AUTH_LOCK = 0x44,
    /**
     * FU_ELAN_KBD_CMD_SET_AUTH_LOCK:
     */
    FU_ELAN_KBD_CMD_SET_AUTH_LOCK = 0x45,
    /**
     * FU_ELAN_KBD_CMD_ABORT:
     */
    FU_ELAN_KBD_CMD_ABORT = 0x46,
    /**
     * FU_ELAN_KBD_CMD_GET_CHECKSUM:
     */
    FU_ELAN_KBD_CMD_GET_CHECKSUM = 0x47,
    /**
     * FU_ELAN_KBD_CMD_WRITE_ROM:
     */
    FU_ELAN_KBD_CMD_WRITE_ROM = 0xA0,
    /**
     * FU_ELAN_KBD_CMD_WRITE_ROM_FINISH:
     */
    FU_ELAN_KBD_CMD_WRITE_ROM_FINISH = 0xA1,
    /**
     * FU_ELAN_KBD_CMD_WRITE_OPTION:
     */
    FU_ELAN_KBD_CMD_WRITE_OPTION = 0xA2,
    /**
     * FU_ELAN_KBD_CMD_WRITE_OPTION_FINISH:
     */
    FU_ELAN_KBD_CMD_WRITE_OPTION_FINISH = 0xA3,
    /**
     * FU_ELAN_KBD_CMD_WRITE_CHECKSUM:
     */
    FU_ELAN_KBD_CMD_WRITE_CHECKSUM = 0xA4,
    /**
     * FU_ELAN_KBD_CMD_WRITE_CUSTOM_INFO:
     */
    FU_ELAN_KBD_CMD_WRITE_CUSTOM_INFO = 0xA5,
    /**
     * FU_ELAN_KBD_CMD_WRITE_CUSTOM_INFO_FINISH:
     */
    FU_ELAN_KBD_CMD_WRITE_CUSTOM_INFO_FINISH = 0xA6,
    /**
     * FU_ELAN_KBD_CMD_READ_ROM:
     */
    FU_ELAN_KBD_CMD_READ_ROM = 0xE0,
    /**
     * FU_ELAN_KBD_CMD_READ_ROM_FINISH:
     */
    FU_ELAN_KBD_CMD_READ_ROM_FINISH = 0xE1,
    /**
     * FU_ELAN_KBD_CMD_READ_OPTION:
     */
    FU_ELAN_KBD_CMD_READ_OPTION = 0xE2,
    /**
     * FU_ELAN_KBD_CMD_READ_OPTION_FINISH:
     */
    FU_ELAN_KBD_CMD_READ_OPTION_FINISH = 0xE3,
    /**
     * FU_ELAN_KBD_CMD_READ_DATA_REQUEST:
     */
    FU_ELAN_KBD_CMD_READ_DATA_REQUEST = 0xE4,
}  FuElanKbdCmd;
/**
 * FuElanKbdDevStatus:
 */
typedef enum {
    /**
     * FU_ELAN_KBD_DEV_STATUS_UNKNOWN:
     */
    FU_ELAN_KBD_DEV_STATUS_UNKNOWN,
    /**
     * FU_ELAN_KBD_DEV_STATUS_IDLE:
     */
    FU_ELAN_KBD_DEV_STATUS_IDLE,
    /**
     * FU_ELAN_KBD_DEV_STATUS_IAP:
     */
    FU_ELAN_KBD_DEV_STATUS_IAP,
    /**
     * FU_ELAN_KBD_DEV_STATUS_WRITE_ROM:
     */
    FU_ELAN_KBD_DEV_STATUS_WRITE_ROM,
    /**
     * FU_ELAN_KBD_DEV_STATUS_WRITE_OPT:
     */
    FU_ELAN_KBD_DEV_STATUS_WRITE_OPT,
    /**
     * FU_ELAN_KBD_DEV_STATUS_WRITE_CSUM:
     */
    FU_ELAN_KBD_DEV_STATUS_WRITE_CSUM,
    /**
     * FU_ELAN_KBD_DEV_STATUS_READ_ROM:
     */
    FU_ELAN_KBD_DEV_STATUS_READ_ROM,
    /**
     * FU_ELAN_KBD_DEV_STATUS_READ_OPT:
     */
    FU_ELAN_KBD_DEV_STATUS_READ_OPT,
}  FuElanKbdDevStatus;
#define FU_ELAN_KBD_DEV_STATUS_LAST 8
const gchar *fu_elan_kbd_dev_status_to_string(FuElanKbdDevStatus val) G_GNUC_CONST;
/**
 * FuElanKbdStatus:
 */
typedef enum {
    /**
     * FU_ELAN_KBD_STATUS_UNKNOWN:
     */
    FU_ELAN_KBD_STATUS_UNKNOWN,
    /**
     * FU_ELAN_KBD_STATUS_READY:
     */
    FU_ELAN_KBD_STATUS_READY,
    /**
     * FU_ELAN_KBD_STATUS_BUSY:
     */
    FU_ELAN_KBD_STATUS_BUSY,
    /**
     * FU_ELAN_KBD_STATUS_SUCCESS:
     */
    FU_ELAN_KBD_STATUS_SUCCESS,
    /**
     * FU_ELAN_KBD_STATUS_FAIL:
     */
    FU_ELAN_KBD_STATUS_FAIL,
    /**
     * FU_ELAN_KBD_STATUS_ERROR:
     */
    FU_ELAN_KBD_STATUS_ERROR,
}  FuElanKbdStatus;
#define FU_ELAN_KBD_STATUS_LAST 6
/**
 * FuElanKbdError:
 */
typedef enum {
    /**
     * FU_ELAN_KBD_ERROR_UNKNOWN:
     */
    FU_ELAN_KBD_ERROR_UNKNOWN,
    /**
     * FU_ELAN_KBD_ERROR_UNKNOWN_COMMAND:
     */
    FU_ELAN_KBD_ERROR_UNKNOWN_COMMAND,
    /**
     * FU_ELAN_KBD_ERROR_COMMAND_STAGE:
     */
    FU_ELAN_KBD_ERROR_COMMAND_STAGE,
    /**
     * FU_ELAN_KBD_ERROR_DATA_STAGE:
     */
    FU_ELAN_KBD_ERROR_DATA_STAGE,
    /**
     * FU_ELAN_KBD_ERROR_ROM_ADDRESS_INVALID:
     */
    FU_ELAN_KBD_ERROR_ROM_ADDRESS_INVALID,
    /**
     * FU_ELAN_KBD_ERROR_AUTHORITY_KEY_INCORRECT:
     */
    FU_ELAN_KBD_ERROR_AUTHORITY_KEY_INCORRECT,
    /**
     * FU_ELAN_KBD_ERROR_WRITE_ROM_NOT_FINISHED:
     */
    FU_ELAN_KBD_ERROR_WRITE_ROM_NOT_FINISHED,
    /**
     * FU_ELAN_KBD_ERROR_WRITE_OPTION_NOT_FINISHED:
     */
    FU_ELAN_KBD_ERROR_WRITE_OPTION_NOT_FINISHED,
    /**
     * FU_ELAN_KBD_ERROR_LENGTH_TOO_BIG:
     */
    FU_ELAN_KBD_ERROR_LENGTH_TOO_BIG,
    /**
     * FU_ELAN_KBD_ERROR_LENGTH_TOO_SMALL:
     */
    FU_ELAN_KBD_ERROR_LENGTH_TOO_SMALL,
    /**
     * FU_ELAN_KBD_ERROR_CHECKSUM_INCORRECT:
     */
    FU_ELAN_KBD_ERROR_CHECKSUM_INCORRECT,
    /**
     * FU_ELAN_KBD_ERROR_WRITE_FLASH_ABNORMAL:
     */
    FU_ELAN_KBD_ERROR_WRITE_FLASH_ABNORMAL,
    /**
     * FU_ELAN_KBD_ERROR_OVER_ROM_AREA:
     */
    FU_ELAN_KBD_ERROR_OVER_ROM_AREA,
    /**
     * FU_ELAN_KBD_ERROR_ROM_PAGE_INVALID:
     */
    FU_ELAN_KBD_ERROR_ROM_PAGE_INVALID,
    /**
     * FU_ELAN_KBD_ERROR_FLASH_KEY_INVALID:
     */
    FU_ELAN_KBD_ERROR_FLASH_KEY_INVALID,
    /**
     * FU_ELAN_KBD_ERROR_OPTION_ROM_ADDRESS_INVALID:
     */
    FU_ELAN_KBD_ERROR_OPTION_ROM_ADDRESS_INVALID,
}  FuElanKbdError;
#define FU_ELAN_KBD_ERROR_LAST 16
const gchar *fu_elan_kbd_error_to_string(FuElanKbdError val) G_GNUC_CONST;
/**
 * FuElanKbdBootCond1:
 */
typedef enum {
    /**
     * FU_ELAN_KBD_BOOT_COND1_UNKNOWN:
     */
    FU_ELAN_KBD_BOOT_COND1_UNKNOWN = 0,
    /**
     * FU_ELAN_KBD_BOOT_COND1_P80_ENTRY:
     */
    FU_ELAN_KBD_BOOT_COND1_P80_ENTRY = 1,
    /**
     * FU_ELAN_KBD_BOOT_COND1_NO_APP_ENTRY:
     */
    FU_ELAN_KBD_BOOT_COND1_NO_APP_ENTRY = 2,
    /**
     * FU_ELAN_KBD_BOOT_COND1_APP_JUMP_ENTRY:
     */
    FU_ELAN_KBD_BOOT_COND1_APP_JUMP_ENTRY = 4,
}  FuElanKbdBootCond1;
const gchar *fu_elan_kbd_boot_cond1_to_string(FuElanKbdBootCond1 val) G_GNUC_CONST;
/**
 * FuElanKbdChecksumType:
 */
typedef enum {
    /**
     * FU_ELAN_KBD_CHECKSUM_TYPE_BOOT:
     */
    FU_ELAN_KBD_CHECKSUM_TYPE_BOOT,
    /**
     * FU_ELAN_KBD_CHECKSUM_TYPE_MAIN:
     */
    FU_ELAN_KBD_CHECKSUM_TYPE_MAIN,
}  FuElanKbdChecksumType;
#define FU_ELAN_KBD_CHECKSUM_TYPE_LAST 2
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdFirmware;

FuStructElanKbdFirmware *fu_struct_elan_kbd_firmware_ref(FuStructElanKbdFirmware *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_firmware_unref(FuStructElanKbdFirmware *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdFirmware, fu_struct_elan_kbd_firmware_unref)
gboolean fu_struct_elan_kbd_firmware_validate_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_FIRMWARE_OFFSET_RESET_VECTOR 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_FIRMWARE_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_FIRMWARE_DEFAULT_RESET_VECTOR 0x21FAFF02
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdGetVerSpecReq;

FuStructElanKbdGetVerSpecReq *fu_struct_elan_kbd_get_ver_spec_req_ref(FuStructElanKbdGetVerSpecReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_get_ver_spec_req_unref(FuStructElanKbdGetVerSpecReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdGetVerSpecReq, fu_struct_elan_kbd_get_ver_spec_req_unref)
FuStructElanKbdGetVerSpecReq *fu_struct_elan_kbd_get_ver_spec_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_VER_SPEC_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_GET_VER_SPEC_REQ_OFFSET_CMD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_VER_SPEC_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_VER_SPEC_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_GET_VER_SPEC_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_GET_VER_SPEC
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdGetVerSpecRes;

FuStructElanKbdGetVerSpecRes *fu_struct_elan_kbd_get_ver_spec_res_ref(FuStructElanKbdGetVerSpecRes *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_get_ver_spec_res_unref(FuStructElanKbdGetVerSpecRes *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdGetVerSpecRes, fu_struct_elan_kbd_get_ver_spec_res_unref)
FuStructElanKbdGetVerSpecRes *fu_struct_elan_kbd_get_ver_spec_res_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elan_kbd_get_ver_spec_res_get_value(const FuStructElanKbdGetVerSpecRes *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_VER_SPEC_RES_OFFSET_VALUE 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_VER_SPEC_RES_SIZE 0x2
#endif

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

FuStructElanKbdGetVerFwReq *fu_struct_elan_kbd_get_ver_fw_req_ref(FuStructElanKbdGetVerFwReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_get_ver_fw_req_unref(FuStructElanKbdGetVerFwReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdGetVerFwReq, fu_struct_elan_kbd_get_ver_fw_req_unref)
FuStructElanKbdGetVerFwReq *fu_struct_elan_kbd_get_ver_fw_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_VER_FW_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_GET_VER_FW_REQ_OFFSET_CMD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_VER_FW_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_VER_FW_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_GET_VER_FW_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_GET_VER_FW
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdGetVerFwRes;

FuStructElanKbdGetVerFwRes *fu_struct_elan_kbd_get_ver_fw_res_ref(FuStructElanKbdGetVerFwRes *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_get_ver_fw_res_unref(FuStructElanKbdGetVerFwRes *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdGetVerFwRes, fu_struct_elan_kbd_get_ver_fw_res_unref)
FuStructElanKbdGetVerFwRes *fu_struct_elan_kbd_get_ver_fw_res_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elan_kbd_get_ver_fw_res_get_value(const FuStructElanKbdGetVerFwRes *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_VER_FW_RES_OFFSET_VALUE 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_VER_FW_RES_SIZE 0x2
#endif

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

FuStructElanKbdGetStatusReq *fu_struct_elan_kbd_get_status_req_ref(FuStructElanKbdGetStatusReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_get_status_req_unref(FuStructElanKbdGetStatusReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdGetStatusReq, fu_struct_elan_kbd_get_status_req_unref)
FuStructElanKbdGetStatusReq *fu_struct_elan_kbd_get_status_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_STATUS_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_GET_STATUS_REQ_OFFSET_CMD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_STATUS_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_STATUS_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_GET_STATUS_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_GET_STATUS
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdGetStatusRes;

FuStructElanKbdGetStatusRes *fu_struct_elan_kbd_get_status_res_ref(FuStructElanKbdGetStatusRes *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_get_status_res_unref(FuStructElanKbdGetStatusRes *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdGetStatusRes, fu_struct_elan_kbd_get_status_res_unref)
FuStructElanKbdGetStatusRes *fu_struct_elan_kbd_get_status_res_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuElanKbdDevStatus fu_struct_elan_kbd_get_status_res_get_value(const FuStructElanKbdGetStatusRes *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_STATUS_RES_OFFSET_VALUE 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_STATUS_RES_SIZE 0x3
#endif

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

FuStructElanKbdBootConditionReq *fu_struct_elan_kbd_boot_condition_req_ref(FuStructElanKbdBootConditionReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_boot_condition_req_unref(FuStructElanKbdBootConditionReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdBootConditionReq, fu_struct_elan_kbd_boot_condition_req_unref)
FuStructElanKbdBootConditionReq *fu_struct_elan_kbd_boot_condition_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_BOOT_CONDITION_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_BOOT_CONDITION_REQ_OFFSET_CMD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_BOOT_CONDITION_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_BOOT_CONDITION_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_BOOT_CONDITION_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_BOOT_CONDITION
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdBootConditionRes;

FuStructElanKbdBootConditionRes *fu_struct_elan_kbd_boot_condition_res_ref(FuStructElanKbdBootConditionRes *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_boot_condition_res_unref(FuStructElanKbdBootConditionRes *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdBootConditionRes, fu_struct_elan_kbd_boot_condition_res_unref)
FuStructElanKbdBootConditionRes *fu_struct_elan_kbd_boot_condition_res_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuElanKbdBootCond1 fu_struct_elan_kbd_boot_condition_res_get_value(const FuStructElanKbdBootConditionRes *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_BOOT_CONDITION_RES_OFFSET_VALUE 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_BOOT_CONDITION_RES_SIZE 0x3
#endif

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

FuStructElanKbdCmdStatusRes *fu_struct_elan_kbd_cmd_status_res_ref(FuStructElanKbdCmdStatusRes *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_cmd_status_res_unref(FuStructElanKbdCmdStatusRes *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdCmdStatusRes, fu_struct_elan_kbd_cmd_status_res_unref)
FuStructElanKbdCmdStatusRes *fu_struct_elan_kbd_cmd_status_res_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuElanKbdStatus fu_struct_elan_kbd_cmd_status_res_get_value(const FuStructElanKbdCmdStatusRes *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuElanKbdError fu_struct_elan_kbd_cmd_status_res_get_error(const FuStructElanKbdCmdStatusRes *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_CMD_STATUS_RES_OFFSET_VALUE 0x0
#define FU_STRUCT_ELAN_KBD_CMD_STATUS_RES_OFFSET_ERROR 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_CMD_STATUS_RES_SIZE 0x3
#endif

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

FuStructElanKbdAbortReq *fu_struct_elan_kbd_abort_req_ref(FuStructElanKbdAbortReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_abort_req_unref(FuStructElanKbdAbortReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdAbortReq, fu_struct_elan_kbd_abort_req_unref)
FuStructElanKbdAbortReq *fu_struct_elan_kbd_abort_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_ABORT_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_ABORT_REQ_OFFSET_CMD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_ABORT_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_ABORT_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_ABORT_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_ABORT
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdSoftwareResetReq;

FuStructElanKbdSoftwareResetReq *fu_struct_elan_kbd_software_reset_req_ref(FuStructElanKbdSoftwareResetReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_software_reset_req_unref(FuStructElanKbdSoftwareResetReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdSoftwareResetReq, fu_struct_elan_kbd_software_reset_req_unref)
FuStructElanKbdSoftwareResetReq *fu_struct_elan_kbd_software_reset_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_SOFTWARE_RESET_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_SOFTWARE_RESET_REQ_OFFSET_CMD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_SOFTWARE_RESET_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_SOFTWARE_RESET_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_SOFTWARE_RESET_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_SOFTWARE_RESET
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdReadRomReq;

FuStructElanKbdReadRomReq *fu_struct_elan_kbd_read_rom_req_ref(FuStructElanKbdReadRomReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_read_rom_req_unref(FuStructElanKbdReadRomReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdReadRomReq, fu_struct_elan_kbd_read_rom_req_unref)
FuStructElanKbdReadRomReq *fu_struct_elan_kbd_read_rom_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_kbd_read_rom_req_set_addr(FuStructElanKbdReadRomReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_read_rom_req_set_len(FuStructElanKbdReadRomReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_ROM_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_READ_ROM_REQ_OFFSET_CMD 0x1
#define FU_STRUCT_ELAN_KBD_READ_ROM_REQ_OFFSET_ADDR 0x2
#define FU_STRUCT_ELAN_KBD_READ_ROM_REQ_OFFSET_LEN 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_ROM_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_ROM_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_READ_ROM_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_READ_ROM
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdReadRomFinishedReq;

FuStructElanKbdReadRomFinishedReq *fu_struct_elan_kbd_read_rom_finished_req_ref(FuStructElanKbdReadRomFinishedReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_read_rom_finished_req_unref(FuStructElanKbdReadRomFinishedReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdReadRomFinishedReq, fu_struct_elan_kbd_read_rom_finished_req_unref)
FuStructElanKbdReadRomFinishedReq *fu_struct_elan_kbd_read_rom_finished_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_kbd_read_rom_finished_req_set_csum(FuStructElanKbdReadRomFinishedReq *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_ROM_FINISHED_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_READ_ROM_FINISHED_REQ_OFFSET_CMD 0x1
#define FU_STRUCT_ELAN_KBD_READ_ROM_FINISHED_REQ_OFFSET_CSUM 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_ROM_FINISHED_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_ROM_FINISHED_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_READ_ROM_FINISHED_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_READ_ROM_FINISH
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdReadOptionReq;

FuStructElanKbdReadOptionReq *fu_struct_elan_kbd_read_option_req_ref(FuStructElanKbdReadOptionReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_read_option_req_unref(FuStructElanKbdReadOptionReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdReadOptionReq, fu_struct_elan_kbd_read_option_req_unref)
FuStructElanKbdReadOptionReq *fu_struct_elan_kbd_read_option_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_OPTION_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_READ_OPTION_REQ_OFFSET_CMD 0x1
#define FU_STRUCT_ELAN_KBD_READ_OPTION_REQ_OFFSET_ADDR 0x2
#define FU_STRUCT_ELAN_KBD_READ_OPTION_REQ_OFFSET_LEN 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_OPTION_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_OPTION_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_READ_OPTION_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_READ_OPTION
#define FU_STRUCT_ELAN_KBD_READ_OPTION_REQ_DEFAULT_ADDR 128
#define FU_STRUCT_ELAN_KBD_READ_OPTION_REQ_DEFAULT_LEN 128
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdReadOptionFinishedReq;

FuStructElanKbdReadOptionFinishedReq *fu_struct_elan_kbd_read_option_finished_req_ref(FuStructElanKbdReadOptionFinishedReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_read_option_finished_req_unref(FuStructElanKbdReadOptionFinishedReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdReadOptionFinishedReq, fu_struct_elan_kbd_read_option_finished_req_unref)
FuStructElanKbdReadOptionFinishedReq *fu_struct_elan_kbd_read_option_finished_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_kbd_read_option_finished_req_set_csum(FuStructElanKbdReadOptionFinishedReq *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_OPTION_FINISHED_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_READ_OPTION_FINISHED_REQ_OFFSET_CMD 0x1
#define FU_STRUCT_ELAN_KBD_READ_OPTION_FINISHED_REQ_OFFSET_CSUM 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_OPTION_FINISHED_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_READ_OPTION_FINISHED_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_READ_OPTION_FINISHED_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_READ_OPTION_FINISH
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdGetAuthLockReq;

FuStructElanKbdGetAuthLockReq *fu_struct_elan_kbd_get_auth_lock_req_ref(FuStructElanKbdGetAuthLockReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_get_auth_lock_req_unref(FuStructElanKbdGetAuthLockReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdGetAuthLockReq, fu_struct_elan_kbd_get_auth_lock_req_unref)
FuStructElanKbdGetAuthLockReq *fu_struct_elan_kbd_get_auth_lock_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_AUTH_LOCK_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_GET_AUTH_LOCK_REQ_OFFSET_CMD 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_AUTH_LOCK_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_AUTH_LOCK_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_GET_AUTH_LOCK_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_GET_AUTH_LOCK
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdGetAuthLockRes;

FuStructElanKbdGetAuthLockRes *fu_struct_elan_kbd_get_auth_lock_res_ref(FuStructElanKbdGetAuthLockRes *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_get_auth_lock_res_unref(FuStructElanKbdGetAuthLockRes *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdGetAuthLockRes, fu_struct_elan_kbd_get_auth_lock_res_unref)
FuStructElanKbdGetAuthLockRes *fu_struct_elan_kbd_get_auth_lock_res_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_elan_kbd_get_auth_lock_res_get_key(const FuStructElanKbdGetAuthLockRes *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_AUTH_LOCK_RES_OFFSET_KEY 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_GET_AUTH_LOCK_RES_SIZE 0x1
#endif

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

FuStructElanKbdSetAuthLockReq *fu_struct_elan_kbd_set_auth_lock_req_ref(FuStructElanKbdSetAuthLockReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_set_auth_lock_req_unref(FuStructElanKbdSetAuthLockReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdSetAuthLockReq, fu_struct_elan_kbd_set_auth_lock_req_unref)
FuStructElanKbdSetAuthLockReq *fu_struct_elan_kbd_set_auth_lock_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_kbd_set_auth_lock_req_set_key(FuStructElanKbdSetAuthLockReq *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_SET_AUTH_LOCK_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_SET_AUTH_LOCK_REQ_OFFSET_CMD 0x1
#define FU_STRUCT_ELAN_KBD_SET_AUTH_LOCK_REQ_OFFSET_KEY 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_SET_AUTH_LOCK_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_SET_AUTH_LOCK_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_SET_AUTH_LOCK_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_SET_AUTH_LOCK
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdEntryIapReq;

FuStructElanKbdEntryIapReq *fu_struct_elan_kbd_entry_iap_req_ref(FuStructElanKbdEntryIapReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_entry_iap_req_unref(FuStructElanKbdEntryIapReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdEntryIapReq, fu_struct_elan_kbd_entry_iap_req_unref)
FuStructElanKbdEntryIapReq *fu_struct_elan_kbd_entry_iap_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_ENTRY_IAP_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_ENTRY_IAP_REQ_OFFSET_CMD 0x1
#define FU_STRUCT_ELAN_KBD_ENTRY_IAP_REQ_OFFSET_KEY 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_ENTRY_IAP_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_ENTRY_IAP_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_ENTRY_IAP_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_ENTRY_IAP
#define FU_STRUCT_ELAN_KBD_ENTRY_IAP_REQ_DEFAULT_KEY 0x7FA9
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdFinishedIapReq;

FuStructElanKbdFinishedIapReq *fu_struct_elan_kbd_finished_iap_req_ref(FuStructElanKbdFinishedIapReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_finished_iap_req_unref(FuStructElanKbdFinishedIapReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdFinishedIapReq, fu_struct_elan_kbd_finished_iap_req_unref)
FuStructElanKbdFinishedIapReq *fu_struct_elan_kbd_finished_iap_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_FINISHED_IAP_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_FINISHED_IAP_REQ_OFFSET_CMD 0x1
#define FU_STRUCT_ELAN_KBD_FINISHED_IAP_REQ_OFFSET_KEY 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_FINISHED_IAP_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_FINISHED_IAP_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_FINISHED_IAP_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_FINISHED_IAP
#define FU_STRUCT_ELAN_KBD_FINISHED_IAP_REQ_DEFAULT_KEY 0x7FA9
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdWriteRomReq;

FuStructElanKbdWriteRomReq *fu_struct_elan_kbd_write_rom_req_ref(FuStructElanKbdWriteRomReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_write_rom_req_unref(FuStructElanKbdWriteRomReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdWriteRomReq, fu_struct_elan_kbd_write_rom_req_unref)
FuStructElanKbdWriteRomReq *fu_struct_elan_kbd_write_rom_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_kbd_write_rom_req_set_addr(FuStructElanKbdWriteRomReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_write_rom_req_set_len(FuStructElanKbdWriteRomReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_REQ_OFFSET_CMD 0x1
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_REQ_OFFSET_ADDR 0x2
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_REQ_OFFSET_LEN 0x4
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_REQ_OFFSET_KEY 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_WRITE_ROM
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_REQ_DEFAULT_KEY 0x7FA9
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElanKbdWriteRomFinishedReq;

FuStructElanKbdWriteRomFinishedReq *fu_struct_elan_kbd_write_rom_finished_req_ref(FuStructElanKbdWriteRomFinishedReq *st) G_GNUC_NON_NULL(1);
void fu_struct_elan_kbd_write_rom_finished_req_unref(FuStructElanKbdWriteRomFinishedReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElanKbdWriteRomFinishedReq, fu_struct_elan_kbd_write_rom_finished_req_unref)
FuStructElanKbdWriteRomFinishedReq *fu_struct_elan_kbd_write_rom_finished_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elan_kbd_write_rom_finished_req_set_csum(FuStructElanKbdWriteRomFinishedReq *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_FINISHED_REQ_OFFSET_TAG 0x0
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_FINISHED_REQ_OFFSET_CMD 0x1
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_FINISHED_REQ_OFFSET_CSUM 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_FINISHED_REQ_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_FINISHED_REQ_DEFAULT_TAG 0xC1
#define FU_STRUCT_ELAN_KBD_WRITE_ROM_FINISHED_REQ_DEFAULT_CMD FU_ELAN_KBD_CMD_WRITE_ROM_FINISH
#endif
