private byte[] GetPixelsInternal(Ws281x_channel_t channel) { var buffer = new byte[channel.count * 4]; Marshal.Copy(channel.leds, buffer, 0, buffer.Length); return(buffer); }
private void SetPixelsInternal(Ws281x_channel_t channel, byte[] pixels) { Marshal.Copy(pixels, 0, channel.leds, pixels.Length); }
private void SetPixelsInternal(Ws281x_channel_t channel, uint[] pixels) { var blittable = (int[])(object)pixels; Marshal.Copy(blittable, 0, channel.leds, blittable.Length); }