Handle an external interrupt using the MultiTech Dragonfly.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mfiore
Date:
Fri Feb 26 16:55:25 2016 +0000
Parent:
0:86bd3121e22f
Commit message:
Updated mbed library to revision 112, disable regulator's battery charger

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Oct 01 20:58:50 2015 +0000
+++ b/main.cpp	Fri Feb 26 16:55:25 2016 +0000
@@ -12,6 +12,11 @@
  
 #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);
+
 bool rise_flag = false;
 bool fall_flag = false;
 
@@ -24,6 +29,9 @@
 }
  
 int main() {
+    // Disable the battery charger unless a battery is attached.
+    bc_nce = 1;
+    
     InterruptIn in(D9);
     in.rise(&rise_handler);
     in.fall(&fall_handler);
--- a/mbed.bld	Thu Oct 01 20:58:50 2015 +0000
+++ b/mbed.bld	Fri Feb 26 16:55:25 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96
\ No newline at end of file