Proposal to keep gateways separated.

This commit is contained in:
Henrik Ekblad
2014-09-09 16:57:56 +02:00
parent 9192da3a7d
commit 7fa54a6e5a
28 changed files with 3604 additions and 740 deletions
@@ -0,0 +1,21 @@
#ifndef INCLUDE_GETPSTR
#define INCLUDE_GETPSTR
#if defined(ARDUINO) && ARDUINO >= 100
#include <Arduino.h>
#else
#include "pins_arduino.h"
#include "WProgram.h"
#include "wiring.h"
#endif
#define getPSTR(s) pgmStrToRAM(PSTR(s))
char *_pstr_to_print;
char *pgmStrToRAM(PROGMEM char *theString) {
free(_pstr_to_print);
_pstr_to_print=(char *) malloc(strlen_P(theString));
strcpy_P(_pstr_to_print, theString);
return (_pstr_to_print);
}
#endif