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

PPI channel assign

In infocenter we will have to define 

***********

#define  nrf_drv_ppi_channel_assign   nrfx_ppi_channel_assign
  Macro for forwarding the new implementation. 

************

where nrfx_ppi_channel_assign is a function

************

nrfx_err_t nrfx_ppi_channel_assign ( nrf_ppi_channel_t  channel,
uint32_t  eep,
uint32_t  tep 
)

Function for assigning task and event endpoints to the PPI channel.

Parameters
[in] channel PPI channel to be assigned endpoints.
[in] eep Event endpoint address.
[in] tep Task endpoint address.
Return values
NRFX_SUCCESS If the channel was successfully assigned.
NRFX_ERROR_INVALID_STATE If the channel is not allocated for the user.
NRFX_ERROR_INVALID_PARAM If the channel is not user-configurable.


*****************

but in SAADC peripheral example it is directly use as 

*******
err_code = nrf_drv_ppi_channel_assign(m_ppi_channel,
timer_compare_event_addr,
saadc_sample_task_addr);
APP_ERROR_CHECK(err_code);

*******

How these two codes similar?

Parents
  • Hi,

    The names of a lot of driver APIs were changed in SDK 15. For instance, the old PPI driver API used functions with names on the form nrf_drv_ppi_* and now the new ones use names on the form nrfx_ppi_*.

    The macro is not something that you must do yourself, it is found in the file <sdk folder>\integration\nrfx\legacy\nrf_drv_ppi.h, and is to be included if for instance you use a library that uses the old names for the API. You will see that a lot in SDK examples.

    For more information and example, please have a look at the PPI Example.

    Regards,
    Terje

Reply
  • Hi,

    The names of a lot of driver APIs were changed in SDK 15. For instance, the old PPI driver API used functions with names on the form nrf_drv_ppi_* and now the new ones use names on the form nrfx_ppi_*.

    The macro is not something that you must do yourself, it is found in the file <sdk folder>\integration\nrfx\legacy\nrf_drv_ppi.h, and is to be included if for instance you use a library that uses the old names for the API. You will see that a lot in SDK examples.

    For more information and example, please have a look at the PPI Example.

    Regards,
    Terje

Children
Related