carduinoembeddednrf52

Where could macros be defined if there is only a definition in a header but the macro isnt doing anything?


So im trying to setup some interrupts on the Arduino BLE 33 board, and im looking at Nordics header files for their nrfx drivers.

There is a file called nrfx_glue.h which i've attached that creates a bunch of macros but the macros dont do anything.

So im wondering what exactly theyre doing,

here is an example of some of the macros:

/**
 * @brief Macro for setting the priority of a specific IRQ.
 *
 * @param irq_number IRQ number.
 * @param priority   Priority to be set.
 */
#define NRFX_IRQ_PRIORITY_SET(irq_number, priority)
/**
 * @brief Macro for enabling a specific IRQ.
 *
 * @param irq_number IRQ number.
#define NRFX_IRQ_ENABLE(irq_number)

/**
 * @brief Macro for checking if a specific IRQ is enabled.
 *
 * @param irq_number IRQ number.
 *
 * @retval true  If the IRQ is enabled.


 * @retval false Otherwise.

 */


#define NRFX_IRQ_IS_ENABLED(irq_number)

ive tried searching around in the directories and i cant find anything, or on the internet. Just seems weird to make a macro that doesnt do anything unless theyre redefining it?

Heres the header file on github:
https://github.com/NordicSemiconductor/nrfx/blob/master/templates/nrfx_glue.h


Solution

  • It's a template file according to its comment in the file.

    You can find a real implementation for example at https://github.com/nrfconnect/sdk-zephyr/blob/main/modules/hal_nordic/nrfx/nrfx_glue.h.