Replace SIMULATOR with __AVR__ in several places.

Previously some features were excluded based on whether SIMULATOR
was defined. But in fact these should have been included when __AVR__
was defined. These used to be the same thing, but now with ARM coming
into the picture, they are not. Fix the situation so AVR includes are
truly only used when __AVR__ is defined.

The _crc16_update function appears to be specific to AVR; I've kept the
alternate implementation limited to AVR in that case in crc.c. I think
this is the right thing to do, but I am not sure. Maybe ARM has some
equivalent function in their libraries.
This commit is contained in:
Phil Hord 2015-07-27 16:40:27 -04:00 committed by Markus Hitter
parent c92dcb02e2
commit 22b640697b
10 changed files with 10 additions and 10 deletions

2
crc.c
View File

@ -4,7 +4,7 @@
\brief crc16 routine
*/
#ifndef SIMULATOR
#ifdef __AVR__
#include <util/crc16.h>
#else

2
dda.c
View File

@ -7,7 +7,7 @@
#include <string.h>
#include <stdlib.h>
#include <math.h>
#ifndef SIMULATOR
#ifdef __AVR__
#include <avr/interrupt.h>
#endif

View File

@ -11,7 +11,7 @@
#include <stdlib.h>
#include <stddef.h>
#include <math.h>
#ifndef SIMULATOR
#ifdef __AVR__
#include <avr/interrupt.h>
#endif

View File

@ -5,7 +5,7 @@
*/
#include <string.h>
#ifndef SIMULATOR
#ifdef __AVR__
#include <avr/interrupt.h>
#endif

View File

@ -5,7 +5,7 @@
*/
#include <string.h>
#ifndef SIMULATOR
#ifdef __AVR__
#include <avr/interrupt.h>
#endif

View File

@ -4,7 +4,7 @@
\brief motherboard <-> extruder board protocol
*/
#ifndef SIMULATOR
#ifdef __AVR__
#include <avr/io.h>
#include <avr/interrupt.h>
#endif

View File

@ -13,7 +13,7 @@
if (save_reg) sei(); \
}
#else
#elif defined __AVR__
#include <util/atomic.h>
#include <avr/version.h>

2
temp.c
View File

@ -10,7 +10,7 @@
*/
#include <stdlib.h>
#ifndef SIMULATOR
#ifdef __AVR__
#include <avr/eeprom.h>
#include <avr/pgmspace.h>
#endif

View File

@ -10,7 +10,7 @@
Teacup has tried numerous timer management methods, and this is the best so far.
*/
#ifndef SIMULATOR
#ifdef __AVR__
#include <avr/interrupt.h>
#endif
#include "memory_barrier.h"

View File

@ -2,7 +2,7 @@
#define _TIMER_H
#include <stdint.h>
#ifndef SIMULATOR
#ifdef __AVR__
#include <avr/io.h>
#endif
#include "simulator.h"