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

Delve in header files (understanding sdk)

I'm sorry for general question, but I need it for my calming down. I'm delving step by step go throught header files into origin definition of function for understanding the core of simple example (blinky in my case). I'm stuck in function There're no more header files in SDK folder (keil not found anything reffering to this function). And I assumed that maybe definition of this function locate in hex SDK file that we firmware into our controller? Sorry if my question is stupid but I need achieve a core.

__STATIC_INLINE void nrf_gpio_cfg( uint32_t pin_number, nrf_gpio_pin_dir_t dir, nrf_gpio_pin_input_t input, nrf_gpio_pin_pull_t pull, nrf_gpio_pin_drive_t drive, nrf_gpio_pin_sense_t sense);

I understood that this function for configure individual pin getting different values of registers that reffering to this pin, but what to do with that parameters this function... I'm stuck

How can I configure this pin without this function (If you can, give a piece of code)

Why can I not just write smth like:

NRF_GPIO->DIR = 0x30000; // set 17 pin (led1) as output /n

NRF_GPIO->OUTSET = 0x30000; // set 17 pin (led1) is high

Parents Reply Children
No Data
Related