Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: CircularBuffer FixedLengthList
Dependents: XBeeApiTest XBeeApiSimpleATCmdsExample XBeeApiBroadcastExample XBeeApiBroadcastExampleRTOS ... more
Diff: Base/XBeeDevice.cpp
- Revision:
- 16:8095c43a2a6e
- Parent:
- 10:0d084d0253a7
- Child:
- 29:c6d037cceb02
diff -r ff9f12e38f44 -r 8095c43a2a6e Base/XBeeDevice.cpp --- a/Base/XBeeDevice.cpp Mon Feb 03 23:47:33 2014 +0000 +++ b/Base/XBeeDevice.cpp Tue Feb 04 23:52:50 2014 +0000 @@ -17,6 +17,7 @@ */ #include "XBeeDevice.hpp" +#include "XBeeApiCfg.hpp" /** Number of bytes we need to 'peek' into the receive buffer in order to retrieve the payload length */ @@ -193,7 +194,7 @@ return ret_val; } -void XBeeDevice::SendFrame( const XBeeApiFrame* const p_cmd ) +void XBeeDevice::SendFrame( XBeeApiFrame* const p_cmd ) { uint8_t sum = 0U; uint16_t len; @@ -235,6 +236,9 @@ xbeeWrite( (uint8_t)0xFFU - sum ); fflush( m_if ); +#if defined XBEE_DEBUG_DEVICE_DUMP_MESSAGE_DECODE + m_if.printf("\r\n"); +#endif #if defined XBEEAPI_CONFIG_USING_RTOS m_ifMutex.unlock(); @@ -251,21 +255,21 @@ (p_byte == XBEE_SB_XON ) || (p_byte == XBEE_SB_XOFF))) { - #if 0 +#if defined XBEE_DEBUG_DEVICE_DUMP_MESSAGE_DECODE m_if.printf("%02x ",XBEE_SB_ESCAPE); m_if.printf("%02x ",p_byte ^ 0x20); - #else +#else m_if.putc(XBEE_SB_ESCAPE); m_if.putc(p_byte ^ 0x20); - #endif +#endif c_sum += XBEE_SB_ESCAPE; c_sum += p_byte ^ 0x20; } else { - #if 0 +#if defined XBEE_DEBUG_DEVICE_DUMP_MESSAGE_DECODE m_if.printf("%02x ",p_byte); - #else +#else m_if.putc(p_byte); - #endif +#endif c_sum += p_byte; } return c_sum;