Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RF24
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
RF24
Commits
14ed8638
Commit
14ed8638
authored
Sep 18, 2015
by
TMRh20
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redefine PROGMEM variables for ESP8266
redefine: PSTR printf_P strlen_P PROGMEM pgm_read_byte pgm_read_word
parent
2db0f2e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
RF24.cpp
RF24.cpp
+1
-1
RF24_config.h
RF24_config.h
+10
-2
No files found.
RF24.cpp
View file @
14ed8638
...
...
@@ -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.
...
...
RF24_config.h
View file @
14ed8638
...
...
@@ -115,9 +115,17 @@
// Progmem is Arduino-specific
// Arduino DUE is arm and does not include avr/pgmspace
#if defined (ARDUINO_ARCH_ESP8266)
#include <pgmspace.h>
#define PRIPSTR "%s"
#include <pgmspace.h>
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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment