Driver to control a peripheral circuit being controlled by the operation of a FET. Inbetween the mbed and FET is a single D type latch, used to latch a signal to the driver.
Diff: Latch_FET_Driver.cpp
- Revision:
- 1:a0209f182a64
- Parent:
- 0:87f2d094bea3
- Child:
- 2:9059b675917e
--- a/Latch_FET_Driver.cpp Thu Feb 04 13:18:36 2016 +0000 +++ b/Latch_FET_Driver.cpp Thu Feb 04 14:08:29 2016 +0000 @@ -1,15 +1,14 @@ #include "mbed.h" #include "Latch_FET_Driver.h" -Latch_FET_Driver::Latch_FET_Driver(DigitalOut *Set, DigitalOut *Reset) +Latch_FET_Driver::Latch_FET_Driver(PinName set,PinName reset) { - SetPin = Set; - ResetPin = Reset; + SetPin = new DigitalOut(set); + ResetPin = new DigitalOut(reset); } int Latch_FET_Driver::setOutput() { - SetPin -> write(LOW); ResetPin = LOW; return 0;