*/
#include <aversive.h>
+#include <aversive/pgmspace.h>
#include <aversive/queue.h>
#include <string.h>
//XXX printf_P
void xbee_dump_stats(struct xbee_dev *dev)
{
- printf("statistics on xbee_dev %p:\n", dev);
- printf(" rx_frame: %d\n", dev->stats.rx_frame);
- printf(" rx_atresp: %d\n", dev->stats.rx_atresp);
- printf(" rx_atresp_error: %d\n", dev->stats.rx_atresp_error);
- printf(" rx_modem_status: %d\n", dev->stats.rx_modem_status);
- printf(" rx_xmit_status: %d\n", dev->stats.rx_xmit_status);
- printf(" rx_xmit_status_error: %d\n", dev->stats.rx_xmit_status_error);
- printf(" rx_data: %d\n", dev->stats.rx_data);
- printf(" rx_expl_data: %d\n", dev->stats.rx_expl_data);
- printf(" rx_node_id: %d\n", dev->stats.rx_node_id);
- printf(" rx_rmt_atresp: %d\n", dev->stats.rx_rmt_atresp);
- printf(" rx_rmt_atresp_error: %d\n", dev->stats.rx_rmt_atresp_error);
- printf(" rx_frame_too_small: %d\n", dev->stats.rx_frame_too_small);
- printf(" rx_frame_too_large: %d\n", dev->stats.rx_frame_too_large);
- printf(" rx_invalid_cksum: %d\n", dev->stats.rx_invalid_cksum);
- printf(" rx_invalid_type: %d\n", dev->stats.rx_invalid_type);
- printf(" rx_no_delim: %d\n", dev->stats.rx_no_delim);
- printf(" tx_frame: %d\n", dev->stats.tx_frame);
- printf(" tx_atcmd: %d\n", dev->stats.tx_atcmd);
- printf(" tx_atcmd_q: %d\n", dev->stats.tx_atcmd_q);
- printf(" tx_data: %d\n", dev->stats.tx_data);
- printf(" tx_expl_data: %d\n", dev->stats.tx_expl_data);
- printf(" tx_xmit_retries: %d\n", dev->stats.tx_xmit_retries);
- printf(" tx_rmt_atcmd: %d\n", dev->stats.tx_rmt_atcmd);
- printf(" tx_invalid_type: %d\n", dev->stats.tx_invalid_type);
- printf(" tx_invalid_channel: %d\n", dev->stats.tx_invalid_channel);
+ printf_P(PSTR("statistics on xbee_dev %p:\r\n"), dev);
+ printf_P(PSTR(" rx_frame: %d\r\n"), dev->stats.rx_frame);
+ printf_P(PSTR(" rx_atresp: %d\r\n"), dev->stats.rx_atresp);
+ printf_P(PSTR(" rx_atresp_error: %d\r\n"), dev->stats.rx_atresp_error);
+ printf_P(PSTR(" rx_modem_status: %d\r\n"), dev->stats.rx_modem_status);
+ printf_P(PSTR(" rx_xmit_status: %d\r\n"), dev->stats.rx_xmit_status);
+ printf_P(PSTR(" rx_xmit_status_error: %d\r\n"), dev->stats.rx_xmit_status_error);
+ printf_P(PSTR(" rx_data: %d\r\n"), dev->stats.rx_data);
+ printf_P(PSTR(" rx_expl_data: %d\r\n"), dev->stats.rx_expl_data);
+ printf_P(PSTR(" rx_node_id: %d\r\n"), dev->stats.rx_node_id);
+ printf_P(PSTR(" rx_rmt_atresp: %d\r\n"), dev->stats.rx_rmt_atresp);
+ printf_P(PSTR(" rx_rmt_atresp_error: %d\r\n"), dev->stats.rx_rmt_atresp_error);
+ printf_P(PSTR(" rx_frame_too_small: %d\r\n"), dev->stats.rx_frame_too_small);
+ printf_P(PSTR(" rx_frame_too_large: %d\r\n"), dev->stats.rx_frame_too_large);
+ printf_P(PSTR(" rx_invalid_cksum: %d\r\n"), dev->stats.rx_invalid_cksum);
+ printf_P(PSTR(" rx_invalid_type: %d\r\n"), dev->stats.rx_invalid_type);
+ printf_P(PSTR(" rx_no_delim: %d\r\n"), dev->stats.rx_no_delim);
+ printf_P(PSTR(" tx_frame: %d\r\n"), dev->stats.tx_frame);
+ printf_P(PSTR(" tx_atcmd: %d\r\n"), dev->stats.tx_atcmd);
+ printf_P(PSTR(" tx_atcmd_q: %d\r\n"), dev->stats.tx_atcmd_q);
+ printf_P(PSTR(" tx_data: %d\r\n"), dev->stats.tx_data);
+ printf_P(PSTR(" tx_expl_data: %d\r\n"), dev->stats.tx_expl_data);
+ printf_P(PSTR(" tx_xmit_retries: %d\r\n"), dev->stats.tx_xmit_retries);
+ printf_P(PSTR(" tx_rmt_atcmd: %d\r\n"), dev->stats.tx_rmt_atcmd);
+ printf_P(PSTR(" tx_invalid_type: %d\r\n"), dev->stats.tx_invalid_type);
+ printf_P(PSTR(" tx_invalid_channel: %d\r\n"), dev->stats.tx_invalid_channel);
}