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

zephyr

Hi, I am in the process of evaluating nRF5340 to switch from STM32 device to nRF device as per my ex-colleague recommendation. I started looking at simple blinky example for nRF5340 which uses Zephyr. My question is why nRF driver functions are defined as static inline in .h files, not as normal functions in .c/.cpp files. Making inline functions in header files, is not going to create code duplication in the flash if we have multiple calls to the same driver function? There must be a design decision by either nRF or Zephyr team to make these driver functions are inline in header files? Is there any particular reason for this design choice?

Related