MultiTech / Mbed 2 deprecated Dragonfly_DigitalOut_BusOut_Example

Dependencies:   mbed

Revision:
1:b83ffc479876
Parent:
0:2c71706c23d3
diff -r 2c71706c23d3 -r b83ffc479876 main.cpp
--- a/main.cpp	Thu Oct 01 20:43:30 2015 +0000
+++ b/main.cpp	Fri Feb 26 16:53:04 2016 +0000
@@ -12,8 +12,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;
+    
     // write digital pins D9, D10, and D12 as a 3 pin bus
     // the first pin is the LSB of the bus, the last is the MSB
     BusOut bus(D9, D10, D12);