FuIhexFirmware: fwupd Reference Manual

## FuIhexFirmware FuIhexFirmware |

## Functions

FuFirmware * | fu_ihex_firmware_new ()
GPtrArray * | fu_ihex_firmware_get_records ()
void | fu_ihex_firmware_set_padding_value ()

## Types and Values

#define | FU_TYPE_IHEX_FIRMWARE
struct | FuIhexFirmwareClass
| FuIhexFirmwareRecord
#define | FU_IHEX_FIRMWARE_RECORD_TYPE_DATA
#define | FU_IHEX_FIRMWARE_RECORD_TYPE_EOF
#define | FU_IHEX_FIRMWARE_RECORD_TYPE_EXTENDED_SEGMENT
#define | FU_IHEX_FIRMWARE_RECORD_TYPE_START_SEGMENT
#define | FU_IHEX_FIRMWARE_RECORD_TYPE_EXTENDED_LINEAR
#define | FU_IHEX_FIRMWARE_RECORD_TYPE_START_LINEAR
#define | FU_IHEX_FIRMWARE_RECORD_TYPE_SIGNATURE
| FuIhexFirmware

## Description

## Functions

### fu_ihex_firmware_new ()

    FuFirmware *
    fu_ihex_firmware_new (void);

Creates a new FuFirmware of sub type Ihex

Since: 1.3.1

### fu_ihex_firmware_get_records ()

    GPtrArray *
    fu_ihex_firmware_get_records (FuIhexFirmware *self);

Returns the raw lines from tokenization.

This might be useful if the plugin is expecting the hex file to be a list of operations, rather than a simple linear image with filled holes.

#### Parameters

self | A FuIhexFirmware |

#### Returns

records.

[transfer none][element-type FuIhexFirmwareRecord]

Since: 1.3.4

### fu_ihex_firmware_set_padding_value ()

    void
    fu_ihex_firmware_set_padding_value (FuIhexFirmware *self,
                                        guint8 padding_value);

Set the padding value to fill incomplete address ranges.

The default value of zero can be changed to `0xff` if functions like `fu_common_bytes_is_empty()` are going to be used on subsections of the data.

#### Parameters

self | A FuIhexFirmware |
padding_value | the byte used to pad the image |

Since: 1.6.0

## Types and Values

### FU_TYPE_IHEX_FIRMWARE

    #define FU_TYPE_IHEX_FIRMWARE (fu_ihex_firmware_get_type())

### struct FuIhexFirmwareClass

    struct FuIhexFirmwareClass {
    	FuFirmwareClass parent_class;
    };

### FuIhexFirmwareRecord

    typedef struct {
    	guint ln;
    	GString *buf;
    	guint8 byte_cnt;
    	guint32 addr;
    	guint8 record_type;
    	GByteArray *data;
    } FuIhexFirmwareRecord;

A single Intel HEX record.

### FU_IHEX_FIRMWARE_RECORD_TYPE_DATA

    #define FU_IHEX_FIRMWARE_RECORD_TYPE_DATA	      0x00

### FU_IHEX_FIRMWARE_RECORD_TYPE_EOF

    #define FU_IHEX_FIRMWARE_RECORD_TYPE_EOF	      0x01

### FU_IHEX_FIRMWARE_RECORD_TYPE_EXTENDED_SEGMENT

    #define FU_IHEX_FIRMWARE_RECORD_TYPE_EXTENDED_SEGMENT 0x02

### FU_IHEX_FIRMWARE_RECORD_TYPE_START_SEGMENT

    #define FU_IHEX_FIRMWARE_RECORD_TYPE_START_SEGMENT    0x03

### FU_IHEX_FIRMWARE_RECORD_TYPE_EXTENDED_LINEAR

    #define FU_IHEX_FIRMWARE_RECORD_TYPE_EXTENDED_LINEAR  0x04

### FU_IHEX_FIRMWARE_RECORD_TYPE_START_LINEAR

    #define FU_IHEX_FIRMWARE_RECORD_TYPE_START_LINEAR     0x05

### FU_IHEX_FIRMWARE_RECORD_TYPE_SIGNATURE

    #define FU_IHEX_FIRMWARE_RECORD_TYPE_SIGNATURE	      0xfd

### FuIhexFirmware

    typedef struct _FuIhexFirmware FuIhexFirmware;

A Intel hex (ihex) firmware image.

See also: [class`FuFirmware` ]