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.
Latch_FET_Driver.cpp@0:87f2d094bea3, 2016-02-04 (annotated)
- 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?
| User | Revision | Line number | New 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 |