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/config.h@7:b62398a1d17a, 2016-04-20 (annotated)
- Committer:
- Adrian Suciu
- Date:
- Wed Apr 20 16:35:44 2016 +0300
- Revision:
- 7:b62398a1d17a
- Child:
- 8:6e96c6b3c83f
Added drvdiag tool
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Adrian Suciu |
7:b62398a1d17a | 1 | |
Adrian Suciu |
7:b62398a1d17a | 2 | #define AD7790_PRESENT |
Adrian Suciu |
7:b62398a1d17a | 3 | #define AD5270_PRESENT |
Adrian Suciu |
7:b62398a1d17a | 4 | #define CN0357_PRESENT |
Adrian Suciu |
7:b62398a1d17a | 5 | #define SPI_LOW_LEVEL |
Adrian Suciu |
7:b62398a1d17a | 6 | |
Adrian Suciu |
7:b62398a1d17a | 7 | #ifdef AD7790_PRESENT |
Adrian Suciu |
7:b62398a1d17a | 8 | #include "AD7790.h" |
Adrian Suciu |
7:b62398a1d17a | 9 | #include "ad7790_diag.h" |
Adrian Suciu |
7:b62398a1d17a | 10 | #endif |
Adrian Suciu |
7:b62398a1d17a | 11 | |
Adrian Suciu |
7:b62398a1d17a | 12 | #ifdef AD5270_PRESENT |
Adrian Suciu |
7:b62398a1d17a | 13 | #include "ad5270.h" |
Adrian Suciu |
7:b62398a1d17a | 14 | #include "ad5270_diag.h" |
Adrian Suciu |
7:b62398a1d17a | 15 | #endif |
Adrian Suciu |
7:b62398a1d17a | 16 | |
Adrian Suciu |
7:b62398a1d17a | 17 | #ifdef CN0357_PRESENT |
Adrian Suciu |
7:b62398a1d17a | 18 | #include "cn0357.h" |
Adrian Suciu |
7:b62398a1d17a | 19 | #include "CN0357_Diag.h" |
Adrian Suciu |
7:b62398a1d17a | 20 | #endif |
Adrian Suciu |
7:b62398a1d17a | 21 | |
Adrian Suciu |
7:b62398a1d17a | 22 | using namespace std; |
Adrian Suciu |
7:b62398a1d17a | 23 | //------------------------------------ |
Adrian Suciu |
7:b62398a1d17a | 24 | // Hyperterminal configuration |
Adrian Suciu |
7:b62398a1d17a | 25 | // 9600 bauds, 8-bit data, no parity |
Adrian Suciu |
7:b62398a1d17a | 26 | //------------------------------------ |
Adrian Suciu |
7:b62398a1d17a | 27 | |
Adrian Suciu |
7:b62398a1d17a | 28 | #ifdef SPI_LOW_LEVEL |
Adrian Suciu |
7:b62398a1d17a | 29 | DigitalOut CSA_pin(D8); // cs adc |
Adrian Suciu |
7:b62398a1d17a | 30 | DigitalOut CSR_pin(D6); // cs rdac |
Adrian Suciu |
7:b62398a1d17a | 31 | SPI spibus(SPI_MOSI, SPI_MISO, SPI_SCK); |
Adrian Suciu |
7:b62398a1d17a | 32 | #endif |
Adrian Suciu |
7:b62398a1d17a | 33 | |
Adrian Suciu |
7:b62398a1d17a | 34 | #ifdef AD7790_PRESENT |
Adrian Suciu |
7:b62398a1d17a | 35 | AD7790 ad7790(1.2, D8); |
Adrian Suciu |
7:b62398a1d17a | 36 | AD7790_Diag ad7790diag(ad7790); |
Adrian Suciu |
7:b62398a1d17a | 37 | #endif |
Adrian Suciu |
7:b62398a1d17a | 38 | |
Adrian Suciu |
7:b62398a1d17a | 39 | #ifdef AD5270_PRESENT |
Adrian Suciu |
7:b62398a1d17a | 40 | AD5270 ad5270(D6, 20000); |
Adrian Suciu |
7:b62398a1d17a | 41 | AD5270_Diag ad5270diag(ad5270); |
Adrian Suciu |
7:b62398a1d17a | 42 | #endif |
Adrian Suciu |
7:b62398a1d17a | 43 | |
Adrian Suciu |
7:b62398a1d17a | 44 | #ifdef CN0357_PRESENT |
Adrian Suciu |
7:b62398a1d17a | 45 | CN0357 cn0357; |
Adrian Suciu |
7:b62398a1d17a | 46 | CN0357_Diag cn0357diag(cn0357); |
Adrian Suciu |
7:b62398a1d17a | 47 | #endif |