void setPortIOStates(Int64)
Sets the pin direction for all pins at once.
Parameters
Name | Description |
ioMask |
Int64 The value for setting the new direction of each pin. Each bit of the value will be translated as 0 = output, 1 = input. |
Examples
var GPIOdeviceInfo;
//set pins to input
function setInputPins() {
KioGPIOBoard.setPortIOStates(0xFFFFFFFF);
}
function onNumatoGPIOOpened(success) {
if(success) {
GPIOdeviceInfo = JSON.parse(KioGPIOBoard.getDeviceInfo());
KioWareUtils.LogInfo('Firmware Version: ' + GPIOdeviceInfo.version + 'Device Id: ' + GPIOdeviceInfo.id);
setInputPins();
}
else KioWareUtils.LogErr('GPIO device failed to open');
}
Requirements
KioWare for Android version 3.22 or greater.