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

#pragma once
#include <fu-input-stream.h>
/**
 * FuHimaxTpMapcode:
 */
typedef enum {
    /**
     * FU_HIMAX_TP_MAPCODE_FW_CID:
     */
    FU_HIMAX_TP_MAPCODE_FW_CID = 0x10000000,
    /**
     * FU_HIMAX_TP_MAPCODE_FW_VER:
     */
    FU_HIMAX_TP_MAPCODE_FW_VER = 0x10000100,
    /**
     * FU_HIMAX_TP_MAPCODE_CFG_VER:
     */
    FU_HIMAX_TP_MAPCODE_CFG_VER = 0x10000600,
    /**
     * FU_HIMAX_TP_MAPCODE_IC_ID:
     */
    FU_HIMAX_TP_MAPCODE_IC_ID = 0x10000300,
    /**
     * FU_HIMAX_TP_MAPCODE_IC_ID_MOD:
     */
    FU_HIMAX_TP_MAPCODE_IC_ID_MOD = 0x10000200,
}  FuHimaxTpMapcode;
/**
 * FuHimaxTpFwStatus:
 */
typedef enum {
    /**
     * FU_HIMAX_TP_FW_STATUS_NO_ERROR:
     */
    FU_HIMAX_TP_FW_STATUS_NO_ERROR = 0x77,
    /**
     * FU_HIMAX_TP_FW_STATUS_MCU_E0:
     */
    FU_HIMAX_TP_FW_STATUS_MCU_E0 = 0x00,
    /**
     * FU_HIMAX_TP_FW_STATUS_MCU_E1:
     */
    FU_HIMAX_TP_FW_STATUS_MCU_E1 = 0xA0,
    /**
     * FU_HIMAX_TP_FW_STATUS_COMMIT:
     */
    FU_HIMAX_TP_FW_STATUS_COMMIT = 0xB1,
    /**
     * FU_HIMAX_TP_FW_STATUS_BL:
     */
    FU_HIMAX_TP_FW_STATUS_BL = 0xB2,
    /**
     * FU_HIMAX_TP_FW_STATUS_PW:
     */
    FU_HIMAX_TP_FW_STATUS_PW = 0xB3,
    /**
     * FU_HIMAX_TP_FW_STATUS_ERASE_FLASH:
     */
    FU_HIMAX_TP_FW_STATUS_ERASE_FLASH = 0xB4,
    /**
     * FU_HIMAX_TP_FW_STATUS_FLASH_PROGRAMMING:
     */
    FU_HIMAX_TP_FW_STATUS_FLASH_PROGRAMMING = 0xB5,
    /**
     * FU_HIMAX_TP_FW_STATUS_NO_BL:
     */
    FU_HIMAX_TP_FW_STATUS_NO_BL = 0xC1,
    /**
     * FU_HIMAX_TP_FW_STATUS_NO_MAIN:
     */
    FU_HIMAX_TP_FW_STATUS_NO_MAIN = 0xC2,
}  FuHimaxTpFwStatus;
const gchar *fu_himax_tp_fw_status_to_string(FuHimaxTpFwStatus val) G_GNUC_CONST;
/**
 * FuHimaxTpRegisterAddr:
 */
typedef enum {
    /**
     * FU_HIMAX_TP_REGISTER_ADDR_BLOCK_PROTECT_BASE:
     */
    FU_HIMAX_TP_REGISTER_ADDR_BLOCK_PROTECT_BASE = 0x80000000,
    /**
     * FU_HIMAX_TP_REGISTER_ADDR_BLOCK_PROTECT_CMD1:
     */
    FU_HIMAX_TP_REGISTER_ADDR_BLOCK_PROTECT_CMD1 = 0x80000010,
    /**
     * FU_HIMAX_TP_REGISTER_ADDR_BLOCK_PROTECT_CMD2:
     */
    FU_HIMAX_TP_REGISTER_ADDR_BLOCK_PROTECT_CMD2 = 0x80000020,
    /**
     * FU_HIMAX_TP_REGISTER_ADDR_BLOCK_PROTECT_CMD3:
     */
    FU_HIMAX_TP_REGISTER_ADDR_BLOCK_PROTECT_CMD3 = 0x80000024,
    /**
     * FU_HIMAX_TP_REGISTER_ADDR_BLOCK_PROTECT_STATUS:
     */
    FU_HIMAX_TP_REGISTER_ADDR_BLOCK_PROTECT_STATUS = 0x8000002C,
    /**
     * FU_HIMAX_TP_REGISTER_ADDR_WRITE_PROTECT_PIN:
     */
    FU_HIMAX_TP_REGISTER_ADDR_WRITE_PROTECT_PIN = 0x900880BC,
}  FuHimaxTpRegisterAddr;
/**
 * FuHimaxTpReportId:
 */
typedef enum {
    /**
     * FU_HIMAX_TP_REPORT_ID_CFG:
     */
    FU_HIMAX_TP_REPORT_ID_CFG = 0x05,
    /**
     * FU_HIMAX_TP_REPORT_ID_REG_RW:
     */
    FU_HIMAX_TP_REPORT_ID_REG_RW = 0x06,
    /**
     * FU_HIMAX_TP_REPORT_ID_FW_UPDATE:
     */
    FU_HIMAX_TP_REPORT_ID_FW_UPDATE = 0x0A,
    /**
     * FU_HIMAX_TP_REPORT_ID_FW_UPDATE_HANDSHAKING:
     */
    FU_HIMAX_TP_REPORT_ID_FW_UPDATE_HANDSHAKING = 0x0B,
    /**
     * FU_HIMAX_TP_REPORT_ID_SELF_TEST:
     */
    FU_HIMAX_TP_REPORT_ID_SELF_TEST = 0x0C,
}  FuHimaxTpReportId;
const gchar *fu_himax_tp_report_id_to_string(FuHimaxTpReportId val) G_GNUC_CONST;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructHimaxTpHidFwUnit;

FuStructHimaxTpHidFwUnit *fu_struct_himax_tp_hid_fw_unit_ref(FuStructHimaxTpHidFwUnit *st) G_GNUC_NON_NULL(1);
void fu_struct_himax_tp_hid_fw_unit_unref(FuStructHimaxTpHidFwUnit *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructHimaxTpHidFwUnit, fu_struct_himax_tp_hid_fw_unit_unref)
guint8 fu_struct_himax_tp_hid_fw_unit_get_cmd(const FuStructHimaxTpHidFwUnit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_himax_tp_hid_fw_unit_get_bin_start_offset(const FuStructHimaxTpHidFwUnit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_himax_tp_hid_fw_unit_get_bin_size(const FuStructHimaxTpHidFwUnit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_HID_FW_UNIT_OFFSET_CMD 0x0
#define FU_STRUCT_HIMAX_TP_HID_FW_UNIT_OFFSET_BIN_START_OFFSET 0x1
#define FU_STRUCT_HIMAX_TP_HID_FW_UNIT_OFFSET_BIN_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_HID_FW_UNIT_SIZE 0x5
#endif

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

FuStructHimaxTpHidInfo *fu_struct_himax_tp_hid_info_ref(FuStructHimaxTpHidInfo *st) G_GNUC_NON_NULL(1);
void fu_struct_himax_tp_hid_info_unref(FuStructHimaxTpHidInfo *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructHimaxTpHidInfo, fu_struct_himax_tp_hid_info_unref)
FuStructHimaxTpHidInfo *fu_struct_himax_tp_hid_info_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuStructHimaxTpHidFwUnit *fu_struct_himax_tp_hid_info_get_main_mapping(const FuStructHimaxTpHidInfo *st, guint idx) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuStructHimaxTpHidFwUnit *fu_struct_himax_tp_hid_info_get_bl_mapping(const FuStructHimaxTpHidInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_himax_tp_hid_info_get_cid(const FuStructHimaxTpHidInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_himax_tp_hid_info_get_vid(const FuStructHimaxTpHidInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_himax_tp_hid_info_get_pid(const FuStructHimaxTpHidInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_HID_INFO_OFFSET_MAIN_MAPPING 0x0
#define FU_STRUCT_HIMAX_TP_HID_INFO_OFFSET_BL_MAPPING 0x2D
#define FU_STRUCT_HIMAX_TP_HID_INFO_OFFSET_CID 0x34
#define FU_STRUCT_HIMAX_TP_HID_INFO_OFFSET_VID 0x82
#define FU_STRUCT_HIMAX_TP_HID_INFO_OFFSET_PID 0x84
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_HID_INFO_SIZE_MAIN_MAPPING 0x2D
#define FU_STRUCT_HIMAX_TP_HID_INFO_N_ELEMENTS_MAIN_MAPPING 9
#define FU_STRUCT_HIMAX_TP_HID_INFO_SIZE 0xFF
#endif

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

FuStructHimaxTpIcId *fu_struct_himax_tp_ic_id_ref(FuStructHimaxTpIcId *st) G_GNUC_NON_NULL(1);
void fu_struct_himax_tp_ic_id_unref(FuStructHimaxTpIcId *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructHimaxTpIcId, fu_struct_himax_tp_ic_id_unref)
FuStructHimaxTpIcId *fu_struct_himax_tp_ic_id_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gchar *fu_struct_himax_tp_ic_id_get_desc(const FuStructHimaxTpIcId *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_himax_tp_ic_id_get_vid(const FuStructHimaxTpIcId *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_himax_tp_ic_id_get_pid(const FuStructHimaxTpIcId *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_IC_ID_OFFSET_DESC 0x0
#define FU_STRUCT_HIMAX_TP_IC_ID_OFFSET_VID 0xC
#define FU_STRUCT_HIMAX_TP_IC_ID_OFFSET_PID 0xE
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_IC_ID_SIZE_DESC 0xC
#define FU_STRUCT_HIMAX_TP_IC_ID_N_ELEMENTS_DESC 12
#define FU_STRUCT_HIMAX_TP_IC_ID_SIZE 0x10
#endif

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

FuStructHimaxTpIcIdMod *fu_struct_himax_tp_ic_id_mod_ref(FuStructHimaxTpIcIdMod *st) G_GNUC_NON_NULL(1);
void fu_struct_himax_tp_ic_id_mod_unref(FuStructHimaxTpIcIdMod *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructHimaxTpIcIdMod, fu_struct_himax_tp_ic_id_mod_unref)
FuStructHimaxTpIcIdMod *fu_struct_himax_tp_ic_id_mod_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gchar *fu_struct_himax_tp_ic_id_mod_get_desc(const FuStructHimaxTpIcIdMod *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_IC_ID_MOD_OFFSET_DESC 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_IC_ID_MOD_SIZE_DESC 0x2
#define FU_STRUCT_HIMAX_TP_IC_ID_MOD_N_ELEMENTS_DESC 2
#define FU_STRUCT_HIMAX_TP_IC_ID_MOD_SIZE 0x2
#endif

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

FuStructHimaxTpMapCode *fu_struct_himax_tp_map_code_ref(FuStructHimaxTpMapCode *st) G_GNUC_NON_NULL(1);
void fu_struct_himax_tp_map_code_unref(FuStructHimaxTpMapCode *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructHimaxTpMapCode, fu_struct_himax_tp_map_code_unref)
FuStructHimaxTpMapCode *fu_struct_himax_tp_map_code_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_himax_tp_map_code_get_mcode(const FuStructHimaxTpMapCode *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_himax_tp_map_code_get_flash_addr(const FuStructHimaxTpMapCode *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_himax_tp_map_code_get_size(const FuStructHimaxTpMapCode *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_himax_tp_map_code_get_cs(const FuStructHimaxTpMapCode *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_MAP_CODE_OFFSET_MCODE 0x0
#define FU_STRUCT_HIMAX_TP_MAP_CODE_OFFSET_FLASH_ADDR 0x4
#define FU_STRUCT_HIMAX_TP_MAP_CODE_OFFSET_SIZE 0x8
#define FU_STRUCT_HIMAX_TP_MAP_CODE_OFFSET_CS 0xC
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_MAP_CODE_SIZE 0x10
#endif

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

FuStructHimaxTpRegRw *fu_struct_himax_tp_reg_rw_ref(FuStructHimaxTpRegRw *st) G_GNUC_NON_NULL(1);
void fu_struct_himax_tp_reg_rw_unref(FuStructHimaxTpRegRw *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructHimaxTpRegRw, fu_struct_himax_tp_reg_rw_unref)
FuStructHimaxTpRegRw *fu_struct_himax_tp_reg_rw_new(void) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_himax_tp_reg_rw_get_rw_flag(const FuStructHimaxTpRegRw *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuHimaxTpRegisterAddr fu_struct_himax_tp_reg_rw_get_reg_addr(const FuStructHimaxTpRegRw *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_himax_tp_reg_rw_get_reg_value(const FuStructHimaxTpRegRw *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_himax_tp_reg_rw_set_rw_flag(FuStructHimaxTpRegRw *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_himax_tp_reg_rw_set_reg_addr(FuStructHimaxTpRegRw *st, FuHimaxTpRegisterAddr value) G_GNUC_NON_NULL(1);
void fu_struct_himax_tp_reg_rw_set_reg_value(FuStructHimaxTpRegRw *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_REG_RW_OFFSET_RW_FLAG 0x0
#define FU_STRUCT_HIMAX_TP_REG_RW_OFFSET_REG_ADDR 0x1
#define FU_STRUCT_HIMAX_TP_REG_RW_OFFSET_REG_VALUE 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_HIMAX_TP_REG_RW_SIZE 0x9
#endif

#ifndef __GI_SCANNER__
#endif
