uart-1

xod/uart/uart-1

Constructor of HardwareUart, provides serial communication through Serial1.
uart-1
@/uart-1
Constructor of HardwareUart, provides serial communication through Serial1.
BAUDnumber
Speed of data transmission in bits per second (baud rate).
INITpulse
Begin UART communication
uart-1
UART
DONE
BAUD
INIT
DONEpulse
Pulses when UART communication began
UART@/uart
An UART object

C++ implementation

node {
    uint8_t mem[sizeof(HardwareUart)];
    HardwareUart* uart;

    void evaluate(Context ctx) {
        if (isSettingUp()) {
            uart = new (mem) HardwareUart(Serial1, (uint32_t)getValue<input_BAUD>(ctx));
            emitValue<output_UART>(ctx, uart);
        }

        if (isInputDirty<input_INIT>(ctx)) {
            uart->begin();
            emitValue<output_DONE>(ctx, 1);
        }
    }
}