Permalink
Browse files

Remove prog_char, for compliance with gcc 4.6.1

  • Loading branch information...
maniacbug committed Jan 18, 2012
1 parent 205d4b5 commit f6e59b9de8d8424c3a1daecfbdafdcbfcd85ccac
Showing with 159 additions and 144 deletions.
  1. +2 −2 RF24.cpp
  2. +2 −2 RF24.h
  3. +4 −2 RF24_config.h
  4. +150 −137 examples/pingpair_irq/Jamfile
  5. +1 −1 examples/pingpair_irq/pingpair_irq.pde
View
@@ -206,7 +206,7 @@ void RF24::print_observe_tx(uint8_t value)
/****************************************************************************/
void RF24::print_byte_register(prog_char* name, uint8_t reg, uint8_t qty)
void RF24::print_byte_register(const char* name, uint8_t reg, uint8_t qty)
{
char extra_tab = strlen_P(name) < 8 ? '\t' : 0;
printf_P(PSTR(PRIPSTR"\t%c ="),name,extra_tab);
@@ -217,7 +217,7 @@ void RF24::print_byte_register(prog_char* name, uint8_t reg, uint8_t qty)
/****************************************************************************/
void RF24::print_address_register(prog_char* name, uint8_t reg, uint8_t qty)
void RF24::print_address_register(const char* name, uint8_t reg, uint8_t qty)
{
char extra_tab = strlen_P(name) < 8 ? '\t' : 0;
printf_P(PSTR(PRIPSTR"\t%c ="),name,extra_tab);
View
4 RF24.h
@@ -194,7 +194,7 @@ class RF24
* @param reg Which register. Use constants from nRF24L01.h
* @param qty How many successive registers to print
*/
void print_byte_register(prog_char* name, uint8_t reg, uint8_t qty = 1);
void print_byte_register(const char* name, uint8_t reg, uint8_t qty = 1);
/**
* Print the name and value of a 40-bit address register to stdout
@@ -207,7 +207,7 @@ class RF24
* @param reg Which register. Use constants from nRF24L01.h
* @param qty How many successive registers to print
*/
void print_address_register(prog_char* name, uint8_t reg, uint8_t qty = 1);
void print_address_register(const char* name, uint8_t reg, uint8_t qty = 1);
/**
* Turn on or off the special features of the chip
View
@@ -37,19 +37,21 @@ extern HardwareSPI SPI;
#endif
// Avoid spurious warnings
#if 1
#if ! defined( NATIVE ) && defined( ARDUINO )
#undef PROGMEM
#define PROGMEM __attribute__(( section(".progmem.data") ))
#undef PSTR
#define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &__c[0];}))
#define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
#endif
#endif
// Progmem is Arduino-specific
#ifdef ARDUINO
#include <avr/pgmspace.h>
#define PRIPSTR "%S"
#else
typedef char const prog_char;
typedef char const char;
typedef uint16_t prog_uint16_t;
#define PSTR(x) (x)
#define printf_P printf
Oops, something went wrong.

0 comments on commit f6e59b9

Please sign in to comment.