AdiSense1000_V21 MBED API

Fork of AdiSense1000 by PoC_Team

Committer:
danodonovan
Date:
Mon Jan 22 17:40:21 2018 +0000
Revision:
23:2adb6216b001
Parent:
15:78f3f517417f
Child:
25:c5bff546082f
Updating example to adisense1000 v1.0.1

Who changed what in which revision?

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