Skip to content

Conversation

@Anitha241991
Copy link

/* This function initializes the gpio pin of the button

  • first gpio direction is set to "in
  • Then, value is set to "0"
  • edge detection is configured for "rising"
    */
    int initialize_button_gpio(void)
    {
    gpio_configure_dir(GPIO_49,GPIO_DIR_IN);
    gpio_write_value(GPIO_49, GPIO_LOW_VALUE ); // 68 is replaced by 49
    gpio_configure_edge(GPIO_49,"rising");
    return 0;
    }

/* This function initializes the gpio pin of the button
 * first gpio direction is set to "in
 * Then, value is set to "0"
 * edge detection is configured for "rising"
 */
int initialize_button_gpio(void)
{
    gpio_configure_dir(GPIO_49,GPIO_DIR_IN);
    gpio_write_value(GPIO_49, GPIO_LOW_VALUE ); // 68 is replaced by 49
    gpio_configure_edge(GPIO_49,"rising");
    return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant