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: mbed
Diff: main.cpp
- Revision:
- 2:292acfb6a3af
- Parent:
- 1:5770646ab65b
--- a/main.cpp Thu Oct 01 20:30:58 2015 +0000
+++ b/main.cpp Fri Feb 26 16:52:18 2016 +0000
@@ -11,8 +11,16 @@
*/
#include "mbed.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);
int main() {
+ // Disable the battery charger unless a battery is attached.
+ bc_nce = 1;
+
// read digital pins D9 and D10 as a 2 pin bus
// the first pin is the LSB of the bus, the last is the MSB
BusIn bus(D9, D10);