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

'in_pin_handler' undeclared (first use in this function); did you mean 'db_disc_handler'?

I am incorporating the "pin_change_int" code to generate GPIOTE interrupts from an external device.  I made a couple changes including renaming the function from gpio_init() to gpiote_init() and call this function from main().   I can't clear this error.  I'm using SES 4.30 and SDK 15.3.

This code is also generating a #define error in the pin definition:  #define D_TEMP_IRQ 25 // pin 37 - P0.25 - P4  -  expected ';', ',' or ')' before numeric constant.

Editing the in_pin_handler code back to: 

void in_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
get_water_temp();
}

and changing the function name back to gpio_init(), I get these two errors:

undefined reference to `__clear_cache' and:

undefined reference to `gpio_init' - I call gpio_init(); in the main() function.

Please advise.

Parents
  • Hello,

    There is something wrong in your project, causing the compiler to get confused with where the functions starts and stops. It may be a few different things, but either there is a bracket missing somewhere, or there is something wrong in one of your #defines.

    What is the first warning you see when you compile? There is at least one more thing before this line:

    Best regards,

    Edvin

Reply
  • Hello,

    There is something wrong in your project, causing the compiler to get confused with where the functions starts and stops. It may be a few different things, but either there is a bracket missing somewhere, or there is something wrong in one of your #defines.

    What is the first warning you see when you compile? There is at least one more thing before this line:

    Best regards,

    Edvin

Children
Related