dlite/fs/api_dlite.js

40 lines
2.2 KiB
JavaScript
Raw Permalink Normal View History

let addColor = ffi('void addColor(char *,int,int,int)');
let addAnimationStep = ffi('void addAnimationStep(int, char *, int)');
let LEDMode_on=1, LEDMode_off=2, LEDMode_blink=3, LEDMode_tv=4, LEDMode_fire=5;
let LEDStateEngine_init = ffi('void LEDStateEngine_init(int, int)');
let LEDStateEngine_start = ffi('void startLEDStateEngine(void)');
let LEDStateEngine_pause = ffi('void pauseLEDStateEngine(void)');
let LEDStateEngine_getMinTickTime = ffi('double LEDStateEngine_getMinTickTime(void)');
let LEDStateEngine_getMaxTickTime = ffi('double LEDStateEngine_getMaxTickTime(void)');
let LEDState_getRed = ffi('int LEDState_getLedRed(int)');
let LEDState_getGreen = ffi('int LEDState_getLedGreen(int)');
let LEDState_getBlue = ffi('int LEDState_getLedBlue(int)');
let LEDState_getColorName = ffi('char * LEDState_getLedColorName(int)');
let LEDState_getNextTick = ffi('int LEDState_getNextTick(int)');
let LEDState_getCurrentTick = ffi('int LEDState_getCurrentTick(int)');
let LEDDefinition_addByName = ffi('void LEDDefinition_addByName(char *, char *, char *, char *)');
let LEDDefinition_getLevel = ffi('char *LEDDefinition_getLevel(int)');
let LEDDefinition_getRoom = ffi('char *LEDDefinition_getRoom(int)');
let LEDDefinition_getId = ffi('char *LEDDefinition_getId(int)');
let LEDDefinition_getOnColorRed = ffi('int LEDDefinition_getOnColorRed(int)');
let LEDDefinition_getOnColorGreen = ffi('int LEDDefinition_getOnColorGreen(int)');
let LEDDefinition_getOnColorBlue = ffi('int LEDDefinition_getOnColorBlue(int)');
let getTicks = ffi('int getTicks(void)');
let printColor = ffi('void printColor(char *)');
let NeoPixel_show = ffi('void NeoPixel_show(void)');
let NeoPixel_clear = ffi('void NeoPixel_clear(void)');
let NeoPixel_set = ffi('void NeoPixel_set(int,int,int,int)');
let NeoPixel_getBrightness = ffi('int NeoPixel_getBrightness(void)');
let NeoPixel_setBrightness = ffi('void NeoPixel_setBrightness(int)');
let LEDScheduler_init = ffi('void LEDScheduler_init(int, int, int)');
let LEDScheduler_run = ffi('void LEDScheduler_run(void)');
let LEDScheduler_pause = ffi('void LEDScheduler_pause(void)');
let LEDScheduler_addItem = ffi('void LEDScheduler_addItem(int, int, int, char *, char *)');
let LEDScheduler_setWatch = ffi('void LEDScheduler_setWatch(int, int, int)');