quad-display

e/troyka-quad-display/quad-display

No description
quad-display
@/quad-display
CSport
Chip select port
quad-display
CS
DEV
DEV@/quad-display
To use the node in your project you should have the e/troyka-quad-display 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/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);
}