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