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.
config.h
00001 00002 /** 00003 * @file config.h 00004 * @brief Config file for driver diag tool 00005 * @author Analog Devices Inc. 00006 * 00007 * For support please go to: 00008 * Github: https://github.com/analogdevicesinc/mbed-adi 00009 * Support: https://ez.analog.com/community/linux-device-drivers/microcontroller-no-os-drivers 00010 * More: https://wiki.analog.com/resources/tools-software/mbed-drivers-all 00011 00012 ******************************************************************************** 00013 * Copyright 2016(c) Analog Devices, Inc. 00014 * 00015 * All rights reserved. 00016 * 00017 * Redistribution and use in source and binary forms, with or without 00018 * modification, are permitted provided that the following conditions are met: 00019 * - Redistributions of source code must retain the above copyright 00020 * notice, this list of conditions and the following disclaimer. 00021 * - Redistributions in binary form must reproduce the above copyright 00022 * notice, this list of conditions and the following disclaimer in 00023 * the documentation and/or other materials provided with the 00024 * distribution. 00025 * - Neither the name of Analog Devices, Inc. nor the names of its 00026 * contributors may be used to endorse or promote products derived 00027 * from this software without specific prior written permission. 00028 * - The use of this software may or may not infringe the patent rights 00029 * of one or more patent holders. This license does not release you 00030 * from the requirement that you obtain separate licenses from these 00031 * patent holders to use this software. 00032 * - Use of the software either in source or binary form, must be run 00033 * on or directly connected to an Analog Devices Inc. component. 00034 * 00035 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR 00036 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, 00037 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00038 * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, 00039 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00040 * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR 00041 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00042 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00043 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00044 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00045 * 00046 ********************************************************************************/ 00047 00048 //#define AD7791_PRESENT 00049 //#define CN0216_PRESENT 00050 //#define AD7790_PRESENT 00051 //#define AD5270_PRESENT 00052 //#define CN0357_PRESENT 00053 //#define ADXL362_PRESENT 00054 //#define CN0398_PRESENT 00055 //#define CN0397_PRESENT 00056 #define CN0396_PRESENT 00057 //#define AD7124_PRESENT 00058 #define SPI_LOW_LEVEL 00059 00060 #ifdef AD7791_PRESENT 00061 #include "AD7791.h" 00062 #include "AD7791_Diag.h" 00063 #endif 00064 00065 #ifdef CN0216_PRESENT 00066 #include "CN0216.h" 00067 #include "CN0216_Diag.h" 00068 #endif 00069 00070 #ifdef AD7790_PRESENT 00071 #include "AD7790.h" 00072 #include "AD7790_Diag.h" 00073 #endif 00074 00075 #ifdef AD5270_PRESENT 00076 #include "AD5270.h" 00077 #include "AD5270_Diag.h" 00078 #endif 00079 00080 #ifdef CN0357_PRESENT 00081 #include "CN0357.h" 00082 #include "CN0357_Diag.h" 00083 #endif 00084 00085 #ifdef ADXL362_PRESENT 00086 #include "ADXL362.h" 00087 #include "ADXL362_Diag.h" 00088 #endif 00089 00090 #ifdef AD7124_PRESENT 00091 #include "AD7124.h" 00092 #include "AD7124_Diag.h" 00093 #endif 00094 00095 #ifdef CN0398_PRESENT 00096 #include "CN0398.h" 00097 #include "CN0398_Diag.h" 00098 #endif 00099 00100 00101 #ifdef CN0397_PRESENT 00102 #include "CN0397.h" 00103 #include "CN0397_Diag.h" 00104 #endif 00105 00106 #ifdef CN0396_PRESENT 00107 #include "CN0396.h" 00108 #include "CN0396_Diag.h" 00109 #endif 00110 00111 using namespace std; 00112 //------------------------------------ 00113 // Hyperterminal configuration 00114 // 9600 bauds, 8-bit data, no parity 00115 //------------------------------------ 00116 00117 #ifdef SPI_LOW_LEVEL 00118 //DigitalOut CSA_pin(D8); // cs adc 00119 DigitalOut CSA_pin(D4); // cs accel 00120 DigitalOut CSR_pin(D6); // cs rdac 00121 SPI spibus(SPI_MOSI, SPI_MISO, SPI_SCK); 00122 #endif 00123 00124 #ifdef AD7791_PRESENT 00125 AD7791 ad7791(1.2, D8); 00126 AD7791_Diag ad7791diag(ad7791); 00127 #endif 00128 00129 #ifdef CN0216_PRESENT 00130 CN0216 cn0216; 00131 CN0216_Diag cn0216diag(cn0216); 00132 #endif 00133 00134 00135 #ifdef AD7790_PRESENT 00136 AD7790 ad7790(1.2, D8); 00137 AD7790_Diag ad7790diag(ad7790); 00138 #endif 00139 00140 #ifdef AD5270_PRESENT 00141 AD5270 ad5270(D6, 20000); 00142 AD5270_Diag ad5270diag(ad5270); 00143 #endif 00144 00145 #ifdef CN0357_PRESENT 00146 CN0357 cn0357; 00147 CN0357_Diag cn0357diag(cn0357); 00148 #endif 00149 00150 00151 #ifdef ADXL362_PRESENT 00152 ADXL362 adxl362(D9); 00153 ADXL362_Diag adxl362diag(adxl362); 00154 #endif 00155 00156 00157 #ifdef AD7124_PRESENT 00158 AD7124 ad7124(D10); 00159 AD7124_Diag ad7124diag(ad7124); 00160 #endif 00161 00162 #ifdef CN0398_PRESENT 00163 CN0398 cn0398(D10); 00164 CN0398_Diag cn0398diag(cn0398); 00165 00166 #endif 00167 00168 #ifdef CN0397_PRESENT 00169 CN0397 cn0397(D10); 00170 CN0397_Diag cn0397diag(cn0397); 00171 #endif 00172 00173 #ifdef CN0396_PRESENT 00174 #include "AD5270_Diag.h" 00175 CN0396 cn0396(D10, D6, D4); 00176 CN0396_Diag cn0396diag(cn0396); 00177 AD5270_Diag ad5270diag(cn0396.rdac); 00178 #endif
Generated on Tue Jul 12 2022 17:59:52 by
1.7.2
CN0357 - Toxic gas measurement
CN0216 - Weight Scale