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

nrf52.h vs nrf52840.h?

Hello, I'm using the nrf52840 SoC, and nrf52840.h appears to be a more "localized" and "specialized" version of nrf52.h for nrf52840. So quite reasonably I should use nrf52840.h.

But the thing is, I'm doing a migration from nrf51 devices, can I just include nrf52.h instead? The only thing that made me ask this question is that I want to utilize nrf52840's BLE 5.x capability, so I think that may not exactly be a good idea?

Parents Reply
  • defined() is very standard C preprocessor syntax, every compiler understands it. It has nothing to do with MDK-ARM. Just define it wherever in your build system you define things. In a makefile it's -D, in every IDE it's somewhere in the IDE. Any of the examples for the NRF52840 for your IDE/build system will have it correctly defined, copy that.

Children
No Data
Related