Passing all cells (bytes) and writing zeros in them.
clear
@/clear
Passing all cells (bytes) and writing zeros in them.
RSTboolean
OKboolean
To use the node in your project you should have the maksimbaturin/non-volatile-u32-counter library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.
C++ implementation
#pragma XOD require "https://github.com/dancojocaru2000/ArduinoEEPROM"
{{#global}}
#include <EEPROM.h>
{{/global}}
struct State {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
if (isInputDirty<input_RST>(ctx)) {
// Проход всех ячеек(байтов) и запись в них нулей.
for (int i = 0; i < EEPROM.length(); i++) EEPROM.update(i, 0);
emitValue<output_OK>(ctx, true);
}
}