pxt-calliope/sim/state/neopixel.ts

14 lines
381 B
TypeScript
Raw Normal View History

2016-08-30 20:51:32 +02:00
namespace pxsim {
export function sendBufferAsm(buffer: RefBuffer, pin: DigitalPin) {
2016-08-30 20:51:32 +02:00
let b = board();
if (b) {
let np = b.neopixelState;
if (np) {
let buf = buffer.data;
np.updateBuffer(buf as any, pin); // TODO this is wrong
2016-08-30 20:51:32 +02:00
runtime.queueDisplayUpdate();
}
}
}
}