-1

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

tim p
  • 25
  • 4
  • 1
    From the 1st comment in the file: _**THIS IS A TEMPLATE FILE**. It should be copied to a suitable location within the host environment into which nrfx is integrated, and the following macros should be provided with appropriate implementations. And this comment should be removed from the customized file._ – Craig Estey Apr 29 '23 at 17:26

1 Answers1

1

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.

Emil
  • 16,784
  • 2
  • 41
  • 52