AdiSense1000_V21 MBED API

Fork of AdiSense1000 by PoC_Team

Committer:
kevin1990
Date:
Thu May 17 10:34:45 2018 +0100
Revision:
28:4eb837cd71df
Adding host library and example code for v1.3 release

Who changed what in which revision?

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