I’m using the CC MP13 dev board and running Digi’s example app GPIO EXAMPLE on it. It looks like the app is looking for two command line arguments, a button controller and an led controller. How do I determine what those values should be?
I figured out that, If only one command line argument is supplied, and it doesn’t matter what the argument value is, then default values are used to get the button controller and the led controller.
ldx_gpio_get_controller(DEFAULT_USER_BUTTON_ALIAS, button_ctrl);
button_line = ldx_gpio_get_line(DEFAULT_USER_BUTTON_ALIAS);
ldx_gpio_get_controller(DEFAULT_USER_LED_ALIAS, led_ctrl);
led_line = ldx_gpio_get_line(DEFAULT_USER_LED_ALIAS);
But when the button control parameters are used, they fail:
gpio_input = ldx_gpio_request_by_controller(button_ctrl, button_line, GPIO_IRQ_EDGE_RISING);
if (!gpio_input)
printf(“Failed to initialize input gpio”);