This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

smartRF05 Evaldutation board + cc2530F256 simp SimpliciTI sampleCode BSP_BUTTON1 invalid

Dear All

I used smartRF05 Evaldutation board + cc2530F256 to Run the sampleCode "Ap_as_Data_Hub"

The BSP_BUTTON1  and BSP_BUTTON2 Function are invalid 

the BSP_BUTTON1 always On

and BSP_BUTTON2 always Off

Code Like This

if (BSP_BUTTON1())
{
   toggleLED(1); =>always On
}
if (BSP_BUTTON2())
{
   toggleLED(2);=>always Off
}

sorry My English is poor 

Could i ask you any help? 

give me some tip

Thanks a lot

  • Hi

    BUTTON1 is S1 on the 05EB. This button works, but it is inverted, meaning that the BSP_BUTTON1() return true when the button is released and false when it is pushed.

    BUTTON2 is the joystick button.

    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    *                 BUTTON #2

    * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    *   Schematic   : JOY_MOVE (U1)

    *   Description : Joystick Move

    *   Polarity   : Active High

    *   GPIO       : P2.0

    * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    */

    #define __bsp_BUTTON2_BIT__            0

    #define __bsp_BUTTON2_PORT__           P2

    #define __bsp_BUTTON2_IS_ACTIVE_LOW__   0

    BR

    Siri

  • thank you very much