Jared Baxter / Mbed 2 deprecated Impedance_Fast_Circuitry_print_V_I

Dependencies:   mbed-dsp mbed

Fork of Impedance_Fast_Circuitry by Jared Baxter

Revision:
46:a015ebf4663b
Parent:
45:d591d138cdeb
Child:
47:54fafe151669
--- a/pdb.cpp	Sat Jan 31 07:25:52 2015 +0000
+++ b/pdb.cpp	Sat Jan 31 08:13:33 2015 +0000
@@ -53,8 +53,17 @@
     debug2.printf("PDB0_PO1DLY:   %08x\r\n",PDB0_PO1DLY);
     debug2.printf("PDB0_PO2DLY:   %08x\r\n\n",PDB0_PO2DLY);
     
+    NVIC_SetVector(PDB0_IRQn, (uint32_t)&PDB0_IRQHandler);
+    NVIC_EnableIRQ(PDB0_IRQn);
+    
 }
 
+
+void PDB0_IRQHandler() {
+    switcher = !switcher;
+}
+
+
 void pdb_start() {
     PDB0_SC |= PDB_SC_PDBEN_MASK;  // PDB enabled
     PDB0_SC |= PDB_SC_SWTRIG_MASK; // enable software trigger (start the PDB)