This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Read value on EXT pin thingy 52

Hello.

I having problems with reading a value from one of the ext pins on thingy 52. (i can set the pin as output and toggle the pin from code.)

i have configured the pin as input. 

drv_ext_gpio_cfg_input(SX_IOEXT_1,DRV_EXT_GPIO_PIN_NOPULL);

I want to do something when the pin goes low, iam trying to read the pin value with the function  drv_ext_gpio_pin_read() but i doesent seem to get any reaction when changing from high to low on the pin. I dont really understand the second argument of the function drv_ext_gpio_pin_read() which might be the case why i dont get it to work.

I have tried the following code to check if i get stuck inside the loop when the input pin is high but it just get skipt indicating that the value from drv_ext_gpio_pin_read() is zero.

    while(drv_ext_gpio_pin_read(SX_IOEXT_1,0) != 0   ){

        //do nothing if high

    }
 

Thankful for help. 

//Rilleaa

Related