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.

Committer:
sk398
Date:
Thu Feb 04 13:18:36 2016 +0000
Revision:
0:87f2d094bea3
Child:
1:a0209f182a64
Initial version, using DigitalOut types being passed into the class constructer

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sk398 0:87f2d094bea3 1 #include "mbed.h"
sk398 0:87f2d094bea3 2 #include "Latch_FET_Driver.h"
sk398 0:87f2d094bea3 3
sk398 0:87f2d094bea3 4 Latch_FET_Driver::Latch_FET_Driver(DigitalOut *Set, DigitalOut *Reset)
sk398 0:87f2d094bea3 5 {
sk398 0:87f2d094bea3 6 SetPin = Set;
sk398 0:87f2d094bea3 7 ResetPin = Reset;
sk398 0:87f2d094bea3 8 }
sk398 0:87f2d094bea3 9
sk398 0:87f2d094bea3 10 int Latch_FET_Driver::setOutput()
sk398 0:87f2d094bea3 11 {
sk398 0:87f2d094bea3 12 SetPin -> write(LOW);
sk398 0:87f2d094bea3 13 ResetPin = LOW;
sk398 0:87f2d094bea3 14
sk398 0:87f2d094bea3 15 return 0;
sk398 0:87f2d094bea3 16 }
sk398 0:87f2d094bea3 17