Announcement

Collapse
No announcement yet.

Xpico250 CPM Role as Input event trigger

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Xpico250 CPM Role as Input event trigger

    Hi,

    I want to use 2 GPIO's of xpico250 as as push button input on which i can capture press event do specific task .i had try using bool ltrx_cp_read (uint16_t roleIndex, bool *isAsserted) but not succeed. Is it possible to use GPIO's for this function and how is it?

  • #2
    Yes, you can use one of the CPs as push button input. Take a look at the config_pin example that comes with the SDK, and change .usage in the ltrx_cpm_role structure to LTRX_CPM_ROLE_USAGE__INPUT instead of __OUTPUT. Then ltrx_cp_read() will read the status of the input into the isAsserted pointer.

    Make sure that after loading the firmware, in configuration, you set the role of the CP that you want to use as the pushbutton input.

    Mariano

    Comment

    Working...
    X