export function _setLedChannel()

in sim/dalboard.ts [267:279]


        export function _setLedChannel(ch: number, val: number) {
            const b = board() as DalBoard
            if (b.neopixelPin) {
                const state = b.neopixelState(b.neopixelPin.id);
                state.mode = NeoPixelMode.RGB_RGB;
                if (!state.buffer)
                    state.buffer = new Uint8Array(3);
                if (val > 0xffff) val = 0xffff;
                if (val < 0) val = 0;
                state.buffer[ch] = val >> 8;
                runtime.updateDisplay();
            }
        }