fwwasm
Loading...
Searching...
No Matches
fwwasm.h File Reference

Free-Wili wasm export header Functions that are exposed from the WASM engine for use in Free-Wili WASM scripts. More...

Go to the source code of this file.

Macros

#define WASM_IMPORT(NAME)
 
#define WASM_EXPORT   extern "C" __attribute__((used)) __attribute__((visibility("default")))
 
#define WASM_EXPORT_AS(NAME)
 
#define FWGUI_EVENT_NUMTYPE_INT   1
 
#define FWGUI_EVENT_NUMTYPE_UINT   2
 
#define FWGUI_EVENT_NUMTYPE_FLOAT   3
 
#define FW_GET_EVENT_DATA_MAX   34
 

Typedefs

typedef enum _FWGuiEventType FWGuiEventType
 
typedef enum _LEDManagerLEDMode LEDManagerLEDMode
 
typedef enum _ePanelColorLED ePanelColorLED
 
typedef enum _ePanelSizeLED ePanelSizeLED
 
typedef enum _printOutDataType printOutDataType
 
typedef enum _printOutColor printOutColor
 
typedef enum _audiowavetype audioWaveType
 
typedef enum _controlProperty controlProperty
 
typedef enum _WILEyeFileDestination WILEyeFileDestination
 
typedef enum _WILEyeZoomLevel WILEyeZoomLevel
 
typedef enum _WILEyeResolution WILEyeResolution
 

Enumerations

enum  _FWGuiEventType {
  FWGUI_EVENT_GRAY_BUTTON , FWGUI_EVENT_YELLOW_BUTTON , FWGUI_EVENT_GREEN_BUTTON , FWGUI_EVENT_BLUE_BUTTON ,
  FWGUI_EVENT_RED_BUTTON , FWGUI_EVENT_IR_CODE , FWGUI_EVENT_GUI_BUTTON , FWGUI_EVENT_GUI_NUMEDIT ,
  FWGUI_EVENT_GUI_TEXTEDIT , FWGUI_EVENT_GUI_AUDIO_DATA , FWGUI_EVENT_GUI_FFT_DATA , FWGUI_EVENT_GUI_I2C_RESPONSE ,
  FWGUI_EVENT_EVENTFIFO_OVERFLOW , FWGUI_EVENT_GUI_RTC_RESPONSE , FWGUI_EVENT_GUI_SENSOR_DATA , FWGUI_EVENT_MAIN_APP_SEL ,
  FWGUI_EVENT_PANEL_SHOW , FWGUI_EVENT_PICKLIST_SEL , FWGUI_EVENT_PANEL_HIDE , FWGUI_EVENT_MAIN_MENU_SHOWN ,
  FWGUI_EVENT_STARTED , FWGUI_EVENT_CLR_STATS , FWGUI_EVENT_DIALOG_ACTION , FWGUI_EVENT_WASM_OVRFLOW ,
  FWGUI_EVENT_M_TERM_INPUT , FWGUI_EVENT_LIGHT_SHOW , FWGUI_EVENT_API_RETURN_CODE , FWGUI_EVENT_API_PING_RESPONSE ,
  FWGUI_EVENT_REQUEST_MAIN_RESET , FWGUI_EVENT_DISPLAY_HEARTBEAT , FWGUI_EVENT_SETTINGS_UPDATED , FWGUI_EVENT_REQUEST_MAIN_TEST_CODE ,
  FWGUI_EVENT_REQUEST_ENABLE_DEBUGMODE , FWGUI_EVENT_DATA_MAX
}
 
enum  _LEDManagerLEDMode {
  ledsimplevalue , ledflash , ledpulse , ledflashfade ,
  ledpulsefade
}
 
enum  _ePanelColorLED {
  LEDColorRed , LEDColorGreen , LEDColorYellow , LEDColorBlue ,
  LEDColorOrange , LEDColorAqua , LEDColorMagenta , LEDColorWhite
}
 
enum  _ePanelSizeLED { LEDSize32 , LEDSize48 , LEDSize64 }
 
enum  _printOutDataType {
  printInt32 = 0 , printUInt32 , printInt16 , printUInt16 ,
  printUint8 , printInt8 , printChar , printBool
}
 
enum  _printOutColor {
  printColorNormal = 0 , printColorBlack , printColorBlue , printColorGreen ,
  printColorCyan , printColorRed , printColorPurple , printColorBrown ,
  printColorYellow , printColorWhite
}
 
enum  _audiowavetype {
  WAVETYPE_SINE = 0 , WAVETYPE_SQUARE , WAVETYPE_SAWTOOTH , WAVETYPE_TRIANGLE ,
  WAVETYPE_COUNT
}
 
enum  _controlProperty {
  fwControlPropertyVisible , fwControlPropertyMinMaxEnabled , fwControlPropertyAllowfocus , fwControlPropertyIsFloat ,
  fwControlPropertyIsUnsigned , fwControlPropertyIsHexFormat , fwControlPropertyXY , fwControlPropertyWidthHeight ,
  fwControlPropertyFloatDigits , fwControlPropertyFontType , fwControlPropertyFontSize , fwControlPropertyFontColor ,
  fwControlPropertyiLEDColorOrAssetIndex
}
 
enum  _WILEyeFileDestination { wilEyeFileDestSDCard = 0 , wilEyeFileDestWili }
 
enum  _WILEyeZoomLevel { wilEyeZoomLevel1x = 1 , wilEyeZoomLevel2x = 2 , wilEyeZoomLevel3x = 2 , wilEyeZoomLevel4x = 4 }
 
enum  _WILEyeResolution { wilEyeRes640x480 = 0 , wilEyeRes1280x720 = 1 , wilEyeRes1920x1080 = 2 }
 

Functions

void waitms (int milliseconds) WASM_IMPORT("waitms")
 wait for a number of milliseconds
 
int wilirand (void) WASM_IMPORT("wilirand")
 return a random postive 32 bit integer
 
unsigned int millis (void) WASM_IMPORT("millis")
 return number of milliseconds since boot
 
void setIO (int io, int on) WASM_IMPORT("setIO")
 set the state of a GPIO
 
unsigned int getIO (int io) WASM_IMPORT("getIO")
 get the state of a GPIO
 
unsigned int getAllIO (void) WASM_IMPORT("getAllIO")
 get the state of all GPIO
 
int i2cRead (int address, int reg, unsigned char *data, int length) WASM_IMPORT("i2cRead")
 read from an I2C device
 
int i2cWrite (int address, int reg, unsigned char *data, int length) WASM_IMPORT("i2cWrite")
 write to an I2C device
 
int SPIReadWrite (unsigned char *data_in, int length, unsigned char *data_out) WASM_IMPORT("SPIReadWrite")
 read and write data over SPI
 
int canfdTransmit (int channel, int id, int isXtd, int isCanfd, unsigned char *data, int length) WASM_IMPORT("canfdTransmit")
 transmit a can or canfd frame
 
void terminalWrite (char *szText) WASM_IMPORT("terminalWrite")
 performs a terminal command as if in the root menu (main only)
 
int UARTDataRxCount (void) WASM_IMPORT("UARTDataRxCount")
 Get the number of bytes in the UART receive buffer.
 
int UARTDataRead (unsigned char *data, int length) WASM_IMPORT("UARTDataRead")
 read data from the UART
 
int UARTDataWrite (unsigned char *data, int length) WASM_IMPORT("UARTDataWrite")
 write data to the UART
 
int PWMSetFreqDuty (int io, float freq_hz, float duty) WASM_IMPORT("PWMSetFreqDuty")
 set the frequency and duty cycle of a PWM pin
 
int PWMStop (int io) WASM_IMPORT("PWMStop")
 stop PWM on a GPIO pin
 
int RadioWrite (int index, unsigned char *data, int length) WASM_IMPORT("RadioWrite")
 write data to a radio
 
int RadioRead (int index, unsigned char *data, int length) WASM_IMPORT("RadioRead")
 read data from a radio
 
int RadioGetRxCount (int index) WASM_IMPORT("RadioGetRxCount")
 get the number of bytes in the radio receive buffer
 
int RadioLoadConfig (int index, unsigned char *data, int length) WASM_IMPORT("RadioLoadConfig")
 
int RadioTxSubFile (int index, const char *sub_file) WASM_IMPORT("RadioTxSubFile")
 Transmit a sub file to a radio.
 
int RadioSetTx (int index) WASM_IMPORT("RadioSetTx")
 Transmits a sub file to a radio. This function is non-blocking, see RadioSubFileIsTransmitting().
 
int RadioSetRx (int index) WASM_IMPORT("RadioSetRx")
 set the radio to receive
 
int RadioSetIdle (int index) WASM_IMPORT("RadioSetIdle")
 set the radio to idle
 
int RadioGetRSSI (int index) WASM_IMPORT("RadioGetRSSI")
 get the RSSI of the radio
 
int RadioGetLQI (int index) WASM_IMPORT("RadioGetLQI")
 get the LQI of the radio
 
int RadioSubFileIsTransmitting (void) WASM_IMPORT("RadioSubFileIsTransmitting")
 check if the radio is currently transmitting
 
void RadioSubFileStop (void) WASM_IMPORT("RadioSubFileStop")
 Stop a sub-file transmission started with RadioTxSubFile().
 
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 threshold.
 
void sendIRData (unsigned int data) WASM_IMPORT("sendIRData")
 send IR data
 
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 setLEDShowMode (int mode) WASM_IMPORT("setLEDShowMode")
 set the show mode of the LEDs.
 
void playSoundFromFile (const char *file_name) WASM_IMPORT("playSoundFromFile")
 
void playSoundTextToSpeech (const char *text) WASM_IMPORT("playSoundTextToSpeech")
 
void playSoundFromNameOrID (const char *name, int id) WASM_IMPORT("playSoundFromNameOrID")
 
void playSoundFromNumber (int bFloat, int iNumber, float fNumber, int iFloatDigits) WASM_IMPORT("playSoundFromNumber")
 
void playSoundFromFrequencyAndDuration (float frequency, float duration, float amplitude, audioWaveType wavetype) WASM_IMPORT("playSoundFromFrequencyAndDuration")
 Plays a tone of specified frequency and duration.
 
int openFile (const char *file_name, int mode) WASM_IMPORT("OpenFile")
 
int closeFile (int handle) WASM_IMPORT("closeFile")
 
int writeFile (int handle, unsigned char *data, int data_bytes) WASM_IMPORT("writeFile")
 
int preAllocateSpaceForFile (int handle, int size_in_bytes) WASM_IMPORT("preAllocateSpaceForFile")
 
int readFile (int handle, unsigned char *data, int *data_bytes) WASM_IMPORT("readFile")
 
int readFileLine (int handle, char *data, int *data_bytes) WASM_IMPORT("readFileLine")
 
int setFilePosition (int handle, int position) WASM_IMPORT("setFilePosition")
 
int getFilePosition (int handle) WASM_IMPORT("getFilePosition")
 
int getFileSize (int handle) WASM_IMPORT("getFileSize")
 
int renameFileOrDirectory (const char *name, const char *new_name) WASM_IMPORT("renameFileOrDirectory")
 
int fileExists (const char *file_name) WASM_IMPORT("fileExists")
 
int makeDirectory (const char *file_name) WASM_IMPORT("makeDirectory")
 
int changeDirectory (const char *file_name) WASM_IMPORT("changeDirectory") WASM_IMPORT("changeDirectory")
 
int getDirectoryItemByIndex (const char *directory, const char *file_name, int include_extension, int index) WASM_IMPORT("getDirectoryItemByIndex")
 
void getVolumeInfo (int *free, int *total) WASM_IMPORT("getVolumeInfo")
 
int removeFileOrDirectory (const char *file_name) WASM_IMPORT("removeFileOrDirectory")
 
int getEventData (unsigned char *data) WASM_IMPORT("getEventData")
 get the data from the event queue
 
int hasEvent (void) WASM_IMPORT("hasEvent")
 check if there are events in the queue.
 
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 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
 
void setPanelMenuText (int panel, int iButtonGreyFromZero, const char *message) WASM_IMPORT("setPanelMenuText")
 configures text for the bottom screen button menu
 
void addControlLED (int index, int iControlIndex, int iX, int iY, ePanelColorLED iColor, ePanelSizeLED iSize, int iIntialState) WASM_IMPORT("addControlLED")
 
void setListItemText (int iLogIndex, int iListIndex, const char *szText) WASM_IMPORT("setListItemText")
 
void setListItemSelected (int iLogIndex, int iListIndex)
 
void setListItemTopIndex (int iLogIndex, int iListIndex)
 
void clearLogOrPlotData (int iLogIndexPlusOne, int iPlotIndexPlusOne) WASM_IMPORT("clearLogOrPlotData")
 
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 addControlPlotXAxis (int index, int iControlIndex, int iScrollMode, unsigned long long iTimeMin, unsigned long long iTimeMax) WASM_IMPORT("addControlPlotXAxis")
 
void addControlPlotData (int plotline, int r, int g, int b) WASM_IMPORT("addControlPlotData")
 Configures an indivual plot in a plot control.
 
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.
 
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 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.
 
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.
 
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 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 setControlValueMinMax (int panel, int control, int enable, int min, int max) WASM_IMPORT("setControlValueMinMax")
 Add numeric limits to a control.
 
void setControlValueMinMaxF (int panel, int control, int enable, float min, float max) WASM_IMPORT("setControlValueMinMaxF")
 Add numeric float limits to a control.
 
void setLogDataText (int log, const char *text) WASM_IMPORT("setLogDataText")
 Add text to a Log.
 
void setPlotData (int plot, int settings, int value) WASM_IMPORT("setPlotData")
 Add data to a plot.
 
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.
 
void setControlValueText (int panel, int control, const char *text) WASM_IMPORT("setControlValueText")
 Sets a controls value property to an float value.
 
void setCanDisplayReactToButtons (int CanReactToButtons) WASM_IMPORT("setCanDisplayReactToButtons")
 Instructs the display processor to not sink any of the button events first.
 
void exitToMainAppMenu (void) WASM_IMPORT("exitToMainAppMenu")
 exit to the main app menu
 
void showPanel (int panel) WASM_IMPORT("showPanel")
 Show a panel.
 
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
 
void printInt (const char *szFormatSpec, printOutColor iColor, printOutDataType iDataType, int iDataValue) WASM_IMPORT("printInt")
 
void printFloat (const char *szFormatSpec, printOutColor iColor, float fDataItem) WASM_IMPORT("printFloat")
 
void setAudioSettings (int bStreamMic, int bStreamFFT, int bEnableMicPlotData, int iMICPlotDataIndex, int bEnableFFTPlotData, int iFFTPlotDataIndex) WASM_IMPORT("setAudioSettings")
 
int loadFPGAFromFile (const char *file_name) WASM_IMPORT("loadFPGAFromFile")
 
int runZoomIOScript (const char *szScript) WASM_IMPORT("runZoomIOScript")
 
void getRTC (void) WASM_IMPORT("getRTC")
 
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")
 
void setAppLogSettings (int bLogIRCodes, int bLogAccel, int bLogTempC, int bLogTempF, int iLogIndex) WASM_IMPORT("setAppLogSettings")
 
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
 
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 setProgressDialogValue (int value_0_to_100) WASM_IMPORT("setProgressDialogValue")
 sets the value of a progress bar dialog
 
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
 
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
 
void showDialogTextEdit (const char *text, const char *initial_value) WASM_IMPORT("showDialogTextEdit")
 shows a text editor to user
 
void showDialogPickList (const char *text, int log) WASM_IMPORT("showDialogPickList")
 shows a picklist to user
 
void setControlProperty (int panel, int control, controlProperty property, int value) WASM_IMPORT("setControlProperty")
 changes a controls property
 
void recordSound (char *file_name, int seconds) WASM_IMPORT("recordSound")
 records sound from microphone
 
int wilEyeTakePicture (int iDestination, const char *sFileName) WASM_IMPORT("wilEyeTakePicture")
 Take a picture with the WilEye camera.
 
int wilEyeStartVideo (int iDestination, const char *sFileName) WASM_IMPORT("wilEyeStartVideo")
 Start video recording with the WilEye camera.
 
int wilEyeStopVideo (void) WASM_IMPORT("wilEyeStopVideo")
 Stop video recording with the WilEye camera.
 
int wilEyeSetZoom (int iZoomLevel) WASM_IMPORT("wilEyeSetZoom")
 Set the zoom level of the WilEye camera.
 
int wilEyeSetContrast (int iContrast) WASM_IMPORT("wilEyeSetContrast")
 Set the Contrast settings of the WilEye camera.
 
int wilEyeSetBrightness (int iBrightness) WASM_IMPORT("wilEyeSetBrightness")
 Set the Brightness settings of the WilEye camera.
 
int wilEyeSetSaturation (int iSaturation) WASM_IMPORT("wilEyeSetSaturation")
 Set the Saturation settings of the WilEye camera.
 
int wilEyeSetHue (int iHue) WASM_IMPORT("wilEyeSetHue")
 Set the Hue settings of the WilEye camera.
 
int wilEyeSetFlash (int iFlashOn) WASM_IMPORT("wilEyeSetFlash")
 Set the Flash settings of the WilEye camera.
 
int wilEyeSetResolution (int iResolution) WASM_IMPORT("wilEyeSetResolution")
 Set the Resolution settings of the WilEye camera.
 
int wilEyeGetEventCount (void) WASM_IMPORT("wilEyeGetEventCount")
 Get the number of events in the WilEye event queue.
 
int * wilEyeGetEvent (int index) WASM_IMPORT("wilEyeGetEvent")
 Get a WilEye event from the event queue.
 

Detailed Description

Free-Wili wasm export header Functions that are exposed from the WASM engine for use in Free-Wili WASM scripts.

Macro Definition Documentation

◆ FW_GET_EVENT_DATA_MAX

#define FW_GET_EVENT_DATA_MAX   34

◆ FWGUI_EVENT_NUMTYPE_FLOAT

#define FWGUI_EVENT_NUMTYPE_FLOAT   3

◆ FWGUI_EVENT_NUMTYPE_INT

#define FWGUI_EVENT_NUMTYPE_INT   1

◆ FWGUI_EVENT_NUMTYPE_UINT

#define FWGUI_EVENT_NUMTYPE_UINT   2

◆ WASM_EXPORT

#define WASM_EXPORT   extern "C" __attribute__((used)) __attribute__((visibility("default")))

◆ WASM_EXPORT_AS

#define WASM_EXPORT_AS ( NAME)
Value:
WASM_EXPORT __attribute__((export_name(NAME)))
#define WASM_EXPORT
Definition fwwasm.h:11

◆ WASM_IMPORT

#define WASM_IMPORT ( NAME)
Value:
__attribute__((import_module("wiliwasm"))) __attribute__((import_name(NAME)))

Typedef Documentation

◆ audioWaveType

◆ controlProperty

◆ ePanelColorLED

◆ ePanelSizeLED

◆ FWGuiEventType

◆ LEDManagerLEDMode

◆ printOutColor

◆ printOutDataType

◆ WILEyeFileDestination

◆ WILEyeResolution

◆ WILEyeZoomLevel

Enumeration Type Documentation

◆ _audiowavetype

Enumerator
WAVETYPE_SINE 
WAVETYPE_SQUARE 
WAVETYPE_SAWTOOTH 
WAVETYPE_TRIANGLE 
WAVETYPE_COUNT 

◆ _controlProperty

Enumerator
fwControlPropertyVisible 
fwControlPropertyMinMaxEnabled 
fwControlPropertyAllowfocus 
fwControlPropertyIsFloat 
fwControlPropertyIsUnsigned 
fwControlPropertyIsHexFormat 
fwControlPropertyXY 
fwControlPropertyWidthHeight 
fwControlPropertyFloatDigits 
fwControlPropertyFontType 
fwControlPropertyFontSize 
fwControlPropertyFontColor 
fwControlPropertyiLEDColorOrAssetIndex 

◆ _ePanelColorLED

Enumerator
LEDColorRed 
LEDColorGreen 
LEDColorYellow 
LEDColorBlue 
LEDColorOrange 
LEDColorAqua 
LEDColorMagenta 
LEDColorWhite 

◆ _ePanelSizeLED

Enumerator
LEDSize32 
LEDSize48 
LEDSize64 

◆ _FWGuiEventType

Enumerator
FWGUI_EVENT_GRAY_BUTTON 
FWGUI_EVENT_YELLOW_BUTTON 
FWGUI_EVENT_GREEN_BUTTON 
FWGUI_EVENT_BLUE_BUTTON 
FWGUI_EVENT_RED_BUTTON 
FWGUI_EVENT_IR_CODE 
FWGUI_EVENT_GUI_BUTTON 
FWGUI_EVENT_GUI_NUMEDIT 
FWGUI_EVENT_GUI_TEXTEDIT 
FWGUI_EVENT_GUI_AUDIO_DATA 
FWGUI_EVENT_GUI_FFT_DATA 
FWGUI_EVENT_GUI_I2C_RESPONSE 
FWGUI_EVENT_EVENTFIFO_OVERFLOW 
FWGUI_EVENT_GUI_RTC_RESPONSE 
FWGUI_EVENT_GUI_SENSOR_DATA 
FWGUI_EVENT_MAIN_APP_SEL 
FWGUI_EVENT_PANEL_SHOW 
FWGUI_EVENT_PICKLIST_SEL 
FWGUI_EVENT_PANEL_HIDE 
FWGUI_EVENT_MAIN_MENU_SHOWN 
FWGUI_EVENT_STARTED 
FWGUI_EVENT_CLR_STATS 
FWGUI_EVENT_DIALOG_ACTION 
FWGUI_EVENT_WASM_OVRFLOW 
FWGUI_EVENT_M_TERM_INPUT 
FWGUI_EVENT_LIGHT_SHOW 
FWGUI_EVENT_API_RETURN_CODE 
FWGUI_EVENT_API_PING_RESPONSE 
FWGUI_EVENT_REQUEST_MAIN_RESET 
FWGUI_EVENT_DISPLAY_HEARTBEAT 
FWGUI_EVENT_SETTINGS_UPDATED 
FWGUI_EVENT_REQUEST_MAIN_TEST_CODE 
FWGUI_EVENT_REQUEST_ENABLE_DEBUGMODE 
FWGUI_EVENT_DATA_MAX 

◆ _LEDManagerLEDMode

Enumerator
ledsimplevalue 
ledflash 
ledpulse 
ledflashfade 
ledpulsefade 

◆ _printOutColor

Enumerator
printColorNormal 
printColorBlack 
printColorBlue 
printColorGreen 
printColorCyan 
printColorRed 
printColorPurple 
printColorBrown 
printColorYellow 
printColorWhite 

◆ _printOutDataType

Enumerator
printInt32 
printUInt32 
printInt16 
printUInt16 
printUint8 
printInt8 
printChar 
printBool 

◆ _WILEyeFileDestination

Enumerator
wilEyeFileDestSDCard 
wilEyeFileDestWili 

◆ _WILEyeResolution

Enumerator
wilEyeRes640x480 
wilEyeRes1280x720 
wilEyeRes1920x1080 

◆ _WILEyeZoomLevel

Enumerator
wilEyeZoomLevel1x 
wilEyeZoomLevel2x 
wilEyeZoomLevel3x 
wilEyeZoomLevel4x 

Function Documentation

◆ addControlBargraph()

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 )

Add a bargraph control to a panel.

Parameters
panelthe index of the panel
controlthe index of the control
visibleif the control is shown
xthe x position
ythe y position
widthhow wide
heighthow tall
rthe red value. 0-255
gthe green value. 0-255
bthe blue value. 0-255

◆ addControlButton()

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 )

Add a button control to a panel.

Parameters
panelthe index of the panel
controlthe index of the control
visibleif the control is shown
xthe x position
ythe y position
widthhow wide
heighthow tall
rthe red value. 0-255
gthe green value. 0-255
bthe blue value. 0-255
rFontthe red value of text. 0-255
gFontthe green value of text. 0-255
bFontthe blue value of text. 0-255
textthe text to display.

◆ addControlLED()

void addControlLED ( int index,
int iControlIndex,
int iX,
int iY,
ePanelColorLED iColor,
ePanelSizeLED iSize,
int iIntialState )

◆ addControlLogList()

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 )

◆ addControlNumber()

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 )

Add a number display to a panel.

Parameters
panelthe index of the panel. Starts at zero.
controlthe index of this control. starts at zero
visibleif the control should be visible.
xhorizontal location of upper left corner of control
yvertical location of the upper left corner of control
widththe width of control
fontsizethe size of built in font (0-2)
fonttypethe type (0=mono, 1=normal)
rbackground red color of plot (0-255)
gbackground green color of plot (0-255)
bbackground blue color of plot (0-255)
isfloatindicates the number should be displayed as float
floatDigitsindicates how many digits of past decimal point for float display
isHexFormatapplies hex formating to the displayed number
isUnsignedapplies unsigned formatting (no minus sign)

◆ addControlPicture()

void addControlPicture ( int panel,
int control,
int x,
int y,
int pictureID,
int visible )

Add a picture display to a panel from ROM assets.

Parameters
panelthe index of the panel. Starts at zero.
controlthe index of this control. starts at zero
xhorizontal location of upper left corner of control
yvertical location of the upper left corner of control
pictureIDthe assetid for the picture (https://docs.freewili.com/gui-screen-buttons-and-lights/displaying-images/)
visibleif the control should be visible.

◆ addControlPictureFromFile()

void addControlPictureFromFile ( int panel,
int control,
int x,
int y,
const char * file_name,
int visible )

add a picture control from a file to a panel

Parameters
panelthe index of the panel to add the picture to
controlthe index of the control
xthe x position of the picture
ythe y position of the picture
file_namethe name of the file to load. expects the file to be in the /images folder
visibleif the control should be visible

◆ addControlPlot()

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 )

Add a plot to a panel.

Parameters
panelthe index of the panel. Starts at zero.
controlthe index of this control. starts at zero
visibleif the control should be visible.
plotDataBitFielda bitfield of which logs to plot. bit 0 = log 1, bit 1 = log 2 etc.
xhorizontal location of upper left corner of control
yvertical location of the upper left corner of control
widththe width of control
heightthe height of the control
minthe vertical axis min value
maxthe vertical axis max value
rbackground red color of plot (0-255)
gbackground green color of plot (0-255)
bbackground blue color of plot (0-255)

◆ addControlPlotData()

void addControlPlotData ( int plotline,
int r,
int g,
int b )

Configures an indivual plot in a plot control.

Parameters
plotlineindicates which plot line (0-x)
rred color of the plot line (0-255)
ggreen color of the plot line (0-255)
bblue color of the plot line (0-255)

◆ addControlPlotXAxis()

void addControlPlotXAxis ( int index,
int iControlIndex,
int iScrollMode,
unsigned long long iTimeMin,
unsigned long long iTimeMax )

◆ addControlText()

void addControlText ( int panel,
int control,
int x,
int y,
int fontType,
int fontSize,
int r,
int g,
int b,
const char * text_value )

Add a text control to a panel.

Parameters
panelthe index of the panel
controlthe index of the control
xthe x position
ythe y position
fontTypethe font type
fontSizethe font size
rthe red value. 0-255
gthe green value. 0-255
bthe blue value. 0-255
textthe text to display.

◆ addPanel()

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 )

Add a new blank panel.

Parameters
panelthe index of the panel. Starts at zero.
visibleif the panel should be visible.
in_rotationindicates if this panel will be in the next panel rotation
use_tileif the panel should use tiles.
tile_idthe graphic asset id of the tile to use.
bg_redthe red value of the background color. 0-255
bg_greenthe green value of the background color. 0-255
bg_bluethe blue value of the background color. 0-255
show_menuif the panel should show the button menu.

◆ addPanelPickList()

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 )

a picklist is a type of panel that presents a list for selection

Parameters
panel
szCaption
iTileID
iIconID
iRBack
iGBack
iBBack
iRFore
iGFore
iBFore
iLogIndex

◆ canfdTransmit()

int canfdTransmit ( int channel,
int id,
int isXtd,
int isCanfd,
unsigned char * data,
int length )

transmit a can or canfd frame

Parameters
channelthe canfd interface index
idthe can ID
isXtdindicates the can ID is extened (29 bits)
isCanfdindicates the can frame is a canfd frame instead of can
datapointer to the data to send
lengththe length of the data to send
Returns
1 on success, 0 on failure

◆ changeDirectory()

int changeDirectory ( const char * file_name)

◆ clearLogOrPlotData()

void clearLogOrPlotData ( int iLogIndexPlusOne,
int iPlotIndexPlusOne )

◆ closeFile()

int closeFile ( int handle)

◆ exitToMainAppMenu()

void exitToMainAppMenu ( void )

exit to the main app menu

◆ fileExists()

int fileExists ( const char * file_name)

◆ getAllIO()

unsigned int getAllIO ( void )

get the state of all GPIO

Returns
1 for on, 0 for off for each bit position

◆ getDirectoryItemByIndex()

int getDirectoryItemByIndex ( const char * directory,
const char * file_name,
int include_extension,
int index )

◆ getEventData()

int getEventData ( unsigned char * data)

get the data from the event queue

Parameters
dataArray to store the event data. Must be at least FW_GET_EVENT_DATA_MAX bytes
Returns
The oldest event in the queue. See FWGuiEventType for more details.

◆ getFilePosition()

int getFilePosition ( int handle)

◆ getFileSize()

int getFileSize ( int handle)

◆ getIO()

unsigned int getIO ( int io)

get the state of a GPIO

Parameters
iothe number of the GPIO
Returns
1 for on, 0 for off

◆ getRTC()

void getRTC ( void )

◆ getVolumeInfo()

void getVolumeInfo ( int * free,
int * total )

◆ hasEvent()

int hasEvent ( void )

check if there are events in the queue.

Returns
1 if there are events, 0 if there are no events.

◆ i2cRead()

int i2cRead ( int address,
int reg,
unsigned char * data,
int length )

read from an I2C device

Parameters
addressthe I2C address
regthe I2C register
datapointer to the data to send
lengththe length of the data to send
Returns
1 on success, 0 on failure

◆ i2cWrite()

int i2cWrite ( int address,
int reg,
unsigned char * data,
int length )

write to an I2C device

Parameters
addressthe I2C address
regthe I2C register
datapointer to the data to send
lengththe length of the data to send
Returns
1 on success, 0 on failure

◆ loadFPGAFromFile()

int loadFPGAFromFile ( const char * file_name)

◆ makeDirectory()

int makeDirectory ( const char * file_name)

◆ millis()

unsigned int millis ( void )

return number of milliseconds since boot

◆ openFile()

int openFile ( const char * file_name,
int mode )

◆ playSoundFromFile()

void playSoundFromFile ( const char * file_name)
Parameters
file_name

◆ playSoundFromFrequencyAndDuration()

void playSoundFromFrequencyAndDuration ( float frequency,
float duration,
float amplitude,
audioWaveType wavetype )

Plays a tone of specified frequency and duration.

Parameters
frequencyfrequency of the tone to play, in Hz
durationduration of the tone to play, in seconds
amplitudeamplitude (1.0 is max, 0.2 recommended)
wavetypeWAVETYPE_SINE = 0,

◆ playSoundFromNameOrID()

void playSoundFromNameOrID ( const char * name,
int id )
Parameters
name
id

◆ playSoundFromNumber()

void playSoundFromNumber ( int bFloat,
int iNumber,
float fNumber,
int iFloatDigits )
Parameters
bFloat
iNumber
fNumber
iFloatDigits

◆ playSoundTextToSpeech()

void playSoundTextToSpeech ( const char * text)
Parameters
textto be spoken

◆ preAllocateSpaceForFile()

int preAllocateSpaceForFile ( int handle,
int size_in_bytes )

◆ printFloat()

void printFloat ( const char * szFormatSpec,
printOutColor iColor,
float fDataItem )

◆ printInt()

void printInt ( const char * szFormatSpec,
printOutColor iColor,
printOutDataType iDataType,
int iDataValue )

◆ PWMSetFreqDuty()

int PWMSetFreqDuty ( int io,
float freq_hz,
float duty )

set the frequency and duty cycle of a PWM pin

Parameters
iothe number of the PWM pin
freq_hzthe frequency of the PWM
dutythe duty cycle of the PWM
Returns
1 on success, 0 on failure

◆ PWMStop()

int PWMStop ( int io)

stop PWM on a GPIO pin

Parameters
iothe number of the GPIO pin
Returns
1 on success, 0 on failure

◆ RadioGetLQI()

int RadioGetLQI ( int index)

get the LQI of the radio

Parameters
indexthe index of the radio. 1 for Radio 1, 2 for Radio 2.
Returns
the LQI

◆ RadioGetRSSI()

int RadioGetRSSI ( int index)

get the RSSI of the radio

Parameters
indexthe index of the radio. 1 for Radio 1, 2 for Radio 2.
Returns
the RSSI

◆ RadioGetRxCount()

int RadioGetRxCount ( int index)

get the number of bytes in the radio receive buffer

Parameters
indexthe index of the radio. 1 for Radio 1, 2 for Radio 2.
Returns
the number of bytes

◆ RadioLoadConfig()

int RadioLoadConfig ( int index,
unsigned char * data,
int length )

◆ RadioRead()

int RadioRead ( int index,
unsigned char * data,
int length )

read data from a radio

Parameters
indexthe index of the radio. 1 for Radio 1, 2 for Radio 2.
datapointer to the data to send
lengththe length of the data to send
Returns
number of bytes read on success, 0 on failure

◆ RadioScan()

int RadioScan ( int index,
int RssiThreshold,
unsigned int * FoundPeak,
unsigned int * FrequencyResult,
int * RssiResult )

Performs a Frequency Scan on supported frequency and reports the frequency that surpassed the Rssi threshold.

Parameters
indexthe index of the radio. 1 for Radio 1, 2 for Radio 2.
RssiThresholdThreshold on when the frequency should be reported
FoundPeakFlag to indicate a Frequency was found that surpassed RssiThreshold
FrequencyResultFrequency that surpassed RssiThreshold
RssiResultRssi value match to frequency

◆ RadioSetIdle()

int RadioSetIdle ( int index)

set the radio to idle

Parameters
indexthe index of the radio. 1 for Radio 1, 2 for Radio 2.
Returns
1 on success, 0 on failure

◆ RadioSetRx()

int RadioSetRx ( int index)

set the radio to receive

Parameters
indexthe index of the radio. 1 for Radio 1, 2 for Radio 2.
Returns
1 on success, 0 on failure

◆ RadioSetTx()

int RadioSetTx ( int index)

Transmits a sub file to a radio. This function is non-blocking, see RadioSubFileIsTransmitting().

Parameters
indexthe index of the radio. 1 for Radio 1, 2 for Radio 2.
Returns
1 on success, 0 on failure

◆ RadioSubFileIsTransmitting()

int RadioSubFileIsTransmitting ( void )

check if the radio is currently transmitting

Returns
1 if transmitting, 0 if not

◆ RadioSubFileStop()

void RadioSubFileStop ( void )

Stop a sub-file transmission started with RadioTxSubFile().

◆ RadioTxSubFile()

int RadioTxSubFile ( int index,
const char * sub_file )

Transmit a sub file to a radio.

Parameters
indexthe index of the radio. 1 for Radio 1, 2 for Radio 2.
sub_filethe name of the sub file to transmit
Returns
1 on success, 0 on failure

◆ RadioWrite()

int RadioWrite ( int index,
unsigned char * data,
int length )

write data to a radio

Parameters
indexthe index of the radio. 1 for Radio 1, 2 for Radio 2.
datapointer to the data to send
lengththe length of the data to send
Returns
1 on success, 0 on failure

◆ readFile()

int readFile ( int handle,
unsigned char * data,
int * data_bytes )

◆ readFileLine()

int readFileLine ( int handle,
char * data,
int * data_bytes )

◆ recordSound()

void recordSound ( char * file_name,
int seconds )

records sound from microphone

Parameters
file_namename of output sound file
secondshow many seconds to record

◆ removeFileOrDirectory()

int removeFileOrDirectory ( const char * file_name)

◆ renameFileOrDirectory()

int renameFileOrDirectory ( const char * name,
const char * new_name )

◆ runZoomIOScript()

int runZoomIOScript ( const char * szScript)

◆ sendIRData()

void sendIRData ( unsigned int data)

send IR data

Parameters
datathe IR data

◆ setAppLogSettings()

void setAppLogSettings ( int bLogIRCodes,
int bLogAccel,
int bLogTempC,
int bLogTempF,
int iLogIndex )

◆ setAudioSettings()

void setAudioSettings ( int bStreamMic,
int bStreamFFT,
int bEnableMicPlotData,
int iMICPlotDataIndex,
int bEnableFFTPlotData,
int iFFTPlotDataIndex )

◆ setBoardLED()

void setBoardLED ( int led_index,
int red,
int green,
int blue,
int duration_ms,
LEDManagerLEDMode mode )

set the state of the tri-color LEDs

Parameters
led_indexthe index of the LED
redthe red value
greenthe green value
bluethe blue value
duration_msthe duration of the LED in milliseconds
modethe mode of the LED. see LEDManagerLEDMode enum for more details.

◆ setCanDisplayReactToButtons()

void setCanDisplayReactToButtons ( int CanReactToButtons)

Instructs the display processor to not sink any of the button events first.

Parameters
CanReactToButtonsFlag to enable or diable sinking button events on display

◆ setControlProperty()

void setControlProperty ( int panel,
int control,
controlProperty property,
int value )

changes a controls property

Parameters
panelthe index of the panel to add the picture to
propertythe property to change of type controProperty
valuethe index of the control

◆ setControlValue()

void setControlValue ( int panel,
int control,
int value )

Sets a controls value property to an integer value.

Parameters
panelthe index of the panel
controlthe index of the control
valuethe new value

◆ setControlValueFloat()

void setControlValueFloat ( int panel,
int control,
float value )

Sets a controls value property to an float value.

Parameters
panelthe index of the panel
controlthe index of the control
valuethe new value

◆ setControlValueMinMax()

void setControlValueMinMax ( int panel,
int control,
int enable,
int min,
int max )

Add numeric limits to a control.

Parameters
panelthe index of the panel
controlthe index of the control
enableenable the min and max limits
minthe minimum value as int
maxthe maximum value as int

◆ setControlValueMinMaxF()

void setControlValueMinMaxF ( int panel,
int control,
int enable,
float min,
float max )

Add numeric float limits to a control.

Parameters
panelthe index of the panel
controlthe index of the control
enableenable the min and max limits
minthe minimum value as float
maxthe maximum value as int

◆ setControlValueText()

void setControlValueText ( int panel,
int control,
const char * text )

Sets a controls value property to an float value.

Parameters
panelthe index of the panel
controlthe index of the control
thenew text value for the control

◆ setFilePosition()

int setFilePosition ( int handle,
int position )

◆ setIO()

void setIO ( int io,
int on )

set the state of a GPIO

Parameters
iothe number of the GPIO
on1 for on, 0 for off

◆ setLEDShowMode()

void setLEDShowMode ( int mode)

set the show mode of the LEDs.

Parameters
modethe show mode
Todo

◆ setListItemSelected()

void setListItemSelected ( int iLogIndex,
int iListIndex )

◆ setListItemText()

void setListItemText ( int iLogIndex,
int iListIndex,
const char * szText )

◆ setListItemTopIndex()

void setListItemTopIndex ( int iLogIndex,
int iListIndex )

◆ setLogDataText()

void setLogDataText ( int log,
const char * text )

Add text to a Log.

Parameters
logthe index of the log
textthe index of the control

◆ setPanelMenuText()

void setPanelMenuText ( int panel,
int iButtonGreyFromZero,
const char * message )

configures text for the bottom screen button menu

Parameters
panelindicates which panel. the addPanel function must enable the menu
iButtonGreyFromZerothis indicates the button where menu will appear (starts from left gray = 0)
messagea short message to be shown for the button

◆ setPlotData()

void setPlotData ( int plot,
int settings,
int value )

Add data to a plot.

Parameters
plotthe index of the plot
settingsproperties of data (ignored for now)
valuevalue to plot

◆ setProgressDialogValue()

void setProgressDialogValue ( int value_0_to_100)

sets the value of a progress bar dialog

Parameters
value_0_to_100value to display (100 can trigger auto close)

◆ setSensorSettings()

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 )

◆ showDialogMsgBox()

void showDialogMsgBox ( const char * text,
int show_ok,
int show_ok_cancel,
int show_none,
int picture,
int auto_close_half_sec )

shows a modal message box to user

Parameters
texttext to display
show_okshow an ok button
show_ok_cancelshow an ok and cancel button
show_noneshow no buttons
picturepicture rom index of control
auto_close_half_secif more than zero auto closes after a time period (like toast)

◆ showDialogNumEdit()

void showDialogNumEdit ( const char * text,
int is_unsigned,
int hex_format,
int use_min_max,
int initial_value,
int min,
int max )

shows a number editor to user

Parameters
texttext to display
is_unsignedis the number allowed negative
hex_formatshould this be a hexadecimal number
use_min_maxenforce min and max limits
initial_valuestarting value to edit
minminimum allowed if enabled
maxmaximum allowed if enabled

◆ showDialogNumEditFloat()

void showDialogNumEditFloat ( const char * text,
int digits,
int use_min_max,
float initial_value,
int min,
int max )

shows a number editor to user

Parameters
texttext to display
digitsis the number allowed negative
use_min_maxenforce min and max limits
initial_valuestarting value to edit
minminimum allowed if enabled
maxmaximum allowed if enabled

◆ showDialogPickList()

void showDialogPickList ( const char * text,
int log )

shows a picklist to user

Parameters
textmessage to display
loglog to display

◆ showDialogProgressBar()

void showDialogProgressBar ( const char * text,
int picture,
int show_ok,
int auto_close_at_100,
int auto_close_half_sec )

shows a modal progress bar to user

Parameters
texttext to display
picturepicture rom index of control
show_okshow an ok button
auto_close_at_100closes dialog when 100 is reached
auto_close_half_secwhen at 100 percent - auto closes after a time period (like toast)

◆ showDialogTextEdit()

void showDialogTextEdit ( const char * text,
const char * initial_value )

shows a text editor to user

Parameters
texttext to display
initial_valuestarting value to edit

◆ showPanel()

void showPanel ( int panel)

Show a panel.

Parameters
panelthe index of the panel to show

◆ SPIReadWrite()

int SPIReadWrite ( unsigned char * data_in,
int length,
unsigned char * data_out )

read and write data over SPI

Parameters
data_inpointer to the data to send
lengththe length of the data to send
data_outpointer to the data to receive
Returns
1 on success, 0 on failure

◆ terminalWrite()

void terminalWrite ( char * szText)

performs a terminal command as if in the root menu (main only)

Parameters
szTextthe terminal text

◆ UARTDataRead()

int UARTDataRead ( unsigned char * data,
int length )

read data from the UART

Parameters
datapointer to the data to read
lengththe length of the data to read
Returns
1 on success, 0 on failure

◆ UARTDataRxCount()

int UARTDataRxCount ( void )

Get the number of bytes in the UART receive buffer.

Returns
the number of bytes

◆ UARTDataWrite()

int UARTDataWrite ( unsigned char * data,
int length )

write data to the UART

Parameters
datapointer to the data to write
lengththe length of the data to write
Returns
length on success.

◆ waitms()

void waitms ( int milliseconds)

wait for a number of milliseconds

Parameters
millisecondsthe number of milliseconds to wait

◆ wilEyeGetEvent()

int * wilEyeGetEvent ( int index)

Get a WilEye event from the event queue.

Parameters
indexthe index of the event to get. 0 is the oldest event.
Returns
pointer to an array of integers containing the event data.

◆ wilEyeGetEventCount()

int wilEyeGetEventCount ( void )

Get the number of events in the WilEye event queue.

Returns
the number of events in the queue

◆ wilEyeSetBrightness()

int wilEyeSetBrightness ( int iBrightness)

Set the Brightness settings of the WilEye camera.

Parameters
iBrightnessthe brightness to set. 0 to 100
Returns
1 on success, 0 on failure
Note
WILEye must be connected for this function to work.

◆ wilEyeSetContrast()

int wilEyeSetContrast ( int iContrast)

Set the Contrast settings of the WilEye camera.

Parameters
iContrastthe contrast to set. 0 to 100
Returns
1 on success, 0 on failure
Note
WILEye must be connected for this function to work.

◆ wilEyeSetFlash()

int wilEyeSetFlash ( int iFlashOn)

Set the Flash settings of the WilEye camera.

Parameters
iFlashOn1 to turn on the flash, 0 to turn off the flash
Returns
1 on success, 0 on failure
Note
WILEye must be connected for this function to work.

◆ wilEyeSetHue()

int wilEyeSetHue ( int iHue)

Set the Hue settings of the WilEye camera.

Parameters
iHuethe hue to set. to 100
Returns
1 on success, 0 on failure
Note
WILEye must be connected for this function to work.

◆ wilEyeSetResolution()

int wilEyeSetResolution ( int iResolution)

Set the Resolution settings of the WilEye camera.

Parameters
iResolutionthe resolution to set. See WILEyeResolution enum for more details.
Returns
1 on success, 0 on failure
Note
WILEye must be connected for this function to work.

◆ wilEyeSetSaturation()

int wilEyeSetSaturation ( int iSaturation)

Set the Saturation settings of the WilEye camera.

Parameters
iSaturationthe saturation to set. 0 to 100
Returns
1 on success, 0 on failure
Note
WILEye must be connected for this function to work.

◆ wilEyeSetZoom()

int wilEyeSetZoom ( int iZoomLevel)

Set the zoom level of the WilEye camera.

Parameters
iZoomLevelthe zoom level to set. See WILEyeZoomLevel enum for more details.
Returns
1 on success, 0 on failure
Note
WILEye must be connected for this function to work.

◆ wilEyeStartVideo()

int wilEyeStartVideo ( int iDestination,
const char * sFileName )

Start video recording with the WilEye camera.

Parameters
iDestinationthe destination to save the video. See WILEyeFileDestination enum for more details.
sFileNamethe name of the file to save the video to. If saving to the Wili, this is ignored.
Returns
1 on success, 0 on failure
Note
WILEye must be connected for this function to work.*

◆ wilEyeStopVideo()

int wilEyeStopVideo ( void )

Stop video recording with the WilEye camera.

Returns
1 on success, 0 on failure
Note
WILEye must be connected for this function to work.

◆ wilEyeTakePicture()

int wilEyeTakePicture ( int iDestination,
const char * sFileName )

Take a picture with the WilEye camera.

Parameters
iDestinationthe destination to save the picture. See WILEyeFileDestination enum for more details.
sFileNamethe name of the file to save the picture to. If saving to the Wili, this is ignored.
Returns
1 on success, 0 on failure
Note
WILEye must be connected for this function to work.*

◆ wilirand()

int wilirand ( void )

return a random postive 32 bit integer

◆ writeFile()

int writeFile ( int handle,
unsigned char * data,
int data_bytes )