Skip to content

Commit

Permalink
fix #1002
Browse files Browse the repository at this point in the history
  • Loading branch information
SpenceKonde committed Sep 24, 2023
1 parent 4823415 commit 9e59a82
Showing 1 changed file with 58 additions and 1 deletion.
59 changes: 58 additions & 1 deletion megaavr/cores/megatinycore/core_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,67 @@
// The whole purpose of this file is largely for for the purpose of being something that can be included anywhere to make sure we know what core we are
// which becomes more and more important as more code is shared between the cores.

#define MEGATINYCORE "Unknown 2.6.1+"
#define MEGATINYCORE "Unknown 2.6.9+"
#else
#if defined(DXCORE) || defined(ATTINYCORE)
#error "This is megaTinyCore being compiled, but DXCORE and/or ATTINYCORE is defined already, something is way wrong."
#endif
#endif


/* Check for invalid options, mostly to help point the PIO and other third party IDE users in the right direction */

#if defined(MILLIS_USE_TIMERA0) && (defined(MILLIS_USE_TIMERNONE) || \
defined(MILLIS_USE_TIMERB0) || defined(MILLIS_USE_TIMERB1) || defined(MILLIS_USE_TIMERB2) || defined(MILLIS_USE_TIMERB3) || \
defined(MILLIS_USE_TIMERA1) || defined(MILLIS_USE_TIMERD0) || defined(MILLIS_USE_TIMERRTC) || defined(MILLIS_USE_TIMERRTC_XTAL))
#error "MILLIS_USE_TIMERA0 and another timer are set as the millis timer. Specify one only. If this occurred on the Arduino IDE, please report it promptly."
#endif
#if defined(MILLIS_USE_TIMERA1) && (defined(MILLIS_USE_TIMERNONE) || \
defined(MILLIS_USE_TIMERB0) || defined(MILLIS_USE_TIMERB1) || defined(MILLIS_USE_TIMERB2) || defined(MILLIS_USE_TIMERB3) || \
defined(MILLIS_USE_TIMERA0) || defined(MILLIS_USE_TIMERD0) || defined(MILLIS_USE_TIMERRTC) || defined(MILLIS_USE_TIMERRTC_XTAL))
#error "MILLIS_USE_TIMERA1 and another timer are set as the millis timer. Specify one only. If this occurred on the Arduino IDE, please report it promptly."
#endif
#if defined(MILLIS_USE_TIMERB0) && (defined(MILLIS_USE_TIMERNONE) || \
defined(MILLIS_USE_TIMERA0) || defined(MILLIS_USE_TIMERB1) || defined(MILLIS_USE_TIMERB2) || defined(MILLIS_USE_TIMERB3) || \
defined(MILLIS_USE_TIMERA1) || defined(MILLIS_USE_TIMERD0) || defined(MILLIS_USE_TIMERRTC) || defined(MILLIS_USE_TIMERRTC_XTAL))
#error "MILLIS_USE_TIMERB0 and another timer are set as the millis timer. Specify one only. If this occurred on the Arduino IDE, please report it promptly."
#endif
#if defined(MILLIS_USE_TIMERB1) && (defined(MILLIS_USE_TIMERNONE) || \
defined(MILLIS_USE_TIMERB0) || defined(MILLIS_USE_TIMERA0) || defined(MILLIS_USE_TIMERB2) || defined(MILLIS_USE_TIMERB3) || \
defined(MILLIS_USE_TIMERA1) || defined(MILLIS_USE_TIMERD0) || defined(MILLIS_USE_TIMERRTC) || defined(MILLIS_USE_TIMERRTC_XTAL))
#error "MILLIS_USE_TIMERB1 and another timer are set as the millis timer. Specify one only. If this occurred on the Arduino IDE, please report it promptly."
#endif
#if defined(MILLIS_USE_TIMERB2) && (defined(MILLIS_USE_TIMERNONE) || \
defined(MILLIS_USE_TIMERB0) || defined(MILLIS_USE_TIMERB1) || defined(MILLIS_USE_TIMERA0) || defined(MILLIS_USE_TIMERB3) || \
defined(MILLIS_USE_TIMERA1) || defined(MILLIS_USE_TIMERD0) || defined(MILLIS_USE_TIMERRTC) || defined(MILLIS_USE_TIMERRTC_XTAL))
#error "MILLIS_USE_TIMERB2 and another timer are set as the millis timer. Specify one only. If this occurred on the Arduino IDE, please report it promptly."
#endif
#if defined(MILLIS_USE_TIMERB3) && (defined(MILLIS_USE_TIMERNONE) || \
defined(MILLIS_USE_TIMERB0) || defined(MILLIS_USE_TIMERB1) || defined(MILLIS_USE_TIMERB2) || defined(MILLIS_USE_TIMERA0) || \
defined(MILLIS_USE_TIMERA1) || defined(MILLIS_USE_TIMERD0) || defined(MILLIS_USE_TIMERRTC) || defined(MILLIS_USE_TIMERRTC_XTAL))
#error "MILLIS_USE_TIMERB3 and another timer are set as the millis timer. Specify one only. If this occurred on the Arduino IDE, please report it promptly."
#endif
#if defined(MILLIS_USE_TIMERD0) && (defined(MILLIS_USE_TIMERNONE) || \
defined(MILLIS_USE_TIMERB0) || defined(MILLIS_USE_TIMERB1) || defined(MILLIS_USE_TIMERB2) || defined(MILLIS_USE_TIMERB3) || \
defined(MILLIS_USE_TIMERA1) || defined(MILLIS_USE_TIMERA0) || defined(MILLIS_USE_TIMERRTC) || defined(MILLIS_USE_TIMERRTC_XTAL))
#error "MILLIS_USE_TIMERB5 and another timer are set as the millis timer. Specify one only. If this occurred on the Arduino IDE, please report it promptly."
#endif
#if defined(MILLIS_USE_TIMERRTC) && (defined(MILLIS_USE_TIMERNONE) || \
defined(MILLIS_USE_TIMERB0) || defined(MILLIS_USE_TIMERB1) || defined(MILLIS_USE_TIMERB2) || defined(MILLIS_USE_TIMERB3) || \
defined(MILLIS_USE_TIMERA1) || defined(MILLIS_USE_TIMERD0) || defined(MILLIS_USE_TIMERA0))
#error "MILLIS_USE_TIMERE0 and another timer are set as the millis timer. Specify one only. If this occurred on the Arduino IDE, please report it promptly."
#endif
#if defined(MILLIS_USE_TIMERRTC_XTAL) && (defined(MILLIS_USE_TIMERNONE) || \
defined(MILLIS_USE_TIMERB0) || defined(MILLIS_USE_TIMERB1) || defined(MILLIS_USE_TIMERB2) || defined(MILLIS_USE_TIMERB3) || \
defined(MILLIS_USE_TIMERA1) || defined(MILLIS_USE_TIMERD0) || defined(MILLIS_USE_TIMERA0))
#error "MILLIS_USE_TIMERF0 and another timer are set as the millis timer. Specify one only. If this occurred on the Arduino IDE, please report it promptly."
#endif
#if defined(MILLIS_USE_TIMERE0) || defined(MILLIS_USE_TIMERF0)
#error "A millis timer not supported on this core was passed. this should only be possible on third party IDEs. "
#endif
#if defined(UARTBAUD5V) || defined(UARTBAUD3V)
#warning "The UARTBAUDxV baud rate correction was removed in 2.3.0 because it had excessive overhead and negligible benefit. The define you specified does nothing."
#endif
#endif

#endif

0 comments on commit 9e59a82

Please sign in to comment.