![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
AdiSense1000_V21 MBED API
Fork of AdiSense1000 by
sensor1_rtd-3w-pt100_config.c@27:567abf893938, 2018-03-26 (annotated)
- Committer:
- Dan O'Donovan
- Date:
- Mon Mar 26 20:28:05 2018 +0100
- Branch:
- v2.0
- Revision:
- 27:567abf893938
- Parent:
- 25:c5bff546082f
- Child:
- 29:57edca10d78c
Adding host library and example code for v1.1 release
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Dan O'Donovan |
27:567abf893938 | 1 | /* |
danodonovan | 23:2adb6216b001 | 2 | Copyright 2017 (c) Analog Devices, Inc. |
kevin1990 | 12:97457cf77bcb | 3 | |
kevin1990 | 12:97457cf77bcb | 4 | All rights reserved. |
kevin1990 | 12:97457cf77bcb | 5 | |
danodonovan | 23:2adb6216b001 | 6 | Redistribution and use in source and binary forms, with or without |
danodonovan | 23:2adb6216b001 | 7 | modification, are permitted provided that the following conditions are met: |
danodonovan | 23:2adb6216b001 | 8 | - Redistributions of source code must retain the above copyright |
danodonovan | 23:2adb6216b001 | 9 | notice, this list of conditions and the following disclaimer. |
danodonovan | 23:2adb6216b001 | 10 | - Redistributions in binary form must reproduce the above copyright |
danodonovan | 23:2adb6216b001 | 11 | notice, this list of conditions and the following disclaimer in |
danodonovan | 23:2adb6216b001 | 12 | the documentation and/or other materials provided with the |
danodonovan | 23:2adb6216b001 | 13 | distribution. |
kevin1990 | 12:97457cf77bcb | 14 | - Neither the name of Analog Devices, Inc. nor the names of its |
kevin1990 | 12:97457cf77bcb | 15 | contributors may be used to endorse or promote products derived |
kevin1990 | 12:97457cf77bcb | 16 | from this software without specific prior written permission. |
danodonovan | 23:2adb6216b001 | 17 | - The use of this software may or may not infringe the patent rights |
danodonovan | 23:2adb6216b001 | 18 | of one or more patent holders. This license does not release you |
danodonovan | 23:2adb6216b001 | 19 | from the requirement that you obtain separate licenses from these |
danodonovan | 23:2adb6216b001 | 20 | patent holders to use this software. |
danodonovan | 23:2adb6216b001 | 21 | - Use of the software either in source or binary form, must be run |
danodonovan | 23:2adb6216b001 | 22 | on or directly connected to an Analog Devices Inc. component. |
kevin1990 | 12:97457cf77bcb | 23 | |
danodonovan | 23:2adb6216b001 | 24 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR |
danodonovan | 23:2adb6216b001 | 25 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
danodonovan | 23:2adb6216b001 | 26 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
danodonovan | 23:2adb6216b001 | 27 | IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, |
danodonovan | 23:2adb6216b001 | 28 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
danodonovan | 23:2adb6216b001 | 29 | LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR |
danodonovan | 23:2adb6216b001 | 30 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
danodonovan | 23:2adb6216b001 | 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
danodonovan | 23:2adb6216b001 | 32 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
danodonovan | 23:2adb6216b001 | 33 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
kevin1990 | 12:97457cf77bcb | 34 | * |
kevin1990 | 12:97457cf77bcb | 35 | *****************************************************************************/ |
kevin1990 | 12:97457cf77bcb | 36 | |
Dan O'Donovan |
27:567abf893938 | 37 | /*! |
Dan O'Donovan |
27:567abf893938 | 38 | ****************************************************************************** |
Dan O'Donovan |
27:567abf893938 | 39 | * @file: |
Dan O'Donovan |
27:567abf893938 | 40 | * @brief: |
Dan O'Donovan |
27:567abf893938 | 41 | *----------------------------------------------------------------------------- |
Dan O'Donovan |
27:567abf893938 | 42 | */ |
kevin1990 | 12:97457cf77bcb | 43 | #include "inc/adi_sense_config_types.h" |
kevin1990 | 12:97457cf77bcb | 44 | |
kevin1990 | 12:97457cf77bcb | 45 | ADI_SENSE_CONFIG sensor1_rtd_3w_pt100_config = { |
kevin1990 | 12:97457cf77bcb | 46 | .versionId = { .major = 1, .minor = 4 }, |
danodonovan | 25:c5bff546082f | 47 | .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, |
kevin1990 | 12:97457cf77bcb | 48 | .adisense1000 = { |
kevin1990 | 12:97457cf77bcb | 49 | .power = { |
kevin1990 | 12:97457cf77bcb | 50 | .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, |
kevin1990 | 12:97457cf77bcb | 51 | }, |
kevin1990 | 12:97457cf77bcb | 52 | .measurement = { |
kevin1990 | 12:97457cf77bcb | 53 | .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, |
kevin1990 | 12:97457cf77bcb | 54 | .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, |
kevin1990 | 12:97457cf77bcb | 55 | }, |
kevin1990 | 12:97457cf77bcb | 56 | .channels = { |
kevin1990 | 12:97457cf77bcb | 57 | [ADI_SENSE_1000_CHANNEL_ID_CJC_0] = { |
kevin1990 | 12:97457cf77bcb | 58 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 59 | }, |
kevin1990 | 12:97457cf77bcb | 60 | [ADI_SENSE_1000_CHANNEL_ID_CJC_1] = { |
kevin1990 | 12:97457cf77bcb | 61 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 62 | }, |
kevin1990 | 12:97457cf77bcb | 63 | [ADI_SENSE_1000_CHANNEL_ID_SENSOR_0] = { |
kevin1990 | 12:97457cf77bcb | 64 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 65 | }, |
kevin1990 | 12:97457cf77bcb | 66 | [ADI_SENSE_1000_CHANNEL_ID_SENSOR_1] = { |
kevin1990 | 12:97457cf77bcb | 67 | .enableChannel = true, |
kevin1990 | 12:97457cf77bcb | 68 | .disablePublishing = false, |
kevin1990 | 12:97457cf77bcb | 69 | .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, |
kevin1990 | 12:97457cf77bcb | 70 | .measurementsPerCycle = 10, |
kevin1990 | 12:97457cf77bcb | 71 | .extraSettlingTime = 0, |
kevin1990 | 12:97457cf77bcb | 72 | .adcChannelConfig = { |
kevin1990 | 12:97457cf77bcb | 73 | .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_PT100_DEF_L1, |
kevin1990 | 12:97457cf77bcb | 74 | .gain = ADI_SENSE_1000_ADC_GAIN_8X, |
kevin1990 | 12:97457cf77bcb | 75 | .current = { |
kevin1990 | 12:97457cf77bcb | 76 | .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_250uA, |
kevin1990 | 12:97457cf77bcb | 77 | }, |
kevin1990 | 12:97457cf77bcb | 78 | .filter = { |
kevin1990 | 12:97457cf77bcb | 79 | .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, |
kevin1990 | 12:97457cf77bcb | 80 | }, |
kevin1990 | 12:97457cf77bcb | 81 | .reference = { |
kevin1990 | 12:97457cf77bcb | 82 | .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, |
kevin1990 | 12:97457cf77bcb | 83 | .disableBuffer = false, |
kevin1990 | 12:97457cf77bcb | 84 | }, |
kevin1990 | 12:97457cf77bcb | 85 | .enableVbias = false, |
kevin1990 | 12:97457cf77bcb | 86 | }, |
kevin1990 | 12:97457cf77bcb | 87 | }, |
kevin1990 | 12:97457cf77bcb | 88 | [ADI_SENSE_1000_CHANNEL_ID_SENSOR_2] = { |
kevin1990 | 12:97457cf77bcb | 89 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 90 | }, |
kevin1990 | 12:97457cf77bcb | 91 | [ADI_SENSE_1000_CHANNEL_ID_SENSOR_3] = { |
kevin1990 | 12:97457cf77bcb | 92 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 93 | }, |
kevin1990 | 12:97457cf77bcb | 94 | [ADI_SENSE_1000_CHANNEL_ID_VOLTAGE_0] = { |
kevin1990 | 12:97457cf77bcb | 95 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 96 | }, |
kevin1990 | 12:97457cf77bcb | 97 | [ADI_SENSE_1000_CHANNEL_ID_CURRENT_0] = { |
kevin1990 | 12:97457cf77bcb | 98 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 99 | }, |
kevin1990 | 12:97457cf77bcb | 100 | [ADI_SENSE_1000_CHANNEL_ID_I2C_0] = { |
kevin1990 | 12:97457cf77bcb | 101 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 102 | }, |
kevin1990 | 12:97457cf77bcb | 103 | [ADI_SENSE_1000_CHANNEL_ID_I2C_1] = { |
kevin1990 | 12:97457cf77bcb | 104 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 105 | }, |
kevin1990 | 12:97457cf77bcb | 106 | [ADI_SENSE_1000_CHANNEL_ID_SPI_0] = { |
kevin1990 | 12:97457cf77bcb | 107 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 108 | }, |
kevin1990 | 12:97457cf77bcb | 109 | [ADI_SENSE_1000_CHANNEL_ID_SPI_1] = { |
kevin1990 | 12:97457cf77bcb | 110 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 111 | }, |
kevin1990 | 12:97457cf77bcb | 112 | [ADI_SENSE_1000_CHANNEL_ID_SPI_2] = { |
kevin1990 | 12:97457cf77bcb | 113 | .enableChannel = false, |
kevin1990 | 12:97457cf77bcb | 114 | }, |
kevin1990 | 12:97457cf77bcb | 115 | }, |
kevin1990 | 12:97457cf77bcb | 116 | }, |
kevin1990 | 12:97457cf77bcb | 117 | }; |