Skip to content

Commit

Permalink
馃悰 Fix env validation for 1280/2560 boards (MarlinFirmware#22150)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
  • Loading branch information
rhapsodyv and thinkyhead committed Jun 18, 2021
1 parent e38958f commit d8df8e0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Marlin/src/pins/mega/env_validate.h
Expand Up @@ -21,10 +21,12 @@
*/
#pragma once

#if ENABLED(ALLOW_MEGA1280) && NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560 or 1280' in 'Tools > Board.'"
#elif NOT_TARGET(__AVR_ATmega2560__)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
#if NOT_TARGET(__AVR_ATmega2560__)
#if DISABLED(ALLOW_MEGA1280)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
#elif NOT_TARGET(__AVR_ATmega1280__)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560 or 1280' in 'Tools > Board.'"
#endif
#endif

#undef ALLOW_MEGA1280

0 comments on commit d8df8e0

Please sign in to comment.