REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
#include <Arduino.h>
#include <cstring>
#include "imxrt.h"
#include "teensy_startup.h"
#include "utils/etl_base64.h"
#include "plugin/plugin.h"
#include "utils/align.h"
#include "utils/hashflash.h"
#include "utils/logging.h"

Go to the source code of this file.
Macros | |
#define | M(name) |
#define | CALL(type, sig) |
#define | return_err(code, msg) |
Functions | |
void | prepare_mpu () |
At the time being, we completely disable the Memory Protection Unit in order to enable our plugin system. | |
FLASHMEM std::string | shortened_hexdump (uint8_t *mem, size_t size) |
FLASHMEM void | dispatch (uint8_t *callee, Function::Returns ret_type, JsonVariant ret) |
Variables | |
static constexpr int | the_memsize = 1024 |
uint8_t | GlobalPluginLoader_Storage [the_memsize] |
Macro Definition Documentation
◆ CALL
#define CALL | ( | type, | |
sig ) |
Referenced by dispatch().
◆ M
#define M | ( | name | ) |
Referenced by loader::convertFromJson().
◆ return_err
#define return_err | ( | code, | |
msg ) |
Definition at line 143 of file plugin.cpp.
Function Documentation
◆ dispatch()
FLASHMEM void dispatch | ( | uint8_t * | callee, |
Function::Returns | ret_type, | ||
JsonVariant | ret ) |
Definition at line 123 of file plugin.cpp.
References CALL, and loader::Function::None.
Referenced by loader::SinglePluginLoader::load_and_execute(), and loader::SinglePluginLoader::unload().
◆ prepare_mpu()
void prepare_mpu | ( | ) |
At the time being, we completely disable the Memory Protection Unit in order to enable our plugin system.
The MPU can harden the memory security against exploits, so a more fine-grained approach is favorable in the future.
Definition at line 30 of file plugin.cpp.
Referenced by loader::GlobalPluginLoader::GlobalPluginLoader().
◆ shortened_hexdump()
FLASHMEM std::string shortened_hexdump | ( | uint8_t * | mem, |
size_t | size ) |
Definition at line 88 of file plugin.cpp.
Referenced by loader::convertToJson().
Variable Documentation
◆ GlobalPluginLoader_Storage
uint8_t GlobalPluginLoader_Storage[the_memsize] |
Definition at line 22 of file plugin.cpp.
Referenced by loader::GlobalPluginLoader::GlobalPluginLoader().
◆ the_memsize
|
staticconstexpr |
Definition at line 21 of file plugin.cpp.
Referenced by loader::GlobalPluginLoader::GlobalPluginLoader().