Structure to build up an SREC file with multiple Record lines.
More...
#include <srec.h>
|
| File (uint32_t start_address, const uint8_t *data, size_t size, const std::string &header_str="HDR") |
| Construct a new File from some data source in memory. More...
|
|
| File (std::istream *input) |
| Construct a new File, reading the contents from an input stream. More...
|
|
void | write (std::ostream *output) |
| Write the SREC file to an output stream. More...
|
|
void | ToBuffer (uint8_t **buffer, size_t *size) |
| Convert an SREC file to a raw buffer. More...
|
|
Structure to build up an SREC file with multiple Record lines.
Definition at line 137 of file srec.h.
◆ File() [1/2]
fletchgen::srec::File::File |
( |
uint32_t |
start_address, |
|
|
const uint8_t * |
data, |
|
|
size_t |
size, |
|
|
const std::string & |
header_str = "HDR" |
|
) |
| |
Construct a new File from some data source in memory.
- Parameters
-
start_address | The start address of the file. |
data | The data source. |
size | The number of bytes of source data. |
header_str | The header string. Default is commonly used "HDR". |
Definition at line 160 of file srec.cc.
◆ File() [2/2]
fletchgen::srec::File::File |
( |
std::istream * |
input | ) |
|
|
explicit |
Construct a new File, reading the contents from an input stream.
- Parameters
-
Definition at line 192 of file srec.cc.
◆ ToBuffer()
void fletchgen::srec::File::ToBuffer |
( |
uint8_t ** |
buffer, |
|
|
size_t * |
size |
|
) |
| |
Convert an SREC file to a raw buffer.
Allocates memory that must be freed.
- Parameters
-
buffer | A pointer to a pointer that will be set to newly allocated buffer. |
size | The size of the buffer. |
Definition at line 203 of file srec.cc.
◆ write()
void fletchgen::srec::File::write |
( |
std::ostream * |
output | ) |
|
Write the SREC file to an output stream.
- Parameters
-
output | The output stream to write to. |
Definition at line 182 of file srec.cc.
The documentation for this struct was generated from the following files: