simplified the includes, makefile now works with arduino23

This commit is contained in:
Bernhard
2011-12-22 14:55:45 +01:00
parent 3c1a4aac2b
commit 57f9359a41
19 changed files with 81 additions and 86 deletions

View File

@@ -4,6 +4,8 @@
#include "Marlin.h"
#include "planner.h"
#include "temperature.h"
//#include <EEPROM.h>
template <class T> int EEPROM_writeAnything(int &ee, const T& value)
@@ -11,7 +13,7 @@ template <class T> int EEPROM_writeAnything(int &ee, const T& value)
const byte* p = (const byte*)(const void*)&value;
int i;
for (i = 0; i < (int)sizeof(value); i++)
EEPROM.write(ee++, *p++);
eeprom_write_byte((unsigned char *)ee++, *p++);
return i;
}
@@ -20,7 +22,7 @@ template <class T> int EEPROM_readAnything(int &ee, T& value)
byte* p = (byte*)(void*)&value;
int i;
for (i = 0; i < (int)sizeof(value); i++)
*p++ = EEPROM.read(ee++);
*p++ = eeprom_read_byte((unsigned char *)ee++);
return i;
}
//======================================================================================