Commit Graph

2 Commits

Author SHA1 Message Date
Markus Hitter 370bb9f93c Move pin I/O macros from arduino.h to pinio.h.
arduino.h is now free of function definitions.
2015-08-12 14:26:34 +02:00
Markus Hitter 24b2cd1d02 ARM: start generic port by splitting out AVR specific serial code.
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.
2015-08-12 14:26:33 +02:00