fwwasm
Loading...
Searching...
No Matches
fwwasm.h
Go to the documentation of this file.
1
6#pragma once
7
8// SPARTAHACKs release 2-1-2026
9
10#define WASM_IMPORT(NAME) __attribute__((import_module("wiliwasm"))) __attribute__((import_name(NAME)))
11#define WASM_EXPORT extern "C" __attribute__((used)) __attribute__((visibility("default")))
12#define WASM_EXPORT_AS(NAME) WASM_EXPORT __attribute__((export_name(NAME)))
13
14#ifdef __cplusplus
15extern "C"
16{
17#endif
18
56
57#define FWGUI_EVENT_NUMTYPE_INT 1
58#define FWGUI_EVENT_NUMTYPE_UINT 2
59#define FWGUI_EVENT_NUMTYPE_FLOAT 3
60
61// Maximum amount of data for an event poll
62#define FW_GET_EVENT_DATA_MAX 34
63
72
84
91
103
117
126
143
144 // ===============================================================================
145 // General
146 // ===============================================================================
147
152 void waitms(int milliseconds) WASM_IMPORT("waitms");
153
157 int wilirand(void) WASM_IMPORT("wilirand");
158
162 unsigned int millis(void) WASM_IMPORT("millis");
163
164 // ===============================================================================
165 // GPIO
166 // ===============================================================================
172 void setIO(int io, int on) WASM_IMPORT("setIO");
178 unsigned int getIO(int io) WASM_IMPORT("getIO");
183 unsigned int getAllIO(void) WASM_IMPORT("getAllIO");
184
185 // ===============================================================================
186 // I2C
187 // ===============================================================================
196 int i2cRead(int address, int reg, unsigned char* data, int length) WASM_IMPORT("i2cRead");
197
206 int i2cWrite(int address, int reg, unsigned char* data, int length) WASM_IMPORT("i2cWrite");
207
208 // ===============================================================================
209 // SPI
210 // ===============================================================================
218 int SPIReadWrite(unsigned char* data_in, int length, unsigned char* data_out) WASM_IMPORT("SPIReadWrite");
219
220 // ===============================================================================
221 // CANFD
222 // ===============================================================================
233 int canfdTransmit(int channel, int id, int isXtd, int isCanfd, unsigned char * data, int length) WASM_IMPORT("canfdTransmit");
234
235 // ===============================================================================
236 // Terminal Commands
237 // ===============================================================================
242 void terminalWrite(char * szText) WASM_IMPORT("terminalWrite");
243
244 // ===============================================================================
245 // UART
246 // ===============================================================================
251 int UARTDataRxCount(void) WASM_IMPORT("UARTDataRxCount");
258 int UARTDataRead(unsigned char* data, int length) WASM_IMPORT("UARTDataRead");
265 int UARTDataWrite(unsigned char* data, int length) WASM_IMPORT("UARTDataWrite");
266
267 // ===============================================================================
268 // PWM
269 // ===============================================================================
277 int PWMSetFreqDuty(int io, float freq_hz, float duty) WASM_IMPORT("PWMSetFreqDuty");
283 int PWMStop(int io) WASM_IMPORT("PWMStop");
284
285 // ===============================================================================
286 // RADIO
287 // ===============================================================================
295 int RadioWrite(int index, unsigned char* data, int length) WASM_IMPORT("RadioWrite");
303 int RadioRead(int index, unsigned char* data, int length) WASM_IMPORT("RadioRead");
309 int RadioGetRxCount(int index) WASM_IMPORT("RadioGetRxCount");
313 int RadioLoadConfig(int index, unsigned char* data, int length) WASM_IMPORT("RadioLoadConfig");
320 int RadioTxSubFile(int index, const char* sub_file) WASM_IMPORT("RadioTxSubFile");
326 int RadioSetTx(int index) WASM_IMPORT("RadioSetTx");
332 int RadioSetRx(int index) WASM_IMPORT("RadioSetRx");
338 int RadioSetIdle(int index) WASM_IMPORT("RadioSetIdle");
339
345 int RadioGetRSSI(int index) WASM_IMPORT("RadioGetRSSI");
351 int RadioGetLQI(int index) WASM_IMPORT("RadioGetLQI");
352
357 int RadioSubFileIsTransmitting(void) WASM_IMPORT("RadioSubFileIsTransmitting");
358
362 void RadioSubFileStop(void) WASM_IMPORT("RadioSubFileStop");
363
372 int RadioScan(int index, int RssiThreshold, unsigned int* FoundPeak, unsigned int* FrequencyResult, int* RssiResult) WASM_IMPORT("RadioScan");
373
374 // ===============================================================================
375 // IR
376 // ===============================================================================
381 void sendIRData(unsigned int data) WASM_IMPORT("sendIRData");
382
383 // ===============================================================================
384 // LEDs
385 // ===============================================================================
395 void setBoardLED(int led_index, int red, int green, int blue, int duration_ms, LEDManagerLEDMode mode) WASM_IMPORT("setBoardLED");
400 void setLEDShowMode(int mode) WASM_IMPORT("setLEDShowMode");
401
402 // ===============================================================================
403 // Sound
404 // ===============================================================================
405
408 void playSoundFromFile(const char* file_name) WASM_IMPORT("playSoundFromFile");
409
412 void playSoundTextToSpeech(const char* text) WASM_IMPORT("playSoundTextToSpeech");
413
417 void playSoundFromNameOrID(const char* name, int id) WASM_IMPORT("playSoundFromNameOrID");
418
424 void playSoundFromNumber(int bFloat, int iNumber, float fNumber, int iFloatDigits) WASM_IMPORT("playSoundFromNumber");
425
426
427
434 float duration, float amplitude, audioWaveType wavetype)
435 WASM_IMPORT("playSoundFromFrequencyAndDuration");
436
437
438 // ===============================================================================
439 // File IO
440 // ===============================================================================
441 int openFile(const char* file_name, int mode) WASM_IMPORT("OpenFile");
442 int closeFile(int handle) WASM_IMPORT("closeFile");
443 int writeFile(int handle, unsigned char* data, int data_bytes) WASM_IMPORT("writeFile");
444 int preAllocateSpaceForFile(int handle, int size_in_bytes) WASM_IMPORT("preAllocateSpaceForFile");
445 int readFile(int handle, unsigned char* data, int* data_bytes) WASM_IMPORT("readFile");
446 int readFileLine(int handle, char* data, int* data_bytes) WASM_IMPORT("readFileLine");
447 int setFilePosition(int handle, int position) WASM_IMPORT("setFilePosition");
448 int getFilePosition(int handle) WASM_IMPORT("getFilePosition");
449 int getFileSize(int handle) WASM_IMPORT("getFileSize");
450
451 // ===============================================================================
452 // File System
453 // ===============================================================================
454 int renameFileOrDirectory(const char* name, const char* new_name) WASM_IMPORT("renameFileOrDirectory");
455 int fileExists(const char* file_name) WASM_IMPORT("fileExists");
456 int makeDirectory(const char* file_name) WASM_IMPORT("makeDirectory");
457 int changeDirectory(const char* file_name) WASM_IMPORT("changeDirectory") WASM_IMPORT("changeDirectory");
458 int getDirectoryItemByIndex(const char* directory, const char* file_name, int include_extension, int index)
460 void getVolumeInfo(int* free, int* total) WASM_IMPORT("getVolumeInfo");
462
463 // ===============================================================================
464 // User Interface
465 // ===============================================================================
466
472 int getEventData(unsigned char* data) WASM_IMPORT("getEventData");
478
479 // ===============================================================================
480 // Panels
481 // ===============================================================================
494 void addPanel(int panel, int visible, int in_rotation, int use_tile, int tile_id, int bg_red, int bg_green, int bg_blue, int show_menu)
496
509 void addPanelPickList(int panel,
510 const char* szCaption,
511 int iTileID,
512 int iIconID,
513 unsigned char iRBack,
514 unsigned char iGBack,
515 unsigned iBBack,
516 unsigned char iRFore,
517 unsigned char iGFore,
518 unsigned iBFore,
519 int iLogIndex) WASM_IMPORT("addPanelPickList");
520
525 void setPanelMenuText(int panel, int iButtonGreyFromZero, const char* message) WASM_IMPORT("setPanelMenuText");
526
528 void addControlLED(int index,
529 int iControlIndex,
530 int iX,
531 int iY,
532 ePanelColorLED iColor,
533 ePanelSizeLED iSize,
534 int iIntialState) WASM_IMPORT("addControlLED"); // redefined and implemented
535
536 void setListItemText(int iLogIndex, int iListIndex, const char* szText) WASM_IMPORT("setListItemText");
537 void setListItemSelected(int iLogIndex, int iListIndex);
538 void setListItemTopIndex(int iLogIndex, int iListIndex);
539 void clearLogOrPlotData(int iLogIndexPlusOne, int iPlotIndexPlusOne) WASM_IMPORT("clearLogOrPlotData");
540
541 void addControlLogList(int index,
542 int iControlIndex,
543 int visible,
544 int iLog,
545 int iX, //5
546 int iY,
547 int iWidth,
548 int iHeight,
549 int iFontType,
550 int iFontSize,//10
551 int iR,
552 int iG,
553 int iB,
554 int iRFont,
555 int iGFont,//15
556 int iBFont,
557 int iListMode) WASM_IMPORT("addControlLogList");
558
559 void addControlPlotXAxis(int index, int iControlIndex, int iScrollMode, unsigned long long iTimeMin, unsigned long long iTimeMax)
568 void addControlPlotData(int plotline, int r, int g, int b) WASM_IMPORT("addControlPlotData");
569
586 void addControlPlot(int panel,
587 int control,
588 int visible,
589 int plotDataBitField,
590 int x,
591 int y,
592 int width,
593 int height,
594 int min,
595 int max,
596 int r,
597 int g,
598 int b) WASM_IMPORT("addControlPlot");
617 void addControlNumber(int panel,
618 int control,
619 int visible,
620 int x,
621 int y,
622 int width,
623 int fontSize,
624 int fontType,
625 int r,
626 int g,
627 int b,
628 int isFloat,
629 int floatDigits,
630 int isHexFormat,
631 int isUnsigned) WASM_IMPORT("addControlNumber");
632
642 void addControlPicture(int panel, int control, int x, int y, int pictureID, int visible) WASM_IMPORT("addControlPicture");
643
657 void addControlText(int panel,
658 int control,
659 int x,
660 int y,
661 int fontType,
662 int fontSize,
663 int r,
664 int g,
665 int b,
666 const char* text_value) WASM_IMPORT("addControlText");
667
681 void addControlBargraph(int panel,
682 int control,
683 int visible,
684 int x,
685 int y,
686 int width,
687 int height,
688 int min,
689 int max,
690 int r,
691 int g,
693
711 void addControlButton(int panel,
712 int control,
713 int visible,
714 int x,
715 int y,
716 int width,
717 int height,
718 int r,
719 int g,
720 int b,
721 int rFont,
722 int gFont,
723 int bFont,
724 const char* text) WASM_IMPORT("addControlButton");
725
734 void setControlValueMinMax(int panel, int control,
735 int enable, int min, int max) WASM_IMPORT("setControlValueMinMax");
736
745 void setControlValueMinMaxF(int panel, int control,
746 int enable, float min, float max) WASM_IMPORT("setControlValueMinMaxF");
747
753 void setLogDataText(int log,
754 const char* text) WASM_IMPORT("setLogDataText");
755
762 void setPlotData(int plot, int settings, int value) WASM_IMPORT("setPlotData");
763
770 void setControlValue(int panel, int control, int value) WASM_IMPORT("setControlValue");
777 void setControlValueFloat(int panel, int control, float value) WASM_IMPORT("setControlValueFloat");
778
785 void setControlValueText(int panel, int control, const char* text) WASM_IMPORT("setControlValueText");
786
792
797
802 void showPanel(int panel) WASM_IMPORT("showPanel");
803
813 void addControlPictureFromFile(int panel, int control, int x,
814 int y, const char* file_name, int visible)
816
817 // ===============================================================================
818 // Debug Print
819 // ===============================================================================
820 void printInt(const char* szFormatSpec, printOutColor iColor, printOutDataType iDataType, int iDataValue) WASM_IMPORT("printInt");
821 void printFloat(const char* szFormatSpec, printOutColor iColor, float fDataItem) WASM_IMPORT("printFloat");
822
823 // ===============================================================================
824 // Sensors
825 // ===============================================================================
826 void setAudioSettings(int bStreamMic,
827 int bStreamFFT,
828 int bEnableMicPlotData,
829 int iMICPlotDataIndex,
830 int bEnableFFTPlotData,
831 int iFFTPlotDataIndex) WASM_IMPORT("setAudioSettings");
832
833 // ===============================================================================
834 // FPGA
835 // ===============================================================================
836 int loadFPGAFromFile(const char* file_name) WASM_IMPORT("loadFPGAFromFile");
837
838 // ===============================================================================
839 // Zoom IO
840 // ===============================================================================
841 int runZoomIOScript(const char* szScript) WASM_IMPORT("runZoomIOScript");
842
843 // ===============================================================================
844 // RTC
845 // ===============================================================================
846 void getRTC(void) WASM_IMPORT("getRTC");
847
848 // ===============================================================================
849 // Sensor Streaming
850 // ===============================================================================
851
852 void setSensorSettings(int bStreamAccel,
853 int bStreamTemp,
854 int iRateMilliseconds,
855 int bEnableAccelXPlotData,
856 int iAccelXPlotDataIndex,
857 int bEnableAccelYPlotData,
858 int iAccelYPlotDataIndex,
859 int bEnableAccelZPlotData,
860 int iAccelZPlotDataIndex,
861 int bEnableTempPlotDataC,
862 int iTempPlotDataIndexC,
863 int bEnableTempPlotDataF,
864 int iTempPlotDataIndexF) WASM_IMPORT("setSensorSettings");
865
866 void setAppLogSettings(int bLogIRCodes, int bLogAccel, int bLogTempC, int bLogTempF, int iLogIndex) WASM_IMPORT("setAppLogSettings");
867
868 // ===============================================================================
869 // Dialogs
870 // ===============================================================================
880 void showDialogMsgBox(const char* text, int show_ok, int show_ok_cancel,
881 int show_none, int picture, int auto_close_half_sec)
883
892 void showDialogProgressBar(const char * text, int picture, int show_ok, int auto_close_at_100, int auto_close_half_sec)
894
900
911 void showDialogNumEdit(const char* text, int is_unsigned, int hex_format,
912 int use_min_max, int initial_value, int min, int max)
914
924 void showDialogNumEditFloat(const char* text, int digits, int use_min_max, float initial_value, int min, int max)
926
932 void showDialogTextEdit(const char* text, const char* initial_value) WASM_IMPORT("showDialogTextEdit");
933
939 void showDialogPickList(const char * text, int log) WASM_IMPORT("showDialogPickList");
940
947 void setControlProperty(int panel, int control, controlProperty property, int value) WASM_IMPORT("setControlProperty");
948
954 void recordSound(char * file_name, int seconds) WASM_IMPORT("recordSound");
955
956
962
970
977
985 int wilEyeTakePicture(int iDestination, const char* sFileName) WASM_IMPORT("wilEyeTakePicture");
986
994 int wilEyeStartVideo(int iDestination, const char* sFileName) WASM_IMPORT("wilEyeStartVideo");
995
1001 int wilEyeStopVideo(void) WASM_IMPORT("wilEyeStopVideo");
1002
1009 int wilEyeSetZoom(int iZoomLevel) WASM_IMPORT("wilEyeSetZoom");
1010
1017 int wilEyeSetContrast(int iContrast) WASM_IMPORT("wilEyeSetContrast");
1018
1026 int wilEyeSetBrightness(int iBrightness) WASM_IMPORT("wilEyeSetBrightness");
1027
1035 int wilEyeSetSaturation(int iSaturation) WASM_IMPORT("wilEyeSetSaturation");
1036
1044 int wilEyeSetHue(int iHue) WASM_IMPORT("wilEyeSetHue");
1045
1053 int wilEyeSetFlash(int iFlashOn) WASM_IMPORT("wilEyeSetFlash");
1054
1061 int wilEyeSetResolution(int iResolution) WASM_IMPORT("wilEyeSetResolution");
1062
1067 int wilEyeGetEventCount(void) WASM_IMPORT("wilEyeGetEventCount");
1068
1074 int* wilEyeGetEvent(int index) WASM_IMPORT("wilEyeGetEvent");
1075
1076#ifdef __cplusplus
1077} // extern "C"
1078#endif
void addControlPictureFromFile(int panel, int control, int x, int y, const char *file_name, int visible) WASM_IMPORT("addControlPictureFromFile")
add a picture control from a file to a panel
int RadioWrite(int index, unsigned char *data, int length) WASM_IMPORT("RadioWrite")
write data to a radio
int renameFileOrDirectory(const char *name, const char *new_name) WASM_IMPORT("renameFileOrDirectory")
void RadioSubFileStop(void) WASM_IMPORT("RadioSubFileStop")
Stop a sub-file transmission started with RadioTxSubFile().
int RadioTxSubFile(int index, const char *sub_file) WASM_IMPORT("RadioTxSubFile")
Transmit a sub file to a radio.
void waitms(int milliseconds) WASM_IMPORT("waitms")
wait for a number of milliseconds
int wilEyeSetSaturation(int iSaturation) WASM_IMPORT("wilEyeSetSaturation")
Set the Saturation settings of the WilEye camera.
int writeFile(int handle, unsigned char *data, int data_bytes) WASM_IMPORT("writeFile")
int wilEyeGetEventCount(void) WASM_IMPORT("wilEyeGetEventCount")
Get the number of events in the WilEye event queue.
void playSoundFromFrequencyAndDuration(float frequency, float duration, float amplitude, audioWaveType wavetype) WASM_IMPORT("playSoundFromFrequencyAndDuration")
Plays a tone of specified frequency and duration.
int wilEyeTakePicture(int iDestination, const char *sFileName) WASM_IMPORT("wilEyeTakePicture")
Take a picture with the WilEye camera.
_controlProperty
Definition fwwasm.h:127
@ fwControlPropertyFontType
Definition fwwasm.h:137
@ fwControlPropertyFontColor
Definition fwwasm.h:139
@ fwControlPropertyiLEDColorOrAssetIndex
Definition fwwasm.h:140
@ fwControlPropertyFontSize
Definition fwwasm.h:138
@ fwControlPropertyFloatDigits
Definition fwwasm.h:136
@ fwControlPropertyMinMaxEnabled
Definition fwwasm.h:129
@ fwControlPropertyVisible
Definition fwwasm.h:128
@ fwControlPropertyIsUnsigned
Definition fwwasm.h:132
@ fwControlPropertyXY
Definition fwwasm.h:134
@ fwControlPropertyIsHexFormat
Definition fwwasm.h:133
@ fwControlPropertyIsFloat
Definition fwwasm.h:131
@ fwControlPropertyWidthHeight
Definition fwwasm.h:135
@ fwControlPropertyAllowfocus
Definition fwwasm.h:130
int RadioGetRxCount(int index) WASM_IMPORT("RadioGetRxCount")
get the number of bytes in the radio receive buffer
int PWMStop(int io) WASM_IMPORT("PWMStop")
stop PWM on a GPIO pin
void setControlValueMinMax(int panel, int control, int enable, int min, int max) WASM_IMPORT("setControlValueMinMax")
Add numeric limits to a control.
void showDialogNumEdit(const char *text, int is_unsigned, int hex_format, int use_min_max, int initial_value, int min, int max) WASM_IMPORT("showDialogNumEdit")
shows a number editor to user
int openFile(const char *file_name, int mode) WASM_IMPORT("OpenFile")
_printOutDataType
Definition fwwasm.h:93
@ printUInt16
Definition fwwasm.h:97
@ printInt16
Definition fwwasm.h:96
@ printBool
Definition fwwasm.h:101
@ printUInt32
Definition fwwasm.h:95
@ printUint8
Definition fwwasm.h:98
@ printInt32
Definition fwwasm.h:94
@ printChar
Definition fwwasm.h:100
@ printInt8
Definition fwwasm.h:99
void playSoundFromFile(const char *file_name) WASM_IMPORT("playSoundFromFile")
void showDialogNumEditFloat(const char *text, int digits, int use_min_max, float initial_value, int min, int max) WASM_IMPORT("showDialogNumEditFloat")
shows a number editor to user
unsigned int getAllIO(void) WASM_IMPORT("getAllIO")
get the state of all GPIO
void clearLogOrPlotData(int iLogIndexPlusOne, int iPlotIndexPlusOne) WASM_IMPORT("clearLogOrPlotData")
int wilirand(void) WASM_IMPORT("wilirand")
return a random postive 32 bit integer
_ePanelSizeLED
Definition fwwasm.h:86
@ LEDSize48
Definition fwwasm.h:88
@ LEDSize64
Definition fwwasm.h:89
@ LEDSize32
Definition fwwasm.h:87
enum _WILEyeZoomLevel WILEyeZoomLevel
int RadioGetLQI(int index) WASM_IMPORT("RadioGetLQI")
get the LQI of the radio
void addControlBargraph(int panel, int control, int visible, int x, int y, int width, int height, int min, int max, int r, int g, int b) WASM_IMPORT("addControlBargraph")
Add a bargraph control to a panel.
void showPanel(int panel) WASM_IMPORT("showPanel")
Show a panel.
unsigned int millis(void) WASM_IMPORT("millis")
return number of milliseconds since boot
void addControlLogList(int index, int iControlIndex, int visible, int iLog, int iX, int iY, int iWidth, int iHeight, int iFontType, int iFontSize, int iR, int iG, int iB, int iRFont, int iGFont, int iBFont, int iListMode) WASM_IMPORT("addControlLogList")
void addPanelPickList(int panel, const char *szCaption, int iTileID, int iIconID, unsigned char iRBack, unsigned char iGBack, unsigned iBBack, unsigned char iRFore, unsigned char iGFore, unsigned iBFore, int iLogIndex) WASM_IMPORT("addPanelPickList")
a picklist is a type of panel that presents a list for selection
int closeFile(int handle) WASM_IMPORT("closeFile")
void addControlPlot(int panel, int control, int visible, int plotDataBitField, int x, int y, int width, int height, int min, int max, int r, int g, int b) WASM_IMPORT("addControlPlot")
Add a plot to a panel.
_audiowavetype
Definition fwwasm.h:119
@ WAVETYPE_SINE
Definition fwwasm.h:120
@ WAVETYPE_SAWTOOTH
Definition fwwasm.h:122
@ WAVETYPE_COUNT
Definition fwwasm.h:124
@ WAVETYPE_TRIANGLE
Definition fwwasm.h:123
@ WAVETYPE_SQUARE
Definition fwwasm.h:121
void setControlValue(int panel, int control, int value) WASM_IMPORT("setControlValue")
Sets a controls value property to an integer value.
void setControlValueFloat(int panel, int control, float value) WASM_IMPORT("setControlValueFloat")
Sets a controls value property to an float value.
_WILEyeResolution
Definition fwwasm.h:972
@ wilEyeRes1920x1080
Definition fwwasm.h:975
@ wilEyeRes1280x720
Definition fwwasm.h:974
@ wilEyeRes640x480
Definition fwwasm.h:973
int changeDirectory(const char *file_name) WASM_IMPORT("changeDirectory") WASM_IMPORT("changeDirectory")
int wilEyeSetHue(int iHue) WASM_IMPORT("wilEyeSetHue")
Set the Hue settings of the WilEye camera.
void showDialogTextEdit(const char *text, const char *initial_value) WASM_IMPORT("showDialogTextEdit")
shows a text editor to user
int wilEyeSetContrast(int iContrast) WASM_IMPORT("wilEyeSetContrast")
Set the Contrast settings of the WilEye camera.
void addControlText(int panel, int control, int x, int y, int fontType, int fontSize, int r, int g, int b, const char *text_value) WASM_IMPORT("addControlText")
Add a text control to a panel.
#define WASM_IMPORT(NAME)
Definition fwwasm.h:10
void addControlPlotData(int plotline, int r, int g, int b) WASM_IMPORT("addControlPlotData")
Configures an indivual plot in a plot control.
void setPlotData(int plot, int settings, int value) WASM_IMPORT("setPlotData")
Add data to a plot.
void setAppLogSettings(int bLogIRCodes, int bLogAccel, int bLogTempC, int bLogTempF, int iLogIndex) WASM_IMPORT("setAppLogSettings")
int wilEyeSetResolution(int iResolution) WASM_IMPORT("wilEyeSetResolution")
Set the Resolution settings of the WilEye camera.
void setControlValueMinMaxF(int panel, int control, int enable, float min, float max) WASM_IMPORT("setControlValueMinMaxF")
Add numeric float limits to a control.
int RadioSetRx(int index) WASM_IMPORT("RadioSetRx")
set the radio to receive
void setLEDShowMode(int mode) WASM_IMPORT("setLEDShowMode")
set the show mode of the LEDs.
enum _LEDManagerLEDMode LEDManagerLEDMode
void playSoundTextToSpeech(const char *text) WASM_IMPORT("playSoundTextToSpeech")
int removeFileOrDirectory(const char *file_name) WASM_IMPORT("removeFileOrDirectory")
enum _controlProperty controlProperty
int PWMSetFreqDuty(int io, float freq_hz, float duty) WASM_IMPORT("PWMSetFreqDuty")
set the frequency and duty cycle of a PWM pin
enum _WILEyeFileDestination WILEyeFileDestination
enum _printOutDataType printOutDataType
_WILEyeZoomLevel
Definition fwwasm.h:964
@ wilEyeZoomLevel4x
Definition fwwasm.h:968
@ wilEyeZoomLevel1x
Definition fwwasm.h:965
@ wilEyeZoomLevel2x
Definition fwwasm.h:966
@ wilEyeZoomLevel3x
Definition fwwasm.h:967
int wilEyeSetFlash(int iFlashOn) WASM_IMPORT("wilEyeSetFlash")
Set the Flash settings of the WilEye camera.
void setControlProperty(int panel, int control, controlProperty property, int value) WASM_IMPORT("setControlProperty")
changes a controls property
void setListItemText(int iLogIndex, int iListIndex, const char *szText) WASM_IMPORT("setListItemText")
int RadioLoadConfig(int index, unsigned char *data, int length) WASM_IMPORT("RadioLoadConfig")
int UARTDataWrite(unsigned char *data, int length) WASM_IMPORT("UARTDataWrite")
write data to the UART
void addControlPicture(int panel, int control, int x, int y, int pictureID, int visible) WASM_IMPORT("addControlPicture")
Add a picture display to a panel from ROM assets.
int hasEvent(void) WASM_IMPORT("hasEvent")
check if there are events in the queue.
void setListItemSelected(int iLogIndex, int iListIndex)
void addPanel(int panel, int visible, int in_rotation, int use_tile, int tile_id, int bg_red, int bg_green, int bg_blue, int show_menu) WASM_IMPORT("addPanel")
Add a new blank panel.
void getVolumeInfo(int *free, int *total) WASM_IMPORT("getVolumeInfo")
void setSensorSettings(int bStreamAccel, int bStreamTemp, int iRateMilliseconds, int bEnableAccelXPlotData, int iAccelXPlotDataIndex, int bEnableAccelYPlotData, int iAccelYPlotDataIndex, int bEnableAccelZPlotData, int iAccelZPlotDataIndex, int bEnableTempPlotDataC, int iTempPlotDataIndexC, int bEnableTempPlotDataF, int iTempPlotDataIndexF) WASM_IMPORT("setSensorSettings")
int i2cWrite(int address, int reg, unsigned char *data, int length) WASM_IMPORT("i2cWrite")
write to an I2C device
void setCanDisplayReactToButtons(int CanReactToButtons) WASM_IMPORT("setCanDisplayReactToButtons")
Instructs the display processor to not sink any of the button events first.
_ePanelColorLED
Definition fwwasm.h:74
@ LEDColorMagenta
Definition fwwasm.h:81
@ LEDColorAqua
Definition fwwasm.h:80
@ LEDColorGreen
Definition fwwasm.h:76
@ LEDColorWhite
Definition fwwasm.h:82
@ LEDColorBlue
Definition fwwasm.h:78
@ LEDColorOrange
Definition fwwasm.h:79
@ LEDColorYellow
Definition fwwasm.h:77
@ LEDColorRed
Definition fwwasm.h:75
_LEDManagerLEDMode
Definition fwwasm.h:65
@ ledpulsefade
Definition fwwasm.h:70
@ ledsimplevalue
Definition fwwasm.h:66
@ ledpulse
Definition fwwasm.h:68
@ ledflashfade
Definition fwwasm.h:69
@ ledflash
Definition fwwasm.h:67
int UARTDataRxCount(void) WASM_IMPORT("UARTDataRxCount")
Get the number of bytes in the UART receive buffer.
void setProgressDialogValue(int value_0_to_100) WASM_IMPORT("setProgressDialogValue")
sets the value of a progress bar dialog
enum _FWGuiEventType FWGuiEventType
int wilEyeStartVideo(int iDestination, const char *sFileName) WASM_IMPORT("wilEyeStartVideo")
Start video recording with the WilEye camera.
int fileExists(const char *file_name) WASM_IMPORT("fileExists")
int readFileLine(int handle, char *data, int *data_bytes) WASM_IMPORT("readFileLine")
enum _audiowavetype audioWaveType
void playSoundFromNameOrID(const char *name, int id) WASM_IMPORT("playSoundFromNameOrID")
void recordSound(char *file_name, int seconds) WASM_IMPORT("recordSound")
records sound from microphone
void addControlLED(int index, int iControlIndex, int iX, int iY, ePanelColorLED iColor, ePanelSizeLED iSize, int iIntialState) WASM_IMPORT("addControlLED")
void sendIRData(unsigned int data) WASM_IMPORT("sendIRData")
send IR data
_WILEyeFileDestination
Definition fwwasm.h:958
@ wilEyeFileDestSDCard
Definition fwwasm.h:959
@ wilEyeFileDestWili
Definition fwwasm.h:960
int SPIReadWrite(unsigned char *data_in, int length, unsigned char *data_out) WASM_IMPORT("SPIReadWrite")
read and write data over SPI
void setControlValueText(int panel, int control, const char *text) WASM_IMPORT("setControlValueText")
Sets a controls value property to an float value.
int RadioGetRSSI(int index) WASM_IMPORT("RadioGetRSSI")
get the RSSI of the radio
_FWGuiEventType
Definition fwwasm.h:20
@ FWGUI_EVENT_RED_BUTTON
Definition fwwasm.h:25
@ FWGUI_EVENT_MAIN_MENU_SHOWN
Definition fwwasm.h:40
@ FWGUI_EVENT_BLUE_BUTTON
Definition fwwasm.h:24
@ FWGUI_EVENT_WASM_OVRFLOW
Definition fwwasm.h:44
@ FWGUI_EVENT_GUI_FFT_DATA
Definition fwwasm.h:31
@ FWGUI_EVENT_GREEN_BUTTON
Definition fwwasm.h:23
@ FWGUI_EVENT_GUI_TEXTEDIT
Definition fwwasm.h:29
@ FWGUI_EVENT_GRAY_BUTTON
Definition fwwasm.h:21
@ FWGUI_EVENT_PICKLIST_SEL
Definition fwwasm.h:38
@ FWGUI_EVENT_M_TERM_INPUT
Definition fwwasm.h:45
@ FWGUI_EVENT_GUI_BUTTON
Definition fwwasm.h:27
@ FWGUI_EVENT_MAIN_APP_SEL
Definition fwwasm.h:36
@ FWGUI_EVENT_REQUEST_MAIN_TEST_CODE
Definition fwwasm.h:52
@ FWGUI_EVENT_PANEL_HIDE
Definition fwwasm.h:39
@ FWGUI_EVENT_API_PING_RESPONSE
Definition fwwasm.h:48
@ FWGUI_EVENT_DIALOG_ACTION
Definition fwwasm.h:43
@ FWGUI_EVENT_SETTINGS_UPDATED
Definition fwwasm.h:51
@ FWGUI_EVENT_GUI_SENSOR_DATA
Definition fwwasm.h:35
@ FWGUI_EVENT_GUI_RTC_RESPONSE
Definition fwwasm.h:34
@ FWGUI_EVENT_DISPLAY_HEARTBEAT
Definition fwwasm.h:50
@ FWGUI_EVENT_REQUEST_ENABLE_DEBUGMODE
Definition fwwasm.h:53
@ FWGUI_EVENT_PANEL_SHOW
Definition fwwasm.h:37
@ FWGUI_EVENT_GUI_AUDIO_DATA
Definition fwwasm.h:30
@ FWGUI_EVENT_DATA_MAX
Definition fwwasm.h:54
@ FWGUI_EVENT_LIGHT_SHOW
Definition fwwasm.h:46
@ FWGUI_EVENT_GUI_I2C_RESPONSE
Definition fwwasm.h:32
@ FWGUI_EVENT_REQUEST_MAIN_RESET
Definition fwwasm.h:49
@ FWGUI_EVENT_STARTED
Definition fwwasm.h:41
@ FWGUI_EVENT_GUI_NUMEDIT
Definition fwwasm.h:28
@ FWGUI_EVENT_EVENTFIFO_OVERFLOW
Definition fwwasm.h:33
@ FWGUI_EVENT_IR_CODE
Definition fwwasm.h:26
@ FWGUI_EVENT_YELLOW_BUTTON
Definition fwwasm.h:22
@ FWGUI_EVENT_API_RETURN_CODE
Definition fwwasm.h:47
@ FWGUI_EVENT_CLR_STATS
Definition fwwasm.h:42
void setBoardLED(int led_index, int red, int green, int blue, int duration_ms, LEDManagerLEDMode mode) WASM_IMPORT("setBoardLED")
set the state of the tri-color LEDs
void showDialogProgressBar(const char *text, int picture, int show_ok, int auto_close_at_100, int auto_close_half_sec) WASM_IMPORT("showDialogProgressBar")
shows a modal progress bar to user
void setAudioSettings(int bStreamMic, int bStreamFFT, int bEnableMicPlotData, int iMICPlotDataIndex, int bEnableFFTPlotData, int iFFTPlotDataIndex) WASM_IMPORT("setAudioSettings")
int runZoomIOScript(const char *szScript) WASM_IMPORT("runZoomIOScript")
int loadFPGAFromFile(const char *file_name) WASM_IMPORT("loadFPGAFromFile")
int RadioRead(int index, unsigned char *data, int length) WASM_IMPORT("RadioRead")
read data from a radio
int RadioSetIdle(int index) WASM_IMPORT("RadioSetIdle")
set the radio to idle
void setListItemTopIndex(int iLogIndex, int iListIndex)
int wilEyeSetBrightness(int iBrightness) WASM_IMPORT("wilEyeSetBrightness")
Set the Brightness settings of the WilEye camera.
int getDirectoryItemByIndex(const char *directory, const char *file_name, int include_extension, int index) WASM_IMPORT("getDirectoryItemByIndex")
_printOutColor
Definition fwwasm.h:105
@ printColorGreen
Definition fwwasm.h:109
@ printColorBrown
Definition fwwasm.h:113
@ printColorPurple
Definition fwwasm.h:112
@ printColorCyan
Definition fwwasm.h:110
@ printColorRed
Definition fwwasm.h:111
@ printColorBlack
Definition fwwasm.h:107
@ printColorNormal
Definition fwwasm.h:106
@ printColorBlue
Definition fwwasm.h:108
@ printColorYellow
Definition fwwasm.h:114
@ printColorWhite
Definition fwwasm.h:115
int canfdTransmit(int channel, int id, int isXtd, int isCanfd, unsigned char *data, int length) WASM_IMPORT("canfdTransmit")
transmit a can or canfd frame
unsigned int getIO(int io) WASM_IMPORT("getIO")
get the state of a GPIO
void setIO(int io, int on) WASM_IMPORT("setIO")
set the state of a GPIO
int makeDirectory(const char *file_name) WASM_IMPORT("makeDirectory")
void setPanelMenuText(int panel, int iButtonGreyFromZero, const char *message) WASM_IMPORT("setPanelMenuText")
configures text for the bottom screen button menu
int preAllocateSpaceForFile(int handle, int size_in_bytes) WASM_IMPORT("preAllocateSpaceForFile")
void getRTC(void) WASM_IMPORT("getRTC")
int wilEyeSetZoom(int iZoomLevel) WASM_IMPORT("wilEyeSetZoom")
Set the zoom level of the WilEye camera.
void printInt(const char *szFormatSpec, printOutColor iColor, printOutDataType iDataType, int iDataValue) WASM_IMPORT("printInt")
int readFile(int handle, unsigned char *data, int *data_bytes) WASM_IMPORT("readFile")
int UARTDataRead(unsigned char *data, int length) WASM_IMPORT("UARTDataRead")
read data from the UART
void showDialogPickList(const char *text, int log) WASM_IMPORT("showDialogPickList")
shows a picklist to user
void showDialogMsgBox(const char *text, int show_ok, int show_ok_cancel, int show_none, int picture, int auto_close_half_sec) WASM_IMPORT("showDialogMsgBox")
shows a modal message box to user
enum _printOutColor printOutColor
void addControlNumber(int panel, int control, int visible, int x, int y, int width, int fontSize, int fontType, int r, int g, int b, int isFloat, int floatDigits, int isHexFormat, int isUnsigned) WASM_IMPORT("addControlNumber")
Add a number display to a panel.
void setLogDataText(int log, const char *text) WASM_IMPORT("setLogDataText")
Add text to a Log.
int RadioSubFileIsTransmitting(void) WASM_IMPORT("RadioSubFileIsTransmitting")
check if the radio is currently transmitting
int i2cRead(int address, int reg, unsigned char *data, int length) WASM_IMPORT("i2cRead")
read from an I2C device
enum _ePanelSizeLED ePanelSizeLED
void addControlPlotXAxis(int index, int iControlIndex, int iScrollMode, unsigned long long iTimeMin, unsigned long long iTimeMax) WASM_IMPORT("addControlPlotXAxis")
int RadioSetTx(int index) WASM_IMPORT("RadioSetTx")
Transmits a sub file to a radio. This function is non-blocking, see RadioSubFileIsTransmitting().
int * wilEyeGetEvent(int index) WASM_IMPORT("wilEyeGetEvent")
Get a WilEye event from the event queue.
void addControlButton(int panel, int control, int visible, int x, int y, int width, int height, int r, int g, int b, int rFont, int gFont, int bFont, const char *text) WASM_IMPORT("addControlButton")
Add a button control to a panel.
void printFloat(const char *szFormatSpec, printOutColor iColor, float fDataItem) WASM_IMPORT("printFloat")
int getFilePosition(int handle) WASM_IMPORT("getFilePosition")
enum _WILEyeResolution WILEyeResolution
int RadioScan(int index, int RssiThreshold, unsigned int *FoundPeak, unsigned int *FrequencyResult, int *RssiResult) WASM_IMPORT("RadioScan")
Performs a Frequency Scan on supported frequency and reports the frequency that surpassed the Rssi th...
enum _ePanelColorLED ePanelColorLED
void exitToMainAppMenu(void) WASM_IMPORT("exitToMainAppMenu")
exit to the main app menu
int getEventData(unsigned char *data) WASM_IMPORT("getEventData")
get the data from the event queue
int setFilePosition(int handle, int position) WASM_IMPORT("setFilePosition")
int wilEyeStopVideo(void) WASM_IMPORT("wilEyeStopVideo")
Stop video recording with the WilEye camera.
void terminalWrite(char *szText) WASM_IMPORT("terminalWrite")
performs a terminal command as if in the root menu (main only)
void playSoundFromNumber(int bFloat, int iNumber, float fNumber, int iFloatDigits) WASM_IMPORT("playSoundFromNumber")
int getFileSize(int handle) WASM_IMPORT("getFileSize")