Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid custom MCU definition being redefined as NRF52832 #531

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions cores/nRF5/SDK/components/device/nrf.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,19 @@ POSSIBILITY OF SUCH DAMAGE.
#endif

/* Redefine "old" too-generic name NRF52 to NRF52832_XXAA to keep backwards compatibility. */
#if defined (NRF52)
#ifndef NRF52832_XXAA
#define NRF52832_XXAA
/* only do this if a specific MCU part is not defined to avoid redefining as NRF52832_XXAA */
#if !defined(NRF52805_XXAA) &&\
!defined(NRF52810_XXAA) &&\
!defined(NRF52811_XXAA) &&\
!defined(NRF52820_XXAA) &&\
!defined(NRF52832_XXAA) &&\
!defined(NRF52832_XXAB) &&\
!defined(NRF52833_XXAA) &&\
!defined(NRF52840_XXAA)
#if defined (NRF52)
#ifndef NRF52832_XXAA
#define NRF52832_XXAA
#endif
#endif
#endif

Expand Down