*/
#include <aversive.h>
+#include <aversive/pgmspace.h>
#include <aversive/queue.h>
#include <aversive/endian.h>
/* check frame len */
if (len < (hdrlen + 1)) {
dev->stats.rx_frame_too_small++;
- fprintf(stderr, "Frame too small\n");
+ fprintf_P(stderr, PSTR("Frame too small\r\n"));
return -1;
}
cksum += ((uint8_t *)buf)[i];
cksum = 0xff - cksum;
if (cksum != ((uint8_t *)buf)[len-1]) {
- fprintf(stderr, "Invalid cksum\n");
+ fprintf_P(stderr, PSTR("Invalid cksum\r\n"));
dev->stats.rx_invalid_cksum++;
return -1;
}
case XBEE_TYPE_RMT_ATRESP:
default:
dev->stats.tx_invalid_type ++;
- fprintf(stderr, "unhandled xmit type=%x\n", hdr.type);
+ fprintf_P(stderr, PSTR("unhandled xmit type=%x\r\n"),
+ hdr.type);
return -1;
}