Push Button
The following Signal Function may be used to toggle an I/O pin similar to a connected switch.
//
// Toggle I/O Pin
//
signal void Toggle_IO_Pin (unsigned char digit) {
PORT2 = (PORT2 ^ 0x01);
}
You may define a Toolbox button that allows to access this function quickly with the following DEFINE command.
DEFINE BUTTON "Toggle P2.0", "Toggle_IO_Pin"