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.
Revision 53:52be2af62919, committed 2020-02-21
- Comitter:
- pimco01
- Date:
- Fri Feb 21 12:27:35 2020 +0000
- Parent:
- 52:46406cd9c64a
- Commit message:
- Cellular Power Off function add
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Jan 30 06:49:19 2020 +0000
+++ b/main.cpp Fri Feb 21 12:27:35 2020 +0000
@@ -41,7 +41,24 @@
ThisThread::sleep_for(5000);
if(BG96_STATUS)
- printf("Module Power On~~\r\n");
+ printf("Module Power On\r\n");
+ else
+ printf("Check Module Power Line!!\r\n");
+}
+
+void BG96_Modem_PowerOFF(void)
+{
+ DigitalIn BG96_STATUS(D2);
+ DigitalOut BG96_PWRKEY(D3);
+
+ ThisThread::sleep_for(50);
+ BG96_PWRKEY = 1;
+ ThisThread::sleep_for(800);
+ BG96_PWRKEY = 0;
+ ThisThread::sleep_for(3000);
+
+ if(BG96_STATUS == 0)
+ printf("Module Power Off\r\n");
else
printf("Check Module Power Line!!\r\n");
}