pxt-calliope/sim/state/neopixel.ts
Peli de Halleux 90fe68943e
Moving back to pxtcore v0 (#10)
* migrating to v0

* moving external repos to targetconfig

* reenabling sharing

* updating target

* missing dependencies

* updated pxt version

* fixing missing file

* ignore docs errors

* udpated readme

* bumping pxt

* moving setting to correct location

* missing blockly less
2017-12-12 10:55:00 -08:00

14 lines
384 B
TypeScript

namespace pxsim {
export function sendBufferAsm(buffer: Buffer, pin: DigitalPin) {
let b = board();
if (b) {
let np = b.neopixelState;
if (np) {
let buf = <Uint8Array>(<any>buffer).data;
np.updateBuffer(buf, pin);
runtime.queueDisplayUpdate();
}
}
}
}