#pragma XOD require "https://github.com/amperka/QuadDisplay2"
{{#global}}
#include <QuadDisplay2.h>
{{/global}}
struct State {
uint8_t mem[sizeof(QuadDisplay)];
};
using Type = QuadDisplay*;
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
if (!isSettingUp()) return;
auto state = getState(ctx);
auto pinCS = getValue<input_CS>(ctx);
Type qd = new (state->mem) QuadDisplay(pinCS);
qd->begin();
emitValue<output_DEV>(ctx, qd);
}