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
Diff: examples/drvdiag/driver_wrapper/cn0216_diag.cpp
- Revision:
- 24:dae7123d432a
- Parent:
- 23:174dd32fa661
- Child:
- 25:b9e3756c9cbb
- Child:
- 26:1b988c505139
- Child:
- 27:3c32495708f4
--- a/examples/drvdiag/driver_wrapper/cn0216_diag.cpp Tue May 17 18:37:29 2016 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#include "mbed.h"
-#include <stdio.h>
-#include <vector>
-#include <string>
-
-#include "cn0216_diag.h"
-
-extern Serial pc;
-extern vector<string> cmdbuffer;
-
-CN0216_Diag::CN0216_Diag(CN0216& cn) : dut(cn)
-{
-
-}
-
-void CN0216_Diag::init(void)
-{
- uint16_t weight = strtol(cmdbuffer[1].c_str(), NULL, 10);
- pc.printf("CN0216 initialized with %d calibration weight", weight);
- dut.init(weight);
-}
-
-void CN0216_Diag::calibrate(void)
-{
- uint8_t step = strtol(cmdbuffer[1].c_str(), NULL, 16);
- pc.printf("Calibrating step %d ..", step);
- dut.calibrate(static_cast<CN0216::CalibrationStep_t>(step));
- pc.printf(".. DONE", step);
-}
-
-void CN0216_Diag::read_weight(void)
-{
- pc.printf("Read weight is %f", dut.read_weight());
-}
-
CN0357 - Toxic gas measurement
CN0216 - Weight Scale