Structure to build up a single Record of an SREC file.
More...
#include <srec.h>
|
enum | Type {
HEADER = 0
, DATA16 = 1
, DATA24 = 2
, DATA32 = 3
,
RESERVED = 4
, COUNT16 = 5
, COUNT24 = 6
, TERM32 = 7
,
TERM24 = 8
, TERM16 = 9
} |
| The SREC Record type.
|
|
Structure to build up a single Record of an SREC file.
Definition at line 34 of file srec.h.
◆ Record()
fletchgen::srec::Record::Record |
( |
Type |
type, |
|
|
uint32_t |
address, |
|
|
const uint8_t * |
data, |
|
|
size_t |
size |
|
) |
| |
SREC Record constructor. Data is copied into the Record.
- Parameters
-
type | The type of the SREC record. |
address | The address of the data in the SREC file. |
data | The data. |
size | The size of the data in bytes. |
Definition at line 24 of file srec.cc.
◆ Data()
template<uint32_t S>
static Record fletchgen::srec::Record::Data |
( |
uint32_t |
srec_address, |
|
|
const uint8_t * |
data, |
|
|
size_t |
size |
|
) |
| |
|
inlinestatic |
Create an SREC data Record.
- Template Parameters
-
S | The size of the address field. |
- Parameters
-
srec_address | The address in the SREC file. |
data | The data. |
size | The size of the data. |
- Returns
- An SREC data record.
Definition at line 93 of file srec.h.
◆ Header()
Record fletchgen::srec::Record::Header |
( |
const std::string & |
header_str = "HDR" , |
|
|
uint16_t |
address = 0 |
|
) |
| |
|
static |
Create an SREC header Record.
If header_str is longer than MAX_DATA_BYTES, the remainder of the characters are chopped off.
- Parameters
-
header_str | The header ASCII string, typically "HDR" |
address | The header address, typically 0. |
- Returns
- An SREC Record of type S0 (Header)
Definition at line 44 of file srec.cc.
The documentation for this class was generated from the following files: