You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
553 B

#include "../global.h"
// call with printString(PSTR("My string"))
void SPrint_P(const char *data)
{
char ch;
for (;;) {
ch = pgm_read_byte( data++ );
if ( !ch ) return;
Serial.print(ch);
}
}
void SPrintln_P(const char *data)
{
SPrint_P(data);
SPrint_P(PSTR("\r\n"));
}
void SPrintHex_P(const char *data)
{
char ch;
for (;;) {
ch = pgm_read_byte( data++ );
if ( !ch ) return;
Serial.print(ch, HEX);
}
}
void SPrintlnHex_P(const char *data)
{
printString(data);
Serial.println();
}