FuSrecFirmware: fwupd Reference Manual

## FuSrecFirmware FuSrecFirmware |

## Functions

FuFirmware * | fu_srec_firmware_new ()
GPtrArray * | fu_srec_firmware_get_records ()
FuSrecFirmwareRecord * | fu_srec_firmware_record_new ()

## Types and Values

#define | FU_TYPE_SREC_FIRMWARE
struct | FuSrecFirmwareClass
enum | FuFirmareSrecRecordKind
| FuSrecFirmwareRecord
| FuSrecFirmware

## Description

## Functions

### fu_srec_firmware_new ()

    FuFirmware *
    fu_srec_firmware_new (void);

Creates a new FuFirmware of type SREC

Since: 1.3.2

### fu_srec_firmware_get_records ()

    GPtrArray *
    fu_srec_firmware_get_records (FuSrecFirmware *self);

Returns the raw records from SREC tokenization.

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

#### Parameters

self | A FuSrecFirmware |

#### Returns

records.

[transfer none][element-type FuSrecFirmwareRecord]

Since: 1.3.2

### fu_srec_firmware_record_new ()

    FuSrecFirmwareRecord *
    fu_srec_firmware_record_new (guint ln,
                                 FuFirmareSrecRecordKind kind,
                                 guint32 addr);

## Types and Values

### FU_TYPE_SREC_FIRMWARE

    #define FU_TYPE_SREC_FIRMWARE (fu_srec_firmware_get_type ())

### struct FuSrecFirmwareClass

    struct FuSrecFirmwareClass {
    	FuFirmwareClass		 parent_class;
    };

### enum FuFirmareSrecRecordKind

The kind of SREC record kind.

#### Members

FU_FIRMWARE_SREC_RECORD_KIND_S0_HEADER | Header |
FU_FIRMWARE_SREC_RECORD_KIND_S1_DATA_16 | 16 bit data |
FU_FIRMWARE_SREC_RECORD_KIND_S2_DATA_24 | 24 bit data |
FU_FIRMWARE_SREC_RECORD_KIND_S3_DATA_32 | 32 bit data |
FU_FIRMWARE_SREC_RECORD_KIND_S4_RESERVED | Reserved value |
FU_FIRMWARE_SREC_RECORD_KIND_S5_COUNT_16 | 16 bit count |
FU_FIRMWARE_SREC_RECORD_KIND_S6_COUNT_24 | 24 bit count |
FU_FIRMWARE_SREC_RECORD_KIND_S7_COUNT_32 | 32 bit count |
FU_FIRMWARE_SREC_RECORD_KIND_S8_TERMINATION_24 | 24 bit termination |
FU_FIRMWARE_SREC_RECORD_KIND_S9_TERMINATION_16 | 16 bit termination |

### FuSrecFirmwareRecord

    typedef struct {
    	guint			 ln;
    	FuFirmareSrecRecordKind	 kind;
    	guint32			 addr;
    	GByteArray		*buf;
    } FuSrecFirmwareRecord;

A single SREC record.

### FuSrecFirmware

    typedef struct _FuSrecFirmware FuSrecFirmware;

A SREC firmware image.

See also: [class`FuFirmware` ]