The following signal
function toggles an I/O pin simulating a connected switch.
/*----------------------------------------------------------------------
Toggle I/O Pin
----------------------------------------------------------------------*/
SIGNAL void toggle_IO_pin() {
int i;
PORT0 = 0x0;
for (i = 0 ; i < 20; i++) {
PORT0 = (PORT0 ^ 0x01);
swatch(0.5);
}
}
DEFINE BUTTON "Toggle P0.0", "toggle_IO_pin()"
Start debugging in simulation mode and drag the port into the
Logic Analyzer. Open the
Toolbox and click the button
Toggle P0.0 to view the signal output:
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.