w5500-device

xod-dev/w5500/w5500-device

Represents a W5500-based ethernet device Possible errors: — Invalid port
w5500-device
@/w5500-device
Represents a W5500-based ethernet device Possible errors: — Invalid port
MACxod/net/mac-address
A MAC address. Should be unique for a device. Often printed on the bottom or a package.
CSport
A chip select port
w5500-device
MAC
CS
DEV
DEV@/w5500-device
A W5500-based internet provider device
To use the node in your project you should have the xod-dev/w5500 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

node {
    meta {
        struct Type {
            uint8_t* mac;
            uint8_t cs;
        };
    }
    void evaluate(Context ctx) {
        static_assert(isValidDigitalPort(constant_input_CS), "must be a valid digital port");

        auto mac = getValue<input_MAC>(ctx);
        auto csPort = getValue<input_CS>(ctx);

        Type dev;
        dev.mac = mac;
        dev.cs = csPort;

        emitValue<output_DEV>(ctx, dev);
    }
}