BSDL Device Tree Compiler
|
Public Member Functions | |
virtual void | write_label (string name)=0 |
virtual void | write_comment (string name)=0 |
virtual void | write_string (string name)=0 |
virtual void | write_data (uint8_t)=0 |
virtual void | write_data (uint32_t)=0 |
virtual void | write_data (uint64_t)=0 |
virtual void | write_to_file (int fd)=0 |
virtual uint32_t | size ()=0 |
void | write_token (token_type t) |
void | write_data (byte_buffer b) |
Abstract class for writing a section of the output. We create one of these for each section that needs to be written. It is intended to build a temporary buffer of the output in memory and then write it to a file stream. The size can be returned after all of the data has been written into the internal buffer, so the sizes of the three tables can be calculated before storing them in the buffer.
|
pure virtual |
Returns the number of bytes.
Implemented in dtc::dtb::asm_writer, and dtc::dtb::binary_writer.
|
pure virtual |
Writes a comment into the output stream. Useful only when debugging the output.
Implemented in dtc::dtb::asm_writer, and dtc::dtb::binary_writer.
|
pure virtual |
Writes a single 8-bit value.
Implemented in dtc::dtb::asm_writer, and dtc::dtb::binary_writer.
|
pure virtual |
Writes a single 32-bit value. The value is written in big-endian format, but should be passed in the host's native endian.
Implemented in dtc::dtb::asm_writer, and dtc::dtb::binary_writer.
|
pure virtual |
Writes a single 64-bit value. The value is written in big-endian format, but should be passed in the host's native endian.
Implemented in dtc::dtb::asm_writer, and dtc::dtb::binary_writer.
|
inline |
Helper function that writes a byte buffer to the output, one byte at a time.
|
pure virtual |
Writes a label into the output stream. This is only applicable for assembly output, where the labels become symbols that can be resolved at link time.
Implemented in dtc::dtb::asm_writer, and dtc::dtb::binary_writer.
|
pure virtual |
Writes a string. A nul terminator is implicitly added.
Implemented in dtc::dtb::asm_writer, and dtc::dtb::binary_writer.
|
pure virtual |
Writes the collected output to the specified file descriptor.
Implemented in dtc::dtb::asm_writer, and dtc::dtb::binary_writer.
|
inline |
Helper for writing tokens to the output stream. This writes a comment above the token describing its value, for easier debugging of the output.