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 Impedance_Fast_Circuitry by
Diff: pdb.cpp
- 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)