Revert "magic PROGMEM defines to avoid hundreds of wrong GCC warnings"

This reverts commit 3682d9bd5b.
This commit is contained in:
MaikStohn 2012-05-04 12:24:07 +02:00
parent d188ae4c9d
commit b657a18449
2 changed files with 7 additions and 14 deletions

View file

@ -20,13 +20,6 @@
#include <avr/wdt.h> #include <avr/wdt.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
//do some magic defines in order to prevent hundreds of wrong warnings in gcc
//more info here: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=646359
typedef short prog_short PROGMEM;
#undef PROGMEM
#define PROGMEM __attribute__(( section(".progmem.data") ))
#undef PSTR
#define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &__c[0];}))
#include "fastio.h" #include "fastio.h"
#include "Configuration.h" #include "Configuration.h"

View file

@ -7,7 +7,7 @@
#if (THERMISTORHEATER_0 == 1) || (THERMISTORHEATER_1 == 1) || (THERMISTORHEATER_2 == 1) || (THERMISTORBED == 1) //100k bed thermistor #if (THERMISTORHEATER_0 == 1) || (THERMISTORHEATER_1 == 1) || (THERMISTORHEATER_2 == 1) || (THERMISTORBED == 1) //100k bed thermistor
const prog_short temptable_1[][2] = { const short temptable_1[][2] PROGMEM = {
{ 23*OVERSAMPLENR , 300 }, { 23*OVERSAMPLENR , 300 },
{ 25*OVERSAMPLENR , 295 }, { 25*OVERSAMPLENR , 295 },
{ 27*OVERSAMPLENR , 290 }, { 27*OVERSAMPLENR , 290 },
@ -72,7 +72,7 @@ const prog_short temptable_1[][2] = {
}; };
#endif #endif
#if (THERMISTORHEATER_0 == 2) || (THERMISTORHEATER_1 == 2) || (THERMISTORHEATER_2 == 2) || (THERMISTORBED == 2) //200k bed thermistor #if (THERMISTORHEATER_0 == 2) || (THERMISTORHEATER_1 == 2) || (THERMISTORHEATER_2 == 2) || (THERMISTORBED == 2) //200k bed thermistor
const prog_short temptable_2[][2] = { const short temptable_2[][2] PROGMEM = {
{1*OVERSAMPLENR, 848}, {1*OVERSAMPLENR, 848},
{54*OVERSAMPLENR, 275}, {54*OVERSAMPLENR, 275},
{107*OVERSAMPLENR, 228}, {107*OVERSAMPLENR, 228},
@ -98,7 +98,7 @@ const prog_short temptable_2[][2] = {
#endif #endif
#if (THERMISTORHEATER_0 == 3) || (THERMISTORHEATER_1 == 3) || (THERMISTORHEATER_2 == 3) || (THERMISTORBED == 3) //mendel-parts #if (THERMISTORHEATER_0 == 3) || (THERMISTORHEATER_1 == 3) || (THERMISTORHEATER_2 == 3) || (THERMISTORBED == 3) //mendel-parts
const prog_short temptable_3[][2] = { const short temptable_3[][2] PROGMEM = {
{1*OVERSAMPLENR,864}, {1*OVERSAMPLENR,864},
{21*OVERSAMPLENR,300}, {21*OVERSAMPLENR,300},
{25*OVERSAMPLENR,290}, {25*OVERSAMPLENR,290},
@ -131,7 +131,7 @@ const prog_short temptable_3[][2] = {
#endif #endif
#if (THERMISTORHEATER_0 == 4) || (THERMISTORHEATER_1 == 4) || (THERMISTORHEATER_2 == 4) || (THERMISTORBED == 4) //10k thermistor #if (THERMISTORHEATER_0 == 4) || (THERMISTORHEATER_1 == 4) || (THERMISTORHEATER_2 == 4) || (THERMISTORBED == 4) //10k thermistor
const prog_short temptable_4[][2] = { const short temptable_4[][2] PROGMEM = {
{1*OVERSAMPLENR, 430}, {1*OVERSAMPLENR, 430},
{54*OVERSAMPLENR, 137}, {54*OVERSAMPLENR, 137},
{107*OVERSAMPLENR, 107}, {107*OVERSAMPLENR, 107},
@ -156,7 +156,7 @@ const prog_short temptable_4[][2] = {
#endif #endif
#if (THERMISTORHEATER_0 == 5) || (THERMISTORHEATER_1 == 5) || (THERMISTORHEATER_2 == 5) || (THERMISTORBED == 5) //100k ParCan thermistor (104GT-2) #if (THERMISTORHEATER_0 == 5) || (THERMISTORHEATER_1 == 5) || (THERMISTORHEATER_2 == 5) || (THERMISTORBED == 5) //100k ParCan thermistor (104GT-2)
const prog_short temptable_5[][2] = { const short temptable_5[][2] PROGMEM = {
{1*OVERSAMPLENR, 713}, {1*OVERSAMPLENR, 713},
{18*OVERSAMPLENR, 316}, {18*OVERSAMPLENR, 316},
{35*OVERSAMPLENR, 266}, {35*OVERSAMPLENR, 266},
@ -222,7 +222,7 @@ const prog_short temptable_5[][2] = {
#endif #endif
#if (THERMISTORHEATER_0 == 6) || (THERMISTORHEATER_1 == 6) || (THERMISTORHEATER_2 == 6) || (THERMISTORBED == 6) // 100k Epcos thermistor #if (THERMISTORHEATER_0 == 6) || (THERMISTORHEATER_1 == 6) || (THERMISTORHEATER_2 == 6) || (THERMISTORBED == 6) // 100k Epcos thermistor
const prog_short temptable_6[][2] = { const short temptable_6[][2] PROGMEM = {
{28*OVERSAMPLENR, 250}, {28*OVERSAMPLENR, 250},
{31*OVERSAMPLENR, 245}, {31*OVERSAMPLENR, 245},
{35*OVERSAMPLENR, 240}, {35*OVERSAMPLENR, 240},
@ -263,7 +263,7 @@ const prog_short temptable_6[][2] = {
#endif #endif
#if (THERMISTORHEATER_0 == 7) || (THERMISTORHEATER_1 == 7) || (THERMISTORHEATER_2 == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01 #if (THERMISTORHEATER_0 == 7) || (THERMISTORHEATER_1 == 7) || (THERMISTORHEATER_2 == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01
const prog_short temptable_7[][2] = { const short temptable_7[][2] PROGMEM = {
{46*OVERSAMPLENR, 270}, {46*OVERSAMPLENR, 270},
{50*OVERSAMPLENR, 265}, {50*OVERSAMPLENR, 265},
{54*OVERSAMPLENR, 260}, {54*OVERSAMPLENR, 260},