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

#pragma once
#include <fu-input-stream.h>
/**
 * FuLxsTouchReg:
 */
typedef enum {
    /**
     * FU_LXS_TOUCH_REG_INFO_PANEL:
     */
    FU_LXS_TOUCH_REG_INFO_PANEL = 0x0110,
    /**
     * FU_LXS_TOUCH_REG_INFO_VERSION:
     */
    FU_LXS_TOUCH_REG_INFO_VERSION = 0x0120,
    /**
     * FU_LXS_TOUCH_REG_INFO_INTEGRITY:
     */
    FU_LXS_TOUCH_REG_INFO_INTEGRITY = 0x0140,
    /**
     * FU_LXS_TOUCH_REG_INFO_INTERFACE:
     */
    FU_LXS_TOUCH_REG_INFO_INTERFACE = 0x0150,
    /**
     * FU_LXS_TOUCH_REG_CTRL_GETTER:
     */
    FU_LXS_TOUCH_REG_CTRL_GETTER = 0x0600,
    /**
     * FU_LXS_TOUCH_REG_CTRL_SETTER:
     */
    FU_LXS_TOUCH_REG_CTRL_SETTER = 0x0610,
    /**
     * FU_LXS_TOUCH_REG_CTRL_DFUP_FLAG:
     */
    FU_LXS_TOUCH_REG_CTRL_DFUP_FLAG = 0x0623,
    /**
     * FU_LXS_TOUCH_REG_FLASH_IAP_CTRL_CMD:
     */
    FU_LXS_TOUCH_REG_FLASH_IAP_CTRL_CMD = 0x1400,
    /**
     * FU_LXS_TOUCH_REG_PARAMETER_BUFFER:
     */
    FU_LXS_TOUCH_REG_PARAMETER_BUFFER = 0x6000,
}  FuLxsTouchReg;
/**
 * FuLxsTouchCmd:
 *
 * Flash IAP Commands
 */
typedef enum {
    /**
     * FU_LXS_TOUCH_CMD_FLASH_WRITE:
     */
    FU_LXS_TOUCH_CMD_FLASH_WRITE = 0x03,
    /**
     * FU_LXS_TOUCH_CMD_FLASH_4KB_UPDATE_MODE:
     */
    FU_LXS_TOUCH_CMD_FLASH_4KB_UPDATE_MODE = 0x04,
    /**
     * FU_LXS_TOUCH_CMD_FLASH_GET_VERIFY:
     */
    FU_LXS_TOUCH_CMD_FLASH_GET_VERIFY = 0x05,
    /**
     * FU_LXS_TOUCH_CMD_WATCHDOG_RESET:
     */
    FU_LXS_TOUCH_CMD_WATCHDOG_RESET = 0x11,
}  FuLxsTouchCmd;
/**
 * FuLxsTouchMode:
 *
 * Protocol Modes
 */
typedef enum {
    /**
     * FU_LXS_TOUCH_MODE_NORMAL:
     */
    FU_LXS_TOUCH_MODE_NORMAL = 0x00,
    /**
     * FU_LXS_TOUCH_MODE_DIAG:
     */
    FU_LXS_TOUCH_MODE_DIAG = 0x01,
    /**
     * FU_LXS_TOUCH_MODE_DFUP:
     */
    FU_LXS_TOUCH_MODE_DFUP = 0x02,
}  FuLxsTouchMode;
/**
 * FuLxsTouchReadyStatus:
 *
 * Ready Status Values
 */
typedef enum {
    /**
     * FU_LXS_TOUCH_READY_STATUS_READY:
     */
    FU_LXS_TOUCH_READY_STATUS_READY = 0xA0,
    /**
     * FU_LXS_TOUCH_READY_STATUS_NONE:
     */
    FU_LXS_TOUCH_READY_STATUS_NONE = 0x05,
    /**
     * FU_LXS_TOUCH_READY_STATUS_LOG:
     */
    FU_LXS_TOUCH_READY_STATUS_LOG = 0x77,
    /**
     * FU_LXS_TOUCH_READY_STATUS_IMAGE:
     */
    FU_LXS_TOUCH_READY_STATUS_IMAGE = 0xAA,
}  FuLxsTouchReadyStatus;
/**
 * FuLxsTouchFlag:
 *
 * Write/Read Command Flags
 */
typedef enum {
    /**
     * FU_LXS_TOUCH_FLAG_WRITE:
     */
    FU_LXS_TOUCH_FLAG_WRITE = 0x68,
    /**
     * FU_LXS_TOUCH_FLAG_READ:
     */
    FU_LXS_TOUCH_FLAG_READ = 0x69,
}  FuLxsTouchFlag;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLxsTouchPacket;

FuStructLxsTouchPacket *fu_struct_lxs_touch_packet_ref(FuStructLxsTouchPacket *st) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_packet_unref(FuStructLxsTouchPacket *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLxsTouchPacket, fu_struct_lxs_touch_packet_unref)
FuStructLxsTouchPacket *fu_struct_lxs_touch_packet_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_lxs_touch_packet_set_flag(FuStructLxsTouchPacket *st, FuLxsTouchFlag value) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_packet_set_length(FuStructLxsTouchPacket *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_packet_set_command(FuStructLxsTouchPacket *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_PACKET_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_LXS_TOUCH_PACKET_OFFSET_FLAG 0x1
#define FU_STRUCT_LXS_TOUCH_PACKET_OFFSET_LENGTH 0x2
#define FU_STRUCT_LXS_TOUCH_PACKET_OFFSET_COMMAND 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_PACKET_SIZE 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_PACKET_DEFAULT_REPORT_ID 0x09
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLxsTouchInterface;

FuStructLxsTouchInterface *fu_struct_lxs_touch_interface_ref(FuStructLxsTouchInterface *st) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_interface_unref(FuStructLxsTouchInterface *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLxsTouchInterface, fu_struct_lxs_touch_interface_unref)
FuStructLxsTouchInterface *fu_struct_lxs_touch_interface_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gchar *fu_struct_lxs_touch_interface_get_protocol_name(const FuStructLxsTouchInterface *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_INTERFACE_OFFSET_PROTOCOL_NAME 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_INTERFACE_SIZE_PROTOCOL_NAME 0x8
#define FU_STRUCT_LXS_TOUCH_INTERFACE_N_ELEMENTS_PROTOCOL_NAME 8
#define FU_STRUCT_LXS_TOUCH_INTERFACE_SIZE 0x8
#endif

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

FuStructLxsTouchPanel *fu_struct_lxs_touch_panel_ref(FuStructLxsTouchPanel *st) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_panel_unref(FuStructLxsTouchPanel *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLxsTouchPanel, fu_struct_lxs_touch_panel_unref)
FuStructLxsTouchPanel *fu_struct_lxs_touch_panel_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_lxs_touch_panel_get_x_resolution(const FuStructLxsTouchPanel *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_lxs_touch_panel_get_y_resolution(const FuStructLxsTouchPanel *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_lxs_touch_panel_get_x_node(const FuStructLxsTouchPanel *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_lxs_touch_panel_get_y_node(const FuStructLxsTouchPanel *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_PANEL_OFFSET_X_RESOLUTION 0x0
#define FU_STRUCT_LXS_TOUCH_PANEL_OFFSET_Y_RESOLUTION 0x2
#define FU_STRUCT_LXS_TOUCH_PANEL_OFFSET_X_NODE 0x4
#define FU_STRUCT_LXS_TOUCH_PANEL_OFFSET_Y_NODE 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_PANEL_SIZE 0x6
#endif

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

FuStructLxsTouchVersion *fu_struct_lxs_touch_version_ref(FuStructLxsTouchVersion *st) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_version_unref(FuStructLxsTouchVersion *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLxsTouchVersion, fu_struct_lxs_touch_version_unref)
FuStructLxsTouchVersion *fu_struct_lxs_touch_version_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_lxs_touch_version_get_boot_ver(const FuStructLxsTouchVersion *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_lxs_touch_version_get_core_ver(const FuStructLxsTouchVersion *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_lxs_touch_version_get_app_ver(const FuStructLxsTouchVersion *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_lxs_touch_version_get_param_ver(const FuStructLxsTouchVersion *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_VERSION_OFFSET_BOOT_VER 0x0
#define FU_STRUCT_LXS_TOUCH_VERSION_OFFSET_CORE_VER 0x2
#define FU_STRUCT_LXS_TOUCH_VERSION_OFFSET_APP_VER 0x4
#define FU_STRUCT_LXS_TOUCH_VERSION_OFFSET_PARAM_VER 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_VERSION_SIZE 0x8
#endif

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

FuStructLxsTouchCrc *fu_struct_lxs_touch_crc_ref(FuStructLxsTouchCrc *st) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_crc_unref(FuStructLxsTouchCrc *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLxsTouchCrc, fu_struct_lxs_touch_crc_unref)

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_CRC_OFFSET_BOOT_CRC 0x0
#define FU_STRUCT_LXS_TOUCH_CRC_OFFSET_APP_CRC 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_CRC_SIZE 0x8
#endif

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

FuStructLxsTouchSetter *fu_struct_lxs_touch_setter_ref(FuStructLxsTouchSetter *st) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_setter_unref(FuStructLxsTouchSetter *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLxsTouchSetter, fu_struct_lxs_touch_setter_unref)
FuStructLxsTouchSetter *fu_struct_lxs_touch_setter_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructLxsTouchSetter *fu_struct_lxs_touch_setter_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuLxsTouchMode fu_struct_lxs_touch_setter_get_mode(const FuStructLxsTouchSetter *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_lxs_touch_setter_get_event_trigger_type(const FuStructLxsTouchSetter *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_lxs_touch_setter_set_mode(FuStructLxsTouchSetter *st, FuLxsTouchMode value) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_setter_set_event_trigger_type(FuStructLxsTouchSetter *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_SETTER_OFFSET_MODE 0x0
#define FU_STRUCT_LXS_TOUCH_SETTER_OFFSET_EVENT_TRIGGER_TYPE 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_SETTER_SIZE 0x2
#endif

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

FuStructLxsTouchGetter *fu_struct_lxs_touch_getter_ref(FuStructLxsTouchGetter *st) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_getter_unref(FuStructLxsTouchGetter *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLxsTouchGetter, fu_struct_lxs_touch_getter_unref)
FuStructLxsTouchGetter *fu_struct_lxs_touch_getter_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuLxsTouchReadyStatus fu_struct_lxs_touch_getter_get_ready_status(const FuStructLxsTouchGetter *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_lxs_touch_getter_get_event_ready(const FuStructLxsTouchGetter *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_GETTER_OFFSET_READY_STATUS 0x0
#define FU_STRUCT_LXS_TOUCH_GETTER_OFFSET_EVENT_READY 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_GETTER_SIZE 0x2
#endif

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

FuStructLxsTouchFlashIapCmd *fu_struct_lxs_touch_flash_iap_cmd_ref(FuStructLxsTouchFlashIapCmd *st) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_flash_iap_cmd_unref(FuStructLxsTouchFlashIapCmd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLxsTouchFlashIapCmd, fu_struct_lxs_touch_flash_iap_cmd_unref)
FuStructLxsTouchFlashIapCmd *fu_struct_lxs_touch_flash_iap_cmd_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructLxsTouchFlashIapCmd *fu_struct_lxs_touch_flash_iap_cmd_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_lxs_touch_flash_iap_cmd_get_addr(const FuStructLxsTouchFlashIapCmd *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_lxs_touch_flash_iap_cmd_get_size(const FuStructLxsTouchFlashIapCmd *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_lxs_touch_flash_iap_cmd_get_status(const FuStructLxsTouchFlashIapCmd *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuLxsTouchCmd fu_struct_lxs_touch_flash_iap_cmd_get_cmd(const FuStructLxsTouchFlashIapCmd *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_lxs_touch_flash_iap_cmd_set_addr(FuStructLxsTouchFlashIapCmd *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_flash_iap_cmd_set_size(FuStructLxsTouchFlashIapCmd *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_flash_iap_cmd_set_status(FuStructLxsTouchFlashIapCmd *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_lxs_touch_flash_iap_cmd_set_cmd(FuStructLxsTouchFlashIapCmd *st, FuLxsTouchCmd value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_FLASH_IAP_CMD_OFFSET_ADDR 0x0
#define FU_STRUCT_LXS_TOUCH_FLASH_IAP_CMD_OFFSET_SIZE 0x4
#define FU_STRUCT_LXS_TOUCH_FLASH_IAP_CMD_OFFSET_STATUS 0x6
#define FU_STRUCT_LXS_TOUCH_FLASH_IAP_CMD_OFFSET_CMD 0x7
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LXS_TOUCH_FLASH_IAP_CMD_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#endif
