3.3.2.1 GPIO Pin Reading
int IndoorTouch.GPIOGet(int pin);
Reads the current GPIO register value. Pin is one of the options:
- IndoorTouch.GPIO_PIN_IN1 = 0x01;
- IndoorTouch.GPIO_PIN_IN2 = 0x02;
- IndoorTouch.GPIO_PIN_OUT1 = 0x04;
- IndoorTouch.GPIO_PIN_OUT2 = 0x08;
- IndoorTouch.GPIO_PIN_IO1 = 0x10;
- IndoorTouch.GPIO_PIN_IO2 = 0x20;
- IndoorTouch.GPIO_PIN_RELAY1 = 0x40;
- IndoorTouch.GPIO_PIN_RELAY2 = 0x80;
The return value is {0,1} or
- IndoorTouch.RC_ERR_CONN = -1; API daemon connection error
- IndoorTouch.RC_ERR_SYS = -6; system error (the value cannot be read, etc.)
- IndoorTouch.RC_ERR_DENIED = -7; system error (GPIO does not exist)