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

#pragma once
#include <fu-input-stream.h>
/**
 * FuRaydiumTpBootMode:
 */
typedef enum {
    /**
     * FU_RAYDIUM_TP_BOOT_MODE_TS_MAIN:
     */
    FU_RAYDIUM_TP_BOOT_MODE_TS_MAIN,
    /**
     * FU_RAYDIUM_TP_BOOT_MODE_TS_BLDR:
     */
    FU_RAYDIUM_TP_BOOT_MODE_TS_BLDR,
    /**
     * FU_RAYDIUM_TP_BOOT_MODE_TS_NONE:
     */
    FU_RAYDIUM_TP_BOOT_MODE_TS_NONE,
}  FuRaydiumTpBootMode;
#define FU_RAYDIUM_TP_BOOT_MODE_LAST 3
/**
 * FuRaydiumTpBlCmd:
 */
typedef enum {
    /**
     * FU_RAYDIUM_TP_BL_CMD_ERASE_FLASH:
     */
    FU_RAYDIUM_TP_BL_CMD_ERASE_FLASH = 0x02,
    /**
     * FU_RAYDIUM_TP_BL_CMD_WRITE_FLASH:
     */
    FU_RAYDIUM_TP_BL_CMD_WRITE_FLASH = 0x03,
    /**
     * FU_RAYDIUM_TP_BL_CMD_SELECT_FLASH:
     */
    FU_RAYDIUM_TP_BL_CMD_SELECT_FLASH = 0x06,
    /**
     * FU_RAYDIUM_TP_BL_CMD_WRITE_REGISTER:
     */
    FU_RAYDIUM_TP_BL_CMD_WRITE_REGISTER = 0x08,
    /**
     * FU_RAYDIUM_TP_BL_CMD_READ_ADDRESS_MEMORY:
     */
    FU_RAYDIUM_TP_BL_CMD_READ_ADDRESS_MEMORY = 0x09,
    /**
     * FU_RAYDIUM_TP_BL_CMD_WATCHDOG_FUNCTION_SET:
     */
    FU_RAYDIUM_TP_BL_CMD_WATCHDOG_FUNCTION_SET = 0x0A,
    /**
     * FU_RAYDIUM_TP_BL_CMD_WRITE_RAM_FLASH:
     */
    FU_RAYDIUM_TP_BL_CMD_WRITE_RAM_FLASH = 0x0B,
    /**
     * FU_RAYDIUM_TP_BL_CMD_WRITE_HID_I2C_FLASH:
     */
    FU_RAYDIUM_TP_BL_CMD_WRITE_HID_I2C_FLASH = 0x0C,
    /**
     * FU_RAYDIUM_TP_BL_CMD_READ_FLASH_ADDR:
     */
    FU_RAYDIUM_TP_BL_CMD_READ_FLASH_ADDR = 0x0D,
    /**
     * FU_RAYDIUM_TP_BL_CMD_TRIGGER_WRITE_FLASH:
     */
    FU_RAYDIUM_TP_BL_CMD_TRIGGER_WRITE_FLASH = 0xA3,
    /**
     * FU_RAYDIUM_TP_BL_CMD_SOFTWARE_RESET:
     */
    FU_RAYDIUM_TP_BL_CMD_SOFTWARE_RESET = 0xA4,
    /**
     * FU_RAYDIUM_TP_BL_CMD_IDLE:
     */
    FU_RAYDIUM_TP_BL_CMD_IDLE = 0xFF,
}  FuRaydiumTpBlCmd;
const gchar *fu_raydium_tp_bl_cmd_to_string(FuRaydiumTpBlCmd val) G_GNUC_CONST;
/**
 * FuRaydiumTpCmd:
 */
typedef enum {
    /**
     * FU_RAYDIUM_TP_CMD_BL_AP_ADDR:
     */
    FU_RAYDIUM_TP_CMD_BL_AP_ADDR = 0x00,
    /**
     * FU_RAYDIUM_TP_CMD_BL_WATCHDOG_ENABLE:
     */
    FU_RAYDIUM_TP_CMD_BL_WATCHDOG_ENABLE = 0x33,
    /**
     * FU_RAYDIUM_TP_CMD_BL_ERASE_FLASH_MODE1:
     */
    FU_RAYDIUM_TP_CMD_BL_ERASE_FLASH_MODE1 = 0xA1,
    /**
     * FU_RAYDIUM_TP_CMD_BL_ERASE_FLASH_MODE4:
     */
    FU_RAYDIUM_TP_CMD_BL_ERASE_FLASH_MODE4 = 0xA4,
    /**
     * FU_RAYDIUM_TP_CMD_BL_FLASH_CRC:
     */
    FU_RAYDIUM_TP_CMD_BL_FLASH_CRC = 0xA5,
    /**
     * FU_RAYDIUM_TP_CMD_BL_WATCHDOG_DISABLE:
     */
    FU_RAYDIUM_TP_CMD_BL_WATCHDOG_DISABLE = 0xAA,
}  FuRaydiumTpCmd;
/**
 * FuRaydiumTpAddr:
 */
typedef enum {
    /**
     * FU_RAYDIUM_TP_ADDR_JUMP_TO_BOOTLOADER:
     */
    FU_RAYDIUM_TP_ADDR_JUMP_TO_BOOTLOADER = 0x52,
    /**
     * FU_RAYDIUM_TP_ADDR_MEM_ADDRESS_SET:
     */
    FU_RAYDIUM_TP_ADDR_MEM_ADDRESS_SET = 0x65,
    /**
     * FU_RAYDIUM_TP_ADDR_MEM_READ:
     */
    FU_RAYDIUM_TP_ADDR_MEM_READ = 0x66,
    /**
     * FU_RAYDIUM_TP_ADDR_MEM_WRITE:
     */
    FU_RAYDIUM_TP_ADDR_MEM_WRITE = 0x67,
    /**
     * FU_RAYDIUM_TP_ADDR_SYSTEM_INFO_MODE_WRITE:
     */
    FU_RAYDIUM_TP_ADDR_SYSTEM_INFO_MODE_WRITE = 0x80,
    /**
     * FU_RAYDIUM_TP_ADDR_SYSTEM_INFO_MODE_READ:
     */
    FU_RAYDIUM_TP_ADDR_SYSTEM_INFO_MODE_READ = 0x81,
    /**
     * FU_RAYDIUM_TP_ADDR_SYSTEM_STATUS_WRITE:
     */
    FU_RAYDIUM_TP_ADDR_SYSTEM_STATUS_WRITE = 0x90,
    /**
     * FU_RAYDIUM_TP_ADDR_SYSTEM_STATUS_READ:
     */
    FU_RAYDIUM_TP_ADDR_SYSTEM_STATUS_READ = 0x91,
}  FuRaydiumTpAddr;
/**
 * FuRaydiumTpCmd2:
 */
typedef enum {
    /**
     * FU_RAYDIUM_TP_CMD2_RID:
     */
    FU_RAYDIUM_TP_CMD2_RID = 0x02,
    /**
     * FU_RAYDIUM_TP_CMD2_WID:
     */
    FU_RAYDIUM_TP_CMD2_WID = 0x08,
    /**
     * FU_RAYDIUM_TP_CMD2_WRT:
     */
    FU_RAYDIUM_TP_CMD2_WRT = 0x11,
    /**
     * FU_RAYDIUM_TP_CMD2_ACK:
     */
    FU_RAYDIUM_TP_CMD2_ACK = 0x22,
    /**
     * FU_RAYDIUM_TP_CMD2_READ:
     */
    FU_RAYDIUM_TP_CMD2_READ = 0x33,
    /**
     * FU_RAYDIUM_TP_CMD2_CHK:
     */
    FU_RAYDIUM_TP_CMD2_CHK = 0x44,
}  FuRaydiumTpCmd2;
/**
 * FuRaydiumTpProtect:
 */
typedef enum {
    /**
     * FU_RAYDIUM_TP_PROTECT_ALL_LOCK:
     */
    FU_RAYDIUM_TP_PROTECT_ALL_LOCK = 0x18,
    /**
     * FU_RAYDIUM_TP_PROTECT_FW_UNLOCK:
     */
    FU_RAYDIUM_TP_PROTECT_FW_UNLOCK = 0x68,
    /**
     * FU_RAYDIUM_TP_PROTECT_GD_UNLOCK:
     */
    FU_RAYDIUM_TP_PROTECT_GD_UNLOCK = 0x24,
    /**
     * FU_RAYDIUM_TP_PROTECT_BL_UNLOCK:
     */
    FU_RAYDIUM_TP_PROTECT_BL_UNLOCK = 0x04,
}  FuRaydiumTpProtect;
const gchar *fu_raydium_tp_protect_to_string(FuRaydiumTpProtect val) G_GNUC_CONST;
/**
 * FuRaydiumTpFlash:
 */
typedef enum {
    /**
     * FU_RAYDIUM_TP_FLASH_FLASH_ADDR:
     */
    FU_RAYDIUM_TP_FLASH_FLASH_ADDR = 0x00000000,
    /**
     * FU_RAYDIUM_TP_FLASH_FIRM_CRC_ADDR:
     */
    FU_RAYDIUM_TP_FLASH_FIRM_CRC_ADDR = 0x00015DFC,
    /**
     * FU_RAYDIUM_TP_FLASH_FT_RECORD_ADDR:
     */
    FU_RAYDIUM_TP_FLASH_FT_RECORD_ADDR = 0x0001E030,
    /**
     * FU_RAYDIUM_TP_FLASH_DESC_ADDR:
     */
    FU_RAYDIUM_TP_FLASH_DESC_ADDR = 0x0001F000,
    /**
     * FU_RAYDIUM_TP_FLASH_DESC_RECORD_ADDR:
     */
    FU_RAYDIUM_TP_FLASH_DESC_RECORD_ADDR = 0x0001F004,
    /**
     * FU_RAYDIUM_TP_FLASH_DESC_CRC_ADDR:
     */
    FU_RAYDIUM_TP_FLASH_DESC_CRC_ADDR = 0x0001FFFC,
}  FuRaydiumTpFlash;
/**
 * FuRaydiumTpRam:
 */
typedef enum {
    /**
     * FU_RAYDIUM_TP_RAM_BOOT_BASE:
     */
    FU_RAYDIUM_TP_RAM_BOOT_BASE = 0x00000000,
    /**
     * FU_RAYDIUM_TP_RAM_FIRM_BASE:
     */
    FU_RAYDIUM_TP_RAM_FIRM_BASE = 0x00002000,
}  FuRaydiumTpRam;
/**
 * FuRaydiumTpFlashCtrl:
 */
typedef enum {
    /**
     * FU_RAYDIUM_TP_FLASH_CTRL_PRAM_LOCK:
     */
    FU_RAYDIUM_TP_FLASH_CTRL_PRAM_LOCK = 0x50000900,
    /**
     * FU_RAYDIUM_TP_FLASH_CTRL_ADDR:
     */
    FU_RAYDIUM_TP_FLASH_CTRL_ADDR = 0x50000910,
    /**
     * FU_RAYDIUM_TP_FLASH_CTRL_LENGTH:
     */
    FU_RAYDIUM_TP_FLASH_CTRL_LENGTH = 0x5000091C,
    /**
     * FU_RAYDIUM_TP_FLASH_CTRL_ISPCTL:
     */
    FU_RAYDIUM_TP_FLASH_CTRL_ISPCTL = 0x50000914,
    /**
     * FU_RAYDIUM_TP_FLASH_CTRL_CHKADS:
     */
    FU_RAYDIUM_TP_FLASH_CTRL_CHKADS = 0x50000920,
    /**
     * FU_RAYDIUM_TP_FLASH_CTRL_DATA:
     */
    FU_RAYDIUM_TP_FLASH_CTRL_DATA = 0x5000093C,
    /**
     * FU_RAYDIUM_TP_FLASH_CTRL_DMA_SADDR:
     */
    FU_RAYDIUM_TP_FLASH_CTRL_DMA_SADDR = 0x50000A20,
    /**
     * FU_RAYDIUM_TP_FLASH_CTRL_DMA_EADDR:
     */
    FU_RAYDIUM_TP_FLASH_CTRL_DMA_EADDR = 0x50000A24,
    /**
     * FU_RAYDIUM_TP_FLASH_CTRL_DMA_IER:
     */
    FU_RAYDIUM_TP_FLASH_CTRL_DMA_IER = 0x50000A14,
    /**
     * FU_RAYDIUM_TP_FLASH_CTRL_DMA_CR:
     */
    FU_RAYDIUM_TP_FLASH_CTRL_DMA_CR = 0x50000A00,
    /**
     * FU_RAYDIUM_TP_FLASH_CTRL_DMA_RES:
     */
    FU_RAYDIUM_TP_FLASH_CTRL_DMA_RES = 0x50000A28,
}  FuRaydiumTpFlashCtrl;
/**
 * FuRaydiumTpKey:
 */
typedef enum {
    /**
     * FU_RAYDIUM_TP_KEY_DISABLE_FLASH_PROTECTION:
     */
    FU_RAYDIUM_TP_KEY_DISABLE_FLASH_PROTECTION = 0x50000624,
    /**
     * FU_RAYDIUM_TP_KEY_DISABLE:
     */
    FU_RAYDIUM_TP_KEY_DISABLE = 0x00000000,
    /**
     * FU_RAYDIUM_TP_KEY_UNLOCK_PRAM:
     */
    FU_RAYDIUM_TP_KEY_UNLOCK_PRAM = 0x50000900,
    /**
     * FU_RAYDIUM_TP_KEY_FLASH_FLKEY1:
     */
    FU_RAYDIUM_TP_KEY_FLASH_FLKEY1 = 0x50000934,
    /**
     * FU_RAYDIUM_TP_KEY_FLASH_FLKEY2:
     */
    FU_RAYDIUM_TP_KEY_FLASH_FLKEY2 = 0x50000938,
    /**
     * FU_RAYDIUM_TP_KEY_FLKEY1_KEY:
     */
    FU_RAYDIUM_TP_KEY_FLKEY1_KEY = 0x000000A5,
    /**
     * FU_RAYDIUM_TP_KEY_FLKEY2_KEY:
     */
    FU_RAYDIUM_TP_KEY_FLKEY2_KEY = 0x000000C3,
    /**
     * FU_RAYDIUM_TP_KEY_FLKEY3_KEY:
     */
    FU_RAYDIUM_TP_KEY_FLKEY3_KEY = 0x000000D7,
    /**
     * FU_RAYDIUM_TP_KEY_FLREAD_STATUS:
     */
    FU_RAYDIUM_TP_KEY_FLREAD_STATUS = 0x00000105,
    /**
     * FU_RAYDIUM_TP_KEY_FLWRITE_EN:
     */
    FU_RAYDIUM_TP_KEY_FLWRITE_EN = 0x00010006,
    /**
     * FU_RAYDIUM_TP_KEY_FLWRITE_STATUS:
     */
    FU_RAYDIUM_TP_KEY_FLWRITE_STATUS = 0x00014001,
    /**
     * FU_RAYDIUM_TP_KEY_RESET_REG:
     */
    FU_RAYDIUM_TP_KEY_RESET_REG = 0x40000004,
    /**
     * FU_RAYDIUM_TP_KEY_RESET_VALUE:
     */
    FU_RAYDIUM_TP_KEY_RESET_VALUE = 0x00000001,
}  FuRaydiumTpKey;
/**
 * FuRaydiumTpHidData:
 */
typedef enum {
    /**
     * FU_RAYDIUM_TP_HID_DATA_HEADER1:
     */
    FU_RAYDIUM_TP_HID_DATA_HEADER1 = 0x04,
    /**
     * FU_RAYDIUM_TP_HID_DATA_HEADER3_WR:
     */
    FU_RAYDIUM_TP_HID_DATA_HEADER3_WR = 0x21,
    /**
     * FU_RAYDIUM_TP_HID_DATA_HEADER3_RD:
     */
    FU_RAYDIUM_TP_HID_DATA_HEADER3_RD = 0x12,
    /**
     * FU_RAYDIUM_TP_HID_DATA_HEADER4_WR:
     */
    FU_RAYDIUM_TP_HID_DATA_HEADER4_WR = 0x03,
    /**
     * FU_RAYDIUM_TP_HID_DATA_HEADER4_RD:
     */
    FU_RAYDIUM_TP_HID_DATA_HEADER4_RD = 0x02,
    /**
     * FU_RAYDIUM_TP_HID_DATA_HEADER5:
     */
    FU_RAYDIUM_TP_HID_DATA_HEADER5 = 0x05,
    /**
     * FU_RAYDIUM_TP_HID_DATA_HEADER10:
     */
    FU_RAYDIUM_TP_HID_DATA_HEADER10 = 0x3C,
}  FuRaydiumTpHidData;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructRaydiumTpFtRecordInfo;

FuStructRaydiumTpFtRecordInfo *fu_struct_raydium_tp_ft_record_info_ref(FuStructRaydiumTpFtRecordInfo *st) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_ft_record_info_unref(FuStructRaydiumTpFtRecordInfo *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructRaydiumTpFtRecordInfo, fu_struct_raydium_tp_ft_record_info_unref)
FuStructRaydiumTpFtRecordInfo *fu_struct_raydium_tp_ft_record_info_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_raydium_tp_ft_record_info_get_version_major(const FuStructRaydiumTpFtRecordInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_raydium_tp_ft_record_info_get_version_minor(const FuStructRaydiumTpFtRecordInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_raydium_tp_ft_record_info_get_pid(const FuStructRaydiumTpFtRecordInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_raydium_tp_ft_record_info_get_vid(const FuStructRaydiumTpFtRecordInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_raydium_tp_ft_record_info_get_slave_id(const FuStructRaydiumTpFtRecordInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_RAYDIUM_TP_FT_RECORD_INFO_OFFSET_VERSION_MAJOR 0x0
#define FU_STRUCT_RAYDIUM_TP_FT_RECORD_INFO_OFFSET_VERSION_MINOR 0x1
#define FU_STRUCT_RAYDIUM_TP_FT_RECORD_INFO_OFFSET_PID 0x2
#define FU_STRUCT_RAYDIUM_TP_FT_RECORD_INFO_OFFSET_VID 0x4
#define FU_STRUCT_RAYDIUM_TP_FT_RECORD_INFO_OFFSET_SLAVE_ID 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_RAYDIUM_TP_FT_RECORD_INFO_SIZE 0x8
#endif

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

FuStructRaydiumTpDescRecordInfo *fu_struct_raydium_tp_desc_record_info_ref(FuStructRaydiumTpDescRecordInfo *st) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_desc_record_info_unref(FuStructRaydiumTpDescRecordInfo *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructRaydiumTpDescRecordInfo, fu_struct_raydium_tp_desc_record_info_unref)
FuStructRaydiumTpDescRecordInfo *fu_struct_raydium_tp_desc_record_info_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_raydium_tp_desc_record_info_get_header(const FuStructRaydiumTpDescRecordInfo *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_raydium_tp_desc_record_info_get_vid(const FuStructRaydiumTpDescRecordInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_raydium_tp_desc_record_info_get_pid(const FuStructRaydiumTpDescRecordInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_raydium_tp_desc_record_info_get_rev(const FuStructRaydiumTpDescRecordInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_RAYDIUM_TP_DESC_RECORD_INFO_OFFSET_HEADER 0x0
#define FU_STRUCT_RAYDIUM_TP_DESC_RECORD_INFO_OFFSET_VID 0x14
#define FU_STRUCT_RAYDIUM_TP_DESC_RECORD_INFO_OFFSET_PID 0x16
#define FU_STRUCT_RAYDIUM_TP_DESC_RECORD_INFO_OFFSET_REV 0x18
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_RAYDIUM_TP_DESC_RECORD_INFO_SIZE_HEADER 0x14
#define FU_STRUCT_RAYDIUM_TP_DESC_RECORD_INFO_N_ELEMENTS_HEADER 20
#define FU_STRUCT_RAYDIUM_TP_DESC_RECORD_INFO_SIZE 0x1B
#endif

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

FuStructRaydiumTpFwHdr *fu_struct_raydium_tp_fw_hdr_ref(FuStructRaydiumTpFwHdr *st) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_fw_hdr_unref(FuStructRaydiumTpFwHdr *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructRaydiumTpFwHdr, fu_struct_raydium_tp_fw_hdr_unref)
FuStructRaydiumTpFwHdr *fu_struct_raydium_tp_fw_hdr_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_raydium_tp_fw_hdr_get_vendor_id(const FuStructRaydiumTpFwHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_raydium_tp_fw_hdr_get_product_id(const FuStructRaydiumTpFwHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_raydium_tp_fw_hdr_get_fw_base(const FuStructRaydiumTpFwHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_raydium_tp_fw_hdr_get_desc_base(const FuStructRaydiumTpFwHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_raydium_tp_fw_hdr_get_start(const FuStructRaydiumTpFwHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_raydium_tp_fw_hdr_get_length(const FuStructRaydiumTpFwHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_raydium_tp_fw_hdr_get_desc_start(const FuStructRaydiumTpFwHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_raydium_tp_fw_hdr_get_desc_length(const FuStructRaydiumTpFwHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_RAYDIUM_TP_FW_HDR_OFFSET_VENDOR_ID 0x0
#define FU_STRUCT_RAYDIUM_TP_FW_HDR_OFFSET_PRODUCT_ID 0x2
#define FU_STRUCT_RAYDIUM_TP_FW_HDR_OFFSET_FW_BASE 0x4
#define FU_STRUCT_RAYDIUM_TP_FW_HDR_OFFSET_DESC_BASE 0x8
#define FU_STRUCT_RAYDIUM_TP_FW_HDR_OFFSET_START 0x10
#define FU_STRUCT_RAYDIUM_TP_FW_HDR_OFFSET_LENGTH 0x14
#define FU_STRUCT_RAYDIUM_TP_FW_HDR_OFFSET_DESC_START 0x18
#define FU_STRUCT_RAYDIUM_TP_FW_HDR_OFFSET_DESC_LENGTH 0x1C
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_RAYDIUM_TP_FW_HDR_SIZE 0x20
#endif

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

FuStructRaydiumTpHidPacket *fu_struct_raydium_tp_hid_packet_ref(FuStructRaydiumTpHidPacket *st) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_hid_packet_unref(FuStructRaydiumTpHidPacket *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructRaydiumTpHidPacket, fu_struct_raydium_tp_hid_packet_unref)
FuStructRaydiumTpHidPacket *fu_struct_raydium_tp_hid_packet_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_raydium_tp_hid_packet_set_header2(FuStructRaydiumTpHidPacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_hid_packet_set_header3(FuStructRaydiumTpHidPacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_hid_packet_set_header4(FuStructRaydiumTpHidPacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_hid_packet_set_header6(FuStructRaydiumTpHidPacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_hid_packet_set_data0(FuStructRaydiumTpHidPacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_hid_packet_set_data1(FuStructRaydiumTpHidPacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_hid_packet_set_data2(FuStructRaydiumTpHidPacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_hid_packet_set_data3(FuStructRaydiumTpHidPacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_hid_packet_set_data4(FuStructRaydiumTpHidPacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_hid_packet_set_data5(FuStructRaydiumTpHidPacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_raydium_tp_hid_packet_set_length(FuStructRaydiumTpHidPacket *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_HEADER0 0x0
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_HEADER1 0x1
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_HEADER2 0x2
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_HEADER3 0x3
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_HEADER4 0x4
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_HEADER5 0x5
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_HEADER6 0x6
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_DATA0 0x7
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_DATA1 0x8
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_DATA2 0x9
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_DATA3 0xA
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_DATA4 0xB
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_DATA5 0xC
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_OFFSET_LENGTH 0xD
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_SIZE 0x40
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_DEFAULT_HEADER0 FU_RAYDIUM_TP_CMD2_WID
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_DEFAULT_HEADER1 FU_RAYDIUM_TP_HID_DATA_HEADER1
#define FU_STRUCT_RAYDIUM_TP_HID_PACKET_DEFAULT_HEADER5 FU_RAYDIUM_TP_HID_DATA_HEADER5
#endif
