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

The difference between "nrfx_timer" and "nrf_drv_timer"?

In the "sdk_config.h",there has two options, one is TIMER_ENABLED,the other is NRFX_TIMER_ENABLED, and  in the sample ,there also have"nrf_drv_time" ,what's the difference? I so confused!

Parents
  • nrfx_* is the new way of interacting with the peripherals. It used to be through nrf_drv_*. I would advise to use nrfx_* calls for new sotftware.

    If you take a look at the file nrf_drv_timer.h, you'll see that nrf_drv_* function are translated to nrfx_* functions.

    NRFX_TIMER_ENABLED is mandatory if you want to have the nrfx_timer functions in the compilations units. See that line in nrfx_timer.c: 

    #if NRFX_CHECK(NRFX_TIMER_ENABLED)

    Best of luck

Reply
  • nrfx_* is the new way of interacting with the peripherals. It used to be through nrf_drv_*. I would advise to use nrfx_* calls for new sotftware.

    If you take a look at the file nrf_drv_timer.h, you'll see that nrf_drv_* function are translated to nrfx_* functions.

    NRFX_TIMER_ENABLED is mandatory if you want to have the nrfx_timer functions in the compilations units. See that line in nrfx_timer.c: 

    #if NRFX_CHECK(NRFX_TIMER_ENABLED)

    Best of luck

Children
Related