Commit 14ed8638 authored by TMRh20's avatar TMRh20

Redefine PROGMEM variables for ESP8266

redefine:
PSTR
printf_P
strlen_P
PROGMEM
pgm_read_byte
pgm_read_word
parent 2db0f2e6
......@@ -32,7 +32,7 @@ void RF24::csn(bool mode)
// Return, CSN toggle complete
return;
#elif defined(ARDUINO)
#elif defined(ARDUINO) && !defined (RF24_SPI_TRANSACTIONS)
// Minimum ideal SPI bus speed is 2x data rate
// If we assume 2Mbs data rate and 16Mhz clock, a
// divider of 4 is the minimum we want.
......
......@@ -116,8 +116,16 @@
// Arduino DUE is arm and does not include avr/pgmspace
#if defined (ARDUINO_ARCH_ESP8266)
#include <pgmspace.h>
#define PRIPSTR "%s"
typedef uint16_t prog_uint16_t;
#define PSTR(x) (x)
#define printf_P printf
#define strlen_P strlen
#define PROGMEM
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#define pgm_read_word(p) (*(p))
#define PRIPSTR "%s"
#elif defined(ARDUINO) && ! defined(__arm__) && !defined (__ARDUINO_X86__)
#include <avr/pgmspace.h>
#define PRIPSTR "%S"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment