Csr location demo application shows location and satellite information, which supports H13467 + ST F103RB/NXP LCP1549 boards now.
Dependencies: CsrLocation mbed GPSProvider
Fork of CsrLocationDemo by
Revision 11:4e0bba518108, committed 2014-08-11
- Comitter:
- zhjcpi
- Date:
- Mon Aug 11 03:23:30 2014 +0000
- Parent:
- 10:8dbf356c44ec
- Child:
- 12:0dd8bbcca560
- Commit message:
- Add wakeup pin input process.
Changed in this revision
| CsrLocation.lib | Show annotated file Show diff for this revision Revisions of this file |
| CsrLocationDemo.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/CsrLocation.lib Wed Aug 06 02:23:46 2014 +0000 +++ b/CsrLocation.lib Mon Aug 11 03:23:30 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/zhjcpi/code/CsrLocation/#1fde78f27d5b +http://mbed.org/users/zhjcpi/code/CsrLocation/#fa29f8455134
--- a/CsrLocationDemo.cpp Wed Aug 06 02:23:46 2014 +0000
+++ b/CsrLocationDemo.cpp Mon Aug 11 03:23:30 2014 +0000
@@ -30,6 +30,7 @@
APP_CMD_ONOFF_OFF, // Debug command, pull onoff pin low level
APP_CMD_RESET_ON, // Debug command, pull reset pin high level
APP_CMD_RESET_OFF, // Debug command, pull reset pin low level
+ APP_CMD_WAKEUP_STATUS, // Debug command, check wakeup pin status
APP_CMD_PINTEST_ON, // Debug command, pull test pin high level
APP_CMD_PINTEST_OFF, // Debug command, pull test pin low level
APP_CMD_PINTEST_OFF_ON // Debug command, pull test pin low firstly, then pull high level
@@ -55,6 +56,7 @@
static DigitalOut sPinReset(PINMAP_GPIO_LOC_RESET);
static DigitalOut sLedLocOn(LOC_LED1);
static DigitalOut sLedPosReport(LOC_LED2);
+static DigitalIn sWakeup(PINMAP_GPIO_LOC_WAKEUP);
static InterruptIn sBtn(PINMAP_GPIO_BTN);
static DigitalOut sPinTest(PINMAP_GPIO_TEST);
@@ -78,6 +80,7 @@
locConfig.pSerialLoc = &sSerialLoc;
locConfig.pPinOnoff = &sPinOnoff;
locConfig.pPinReset = &sPinReset;
+ locConfig.pWakeup = &sWakeup;
/* new the CsrLocation instance */
pCsrLoc = new CsrLocation(&locConfig);
@@ -171,6 +174,10 @@
wait_ms(100);
sPinTest = 1;
break;
+ case APP_CMD_WAKEUP_STATUS:
+ CSR_APP_LOG_INFO("wakeup status : %d.\r\n", sWakeup.read());
+ sAppCmd = APP_CMD_IDLE;
+ break;
case APP_CMD_PTF_GETPOS:
CSR_APP_LOG_INFO("lpm get pos.\r\n");
sAppCmd = APP_CMD_IDLE;
@@ -375,6 +382,10 @@
{
sAppCmd = APP_CMD_PINTEST_OFF_ON;
}
+ else if(strcmp(pCmd, "iswakeup") == 0)
+ {
+ sAppCmd = APP_CMD_WAKEUP_STATUS;
+ }
else
{
CSR_APP_LOG_INFO("\r\nUnknown command %s\r\n", pCmd);

GPS mbed Shield