A collection of Analog Devices drivers for the mbed platform
For additional information check out the mbed page of the Analog Devices wiki: https://wiki.analog.com/resources/tools-software/mbed-drivers-all
examples/drvdiag/driver_wrapper/CN0397_Diag.cpp@33:c3ec596a29c2, 2016-11-07 (annotated)
- Committer:
- Adrian Suciu
- Date:
- Mon Nov 07 16:27:12 2016 +0200
- Revision:
- 33:c3ec596a29c2
Added CN0391, CN0396 and CN0397 shields
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Adrian Suciu |
33:c3ec596a29c2 | 1 | #include "CN0397_Diag.h" |
| Adrian Suciu |
33:c3ec596a29c2 | 2 | |
| Adrian Suciu |
33:c3ec596a29c2 | 3 | CN0397_Diag::CN0397_Diag(CN0397& ad) : |
| Adrian Suciu |
33:c3ec596a29c2 | 4 | dut(ad) |
| Adrian Suciu |
33:c3ec596a29c2 | 5 | { |
| Adrian Suciu |
33:c3ec596a29c2 | 6 | |
| Adrian Suciu |
33:c3ec596a29c2 | 7 | } |
| Adrian Suciu |
33:c3ec596a29c2 | 8 | |
| Adrian Suciu |
33:c3ec596a29c2 | 9 | void CN0397_Diag::init() |
| Adrian Suciu |
33:c3ec596a29c2 | 10 | { |
| Adrian Suciu |
33:c3ec596a29c2 | 11 | dut.init(); |
| Adrian Suciu |
33:c3ec596a29c2 | 12 | } |
| Adrian Suciu |
33:c3ec596a29c2 | 13 | |
| Adrian Suciu |
33:c3ec596a29c2 | 14 | void CN0397_Diag::reset() |
| Adrian Suciu |
33:c3ec596a29c2 | 15 | { |
| Adrian Suciu |
33:c3ec596a29c2 | 16 | dut.ad7798.reset(); |
| Adrian Suciu |
33:c3ec596a29c2 | 17 | } |
| Adrian Suciu |
33:c3ec596a29c2 | 18 | |
| Adrian Suciu |
33:c3ec596a29c2 | 19 | void CN0397_Diag::read() |
| Adrian Suciu |
33:c3ec596a29c2 | 20 | { |
| Adrian Suciu |
33:c3ec596a29c2 | 21 | dut.set_app_data(); |
| Adrian Suciu |
33:c3ec596a29c2 | 22 | dut.display_data(); |
| Adrian Suciu |
33:c3ec596a29c2 | 23 | } |
| Adrian Suciu |
33:c3ec596a29c2 | 24 |
CN0357 - Toxic gas measurement
CN0216 - Weight Scale