RX62N Program On Board Buttons


I am pretty new to this board, as in a day, and I'm wondering what the code would look like to halt a program running by pushing say SW1, SW2, or SW3 on the board.


  • Hey William,

    I assume you are referring to the RDK RX62N so I have included a snippit of code that will allow you to recognize a switch press.

    #include "r_pdl_definitions.h"

    #include "YRDKRX62N.h"

    #include "switch.h"

    if(!(SWITCHPRESS_ALL & gSwitchFlag))          // this will determine when any of the three switches is pressed

    gSwitchFlag = 0;                                             // this resets the flag back to zero

    If(!(SWITCHPRESS_SWx & gSwitchFlag))         // this will tell you when SW"x" where x and can 1 thru 3 is pressed

    Hope this helps out,

    Anthony Harris