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 Dragonfly_Cellular_HTTPS_Example by
Diff: main.cpp
- Revision:
- 1:26b8af61d0ac
- Parent:
- 0:6ce1803b7a03
--- a/main.cpp	Wed Sep 30 19:08:10 2015 +0000
+++ b/main.cpp	Fri Feb 26 16:44:40 2016 +0000
@@ -9,6 +9,11 @@
 #include "mtsas.h"
 #include "ssl_certificates.h"
 
+// This line controls the regulator's battery charger.
+// BC_NCE = 0 enables the battery charger
+// BC_NCE = 1 disables the battery charger
+DigitalOut bc_nce(PB_2);
+
 bool init_mtsas();
 char* httpResToStr(HTTPResult res);
 
@@ -23,6 +28,9 @@
 bool radio_ok = false;
 
 int main() {
+    // Disable the battery charger unless a battery is attached.
+    bc_nce = 1;
+    
     // Change the baud rate of the debug port from the default 9600 to 115200.
     Serial debug(USBTX, USBRX);
     debug.baud(115200);
    