bn::sram namespace
#include <bn_sram.h>

SRAM related functions.

Contents

Functions

auto size() -> int constexpr
Returns the total SRAM size in bytes.
template<typename Type>
void write(const Type& source)
Copies the given value into SRAM.
template<typename Type>
void write_offset(const Type& source, int offset)
Copies the given value into SRAM.
template<typename Type>
void read(Type& destination)
Copies SRAM data into the given value.
template<typename Type>
void read_offset(Type& destination, int offset)
Copies SRAM data into the given value.

Function documentation

template<typename Type>
void bn::sram::write(const Type& source)

Copies the given value into SRAM.

Parameters
source Value to copy.

template<typename Type>
void bn::sram::write_offset(const Type& source, int offset)

Copies the given value into SRAM.

Parameters
source Value to copy.
offset The given value is copied into SRAM start address + this offset.

template<typename Type>
void bn::sram::read(Type& destination)

Copies SRAM data into the given value.

Parameters
destination SRAM data is copied into this value.

template<typename Type>
void bn::sram::read_offset(Type& destination, int offset)

Copies SRAM data into the given value.

Parameters
destination SRAM data is copied into this value.
offset Copying starts from SRAM start address + this offset.