This shows the new strategy to deal with architecture-specific
code:
- Keep common code as before.
- Keep the header file unchanged as well, no architecture
specific headers.
- Move architecture specific code to an architecture specific
file and wrap the whole contents into an architecture test.
- Also wrap the whole contents with #ifdef TEACUP_C_INCLUDE.
Without this wrapping, Arduino IDE as well as Configtool would
compile the stuff twice, because they compile everything
unconditionally.
- Last not least, #define TEACUP_C_INCLUDE and #include all
architecture specific files unconditionally.
Build tests were successful with the Makefile, with Configtool
and with Arduino 1.5.8, so this strategy is expected to work.
Regarding the copy operation of this commit: code unchanged,
other than rewriting of all the comments for the current idea of
'proper' formatting, getting rid of tabs and some other whitespace
editing.
##############################################################################
# #
# Teacup - lean and efficient firmware for RepRap printers #
# #
# by Triffid Hunter, Traumflug, jakepoz, many others. #
# #
##############################################################################
For installation instructions, see
http://reprap.org/wiki/Teacup_Firmware#Simple_Installation and/or
http://reprap.org/wiki/Teacup_Firmware#Developer_Installation
For documentation, see
http://reprap.org/wiki/Teacup_Firmware
##############################################################################
# #
# This firmware is Copyright (c) ... #
# 2009 - 2010 Michael Moon aka Triffid_Hunter #
# 2010 - 2013 Markus "Traumflug" Hitter <mah@jump-ing.de> #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the Free Software #
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
# #
##############################################################################