Toggle GPO ports
Posted: Tue Feb 24, 2015 2:54 pm
Hey folks,
Is there a way to simply toggle a GPO via scripted region?
Example: Press a button, set GPO port to high. Press same button again, set GPO port to low.
Obviously, we can set a state to on or off as in the manual:
254 73 Number Setting
But you can't use that same statement to change the port back using the same button, unless you can change "Setting" somehow in the script file.
Maybe, a firmware upgrade could add "2" to setting, so that 0 = off, 1 = on, 2 = toggle state.
This would save having a MCU keep track of the port setting and telling the LCD to invert the current state of the port - if the LCD was able to somehow keep track of what the GPO state is.
Is there a way to simply toggle a GPO via scripted region?
Example: Press a button, set GPO port to high. Press same button again, set GPO port to low.
Obviously, we can set a state to on or off as in the manual:
254 73 Number Setting
But you can't use that same statement to change the port back using the same button, unless you can change "Setting" somehow in the script file.
Maybe, a firmware upgrade could add "2" to setting, so that 0 = off, 1 = on, 2 = toggle state.
This would save having a MCU keep track of the port setting and telling the LCD to invert the current state of the port - if the LCD was able to somehow keep track of what the GPO state is.