Fix crash

This commit is contained in:
Yveaux
2015-10-06 21:19:17 +02:00
parent b981b492bc
commit abfdaf2634
+5 -8
View File
@@ -10,9 +10,6 @@
#include "RF24_config.h" #include "RF24_config.h"
#include "RF24.h" #include "RF24.h"
// Save some bytes by reusing strings.
static const char space_str_P[] PROGMEM = " ";
/****************************************************************************/ /****************************************************************************/
#ifdef MY_DEBUG_VERBOSE #ifdef MY_DEBUG_VERBOSE
static void print_hex( uint8_t v, const bool prefix0x = false ) static void print_hex( uint8_t v, const bool prefix0x = false )
@@ -304,7 +301,7 @@ void RF24::print_feature(void)
#ifdef MY_DEBUG_VERBOSE #ifdef MY_DEBUG_VERBOSE
Serial.print(F("FEATURE=")); Serial.print(F("FEATURE="));
print_hex(read_register(FEATURE), true); print_hex(read_register(FEATURE), true);
Serial.println(space_str_P); Serial.println(F(""));
#endif #endif
} }
@@ -345,10 +342,10 @@ void RF24::print_byte_register(uint8_t reg, uint8_t qty)
while (qty--) while (qty--)
{ {
print_hex(read_register(reg++), prefix0x); print_hex(read_register(reg++), prefix0x);
Serial.print(space_str_P); Serial.print(F(" "));
prefix0x = false; prefix0x = false;
} }
Serial.println(space_str_P); Serial.println(F(""));
#else #else
(void)reg; (void)reg;
(void)qty; (void)qty;
@@ -371,9 +368,9 @@ void RF24::print_address_register(uint8_t reg, uint8_t qty)
print_hex(read_register(*bufptr), prefix0x); print_hex(read_register(*bufptr), prefix0x);
prefix0x = false; prefix0x = false;
} }
Serial.print(space_str_P); Serial.print(F(" "));
} }
Serial.println(space_str_P); Serial.println(F(""));
#else #else
(void)reg; (void)reg;
(void)qty; (void)qty;