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.
Fork of XBeeZB_power_mngmnt_pin_sleep by
Revision 4:247facc3db2a, committed 2015-06-01
- Comitter:
- spastor
- Date:
- Mon Jun 01 19:02:11 2015 +0200
- Parent:
- 3:a1a694348f09
- Child:
- 5:272691f397ee
- Commit message:
- Automatic upload
Changed in this revision
--- a/XBeeLib.lib Mon May 18 13:19:43 2015 +0200 +++ b/XBeeLib.lib Mon Jun 01 19:02:11 2015 +0200 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/Digi-International-Inc/code/XBeeLib/#8662ebe83570 +http://developer.mbed.org/teams/Digi-International-Inc/code/XBeeLib/#629712865107
--- a/config.h Mon May 18 13:19:43 2015 +0200 +++ b/config.h Mon Jun 01 19:02:11 2015 +0200 @@ -18,7 +18,6 @@ #define ENABLE_ASSERTIONS #define FRAME_BUFFER_SIZE 4 #define MAX_FRAME_PAYLOAD_LEN 128 -#define ENABLE_PM_SUPPORT #define SYNC_OPS_TIMEOUT_MS 2000
--- a/main.cpp Mon May 18 13:19:43 2015 +0200
+++ b/main.cpp Mon Jun 01 19:02:11 2015 +0200
@@ -61,7 +61,7 @@
{
char data[60];
static uint16_t sample = 0;
- const uint16_t data_len = sprintf(data, "\r\nSensor sample: %u, next sample in %lu seconds\r\n",
+ const uint16_t data_len = sprintf(data, "\r\nSensor sample: %u, next sample in %lu seconds\r\n",
sample++, (uint32_t)SLEEP_SECONDS);
const TxStatus txStatus = xbee.send_data_to_coordinator((const uint8_t *)data, data_len);
@@ -76,7 +76,7 @@
AtCmdFrame::AtCmdResp cmdresp;
/* Configure cpu pins to control the radio power management pins:
- * - RADIO_SLEEP_REQ: This pin connected to the radio SLEEP_RQ pin (pin 9 on THT modules, pin 10 on SMT modules) will
+ * - RADIO_SLEEP_REQ: This pin connected to the radio SLEEP_RQ pin (pin 9 on THT modules, pin 10 on SMT modules) will
* allow the cpu to request the radio to sleep or awake.
* - RADIO_ON_SLEEP: This pin connected to radio ON/SLEEP# pin (pin 13 on THT modules, pin 26 on SMT modules) will
* allow the cpu to know if the radio is awaked or sleept.
@@ -84,9 +84,6 @@
sleep_req = new DigitalOut(RADIO_SLEEP_REQ);
on_sleep = new DigitalIn(RADIO_ON_SLEEP);
- /* Set the radio on so we can send initialization messages to the radio */
- awake_radio();
-
log_serial = new Serial(DEBUG_TX, DEBUG_RX);
log_serial->baud(9600);
log_serial->printf("Sample application to demo pin sleep power management with the XBeeZB\r\n\r\n");
@@ -107,6 +104,8 @@
log_serial->printf("SM Failed!!\r\n");
}
+ awake_radio();
+
/* Wait until the device has joined the network */
log_serial->printf("Waiting for device to join the network: ");
while (!xbee.is_joined()) {
