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:
parent
c92dcb02e2
commit
22b640697b
2
crc.c
2
crc.c
|
|
@ -4,7 +4,7 @@
|
|||
\brief crc16 routine
|
||||
*/
|
||||
|
||||
#ifndef SIMULATOR
|
||||
#ifdef __AVR__
|
||||
#include <util/crc16.h>
|
||||
#else
|
||||
|
||||
|
|
|
|||
2
dda.c
2
dda.c
|
|
@ -7,7 +7,7 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#ifndef SIMULATOR
|
||||
#ifdef __AVR__
|
||||
#include <avr/interrupt.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <math.h>
|
||||
#ifndef SIMULATOR
|
||||
#ifdef __AVR__
|
||||
#include <avr/interrupt.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <string.h>
|
||||
#ifndef SIMULATOR
|
||||
#ifdef __AVR__
|
||||
#include <avr/interrupt.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <string.h>
|
||||
#ifndef SIMULATOR
|
||||
#ifdef __AVR__
|
||||
#include <avr/interrupt.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
\brief motherboard <-> extruder board protocol
|
||||
*/
|
||||
|
||||
#ifndef SIMULATOR
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
if (save_reg) sei(); \
|
||||
}
|
||||
|
||||
#else
|
||||
#elif defined __AVR__
|
||||
#include <util/atomic.h>
|
||||
#include <avr/version.h>
|
||||
|
||||
|
|
|
|||
2
temp.c
2
temp.c
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifndef SIMULATOR
|
||||
#ifdef __AVR__
|
||||
#include <avr/eeprom.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#endif
|
||||
|
|
|
|||
2
timer.c
2
timer.c
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue