Skip to content

Commit

Permalink
Revise SFR macros suppression implementation
Browse files Browse the repository at this point in the history
Resolves #226 (Revise SFR macros suppression implementation).
  • Loading branch information
apcountryman committed Mar 29, 2024
1 parent 4bf4f32 commit 54f94b6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libraries/avr-libcpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
add_library( avr-libcpp STATIC )

target_compile_definitions( avr-libcpp
PUBLIC $<IF:$<BOOL:${AVRLIBCPP_SUPPRESS_SFR_MACROS}>,AVRLIBCPP_SUPPRESS_SFR_MACROS,>
PUBLIC AVRLIBCPP_SUPPRESS_SFR_MACROS=$<IF:$<BOOL:${AVRLIBCPP_SUPPRESS_SFR_MACROS}>,1,0>
)

target_include_directories( avr-libcpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <avr/io.h>

#ifdef __AVR_ATmega2560__
#ifdef AVRLIBCPP_SUPPRESS_SFR_MACROS
#if AVRLIBCPP_SUPPRESS_SFR_MACROS

#ifdef ACBG
#undef ACBG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <avr/io.h>

#ifdef __AVR_ATmega328P__
#ifdef AVRLIBCPP_SUPPRESS_SFR_MACROS
#if AVRLIBCPP_SUPPRESS_SFR_MACROS

#ifdef ACBG
#undef ACBG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
|| defined( __AVR_ATmega1608__ ) || defined( __AVR_ATmega1609__ ) \
|| defined( __AVR_ATmega3208__ ) || defined( __AVR_ATmega3209__ ) \
|| defined( __AVR_ATmega4808__ ) || defined( __AVR_ATmega4809__ )
#ifdef AVRLIBCPP_SUPPRESS_SFR_MACROS
#if AVRLIBCPP_SUPPRESS_SFR_MACROS

#ifdef AC0
#undef AC0
Expand Down

0 comments on commit 54f94b6

Please sign in to comment.