Sean Wilson
/
AdiSense1000_V21
AdiSense1000_V21 MBED API
Fork of AdiSense1000 by
i2c0_sensirionSHT3X_config.c@15:78f3f517417f, 2017-12-05 (annotated)
- Committer:
- kevin1990
- Date:
- Tue Dec 05 19:07:05 2017 +0000
- Revision:
- 15:78f3f517417f
- Child:
- 23:2adb6216b001
v1.0_RC2 Release
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kevin1990 | 15:78f3f517417f | 1 | /*! |
kevin1990 | 15:78f3f517417f | 2 | ****************************************************************************** |
kevin1990 | 15:78f3f517417f | 3 | * @file: i2c0_sensirionSHT3X_config.cpp |
kevin1990 | 15:78f3f517417f | 4 | * @brief: |
kevin1990 | 15:78f3f517417f | 5 | *----------------------------------------------------------------------------- |
kevin1990 | 15:78f3f517417f | 6 | * |
kevin1990 | 15:78f3f517417f | 7 | Copyright (c) 2017 Emutex Ltd. / Analog Devices, Inc. |
kevin1990 | 15:78f3f517417f | 8 | |
kevin1990 | 15:78f3f517417f | 9 | All rights reserved. |
kevin1990 | 15:78f3f517417f | 10 | |
kevin1990 | 15:78f3f517417f | 11 | Redistribution and use in source and binary forms, with or without modification, |
kevin1990 | 15:78f3f517417f | 12 | are permitted provided that the following conditions are met: |
kevin1990 | 15:78f3f517417f | 13 | - Redistributions of source code must retain the above copyright notice, |
kevin1990 | 15:78f3f517417f | 14 | this list of conditions and the following disclaimer. |
kevin1990 | 15:78f3f517417f | 15 | - Redistributions in binary form must reproduce the above copyright notice, |
kevin1990 | 15:78f3f517417f | 16 | this list of conditions and the following disclaimer in the documentation |
kevin1990 | 15:78f3f517417f | 17 | and/or other materials provided with the distribution. |
kevin1990 | 15:78f3f517417f | 18 | - Modified versions of the software must be conspicuously marked as such. |
kevin1990 | 15:78f3f517417f | 19 | - This software is licensed solely and exclusively for use with processors |
kevin1990 | 15:78f3f517417f | 20 | manufactured by or for Analog Devices, Inc. |
kevin1990 | 15:78f3f517417f | 21 | - This software may not be combined or merged with other code in any manner |
kevin1990 | 15:78f3f517417f | 22 | that would cause the software to become subject to terms and conditions |
kevin1990 | 15:78f3f517417f | 23 | which differ from those listed here. |
kevin1990 | 15:78f3f517417f | 24 | - Neither the name of Analog Devices, Inc. nor the names of its |
kevin1990 | 15:78f3f517417f | 25 | contributors may be used to endorse or promote products derived |
kevin1990 | 15:78f3f517417f | 26 | from this software without specific prior written permission. |
kevin1990 | 15:78f3f517417f | 27 | - The use of this software may or may not infringe the patent rights of one |
kevin1990 | 15:78f3f517417f | 28 | or more patent holders. This license does not release you from the |
kevin1990 | 15:78f3f517417f | 29 | requirement that you obtain separate licenses from these patent holders |
kevin1990 | 15:78f3f517417f | 30 | to use this software. |
kevin1990 | 15:78f3f517417f | 31 | |
kevin1990 | 15:78f3f517417f | 32 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY |
kevin1990 | 15:78f3f517417f | 33 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
kevin1990 | 15:78f3f517417f | 34 | TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN |
kevin1990 | 15:78f3f517417f | 35 | NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
kevin1990 | 15:78f3f517417f | 36 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES |
kevin1990 | 15:78f3f517417f | 37 | (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL |
kevin1990 | 15:78f3f517417f | 38 | PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
kevin1990 | 15:78f3f517417f | 39 | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
kevin1990 | 15:78f3f517417f | 40 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
kevin1990 | 15:78f3f517417f | 41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
kevin1990 | 15:78f3f517417f | 42 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
kevin1990 | 15:78f3f517417f | 43 | * |
kevin1990 | 15:78f3f517417f | 44 | *****************************************************************************/ |
kevin1990 | 15:78f3f517417f | 45 | |
kevin1990 | 15:78f3f517417f | 46 | #include "inc/adi_sense_config_types.h" |
kevin1990 | 15:78f3f517417f | 47 | |
kevin1990 | 15:78f3f517417f | 48 | ADI_SENSE_CONFIG i2c0_sensirionSHT3X_config = { |
kevin1990 | 15:78f3f517417f | 49 | .versionId = { .major = 1, .minor = 4 }, |
kevin1990 | 15:78f3f517417f | 50 | .productId = ADI_SENSE_PRODUCT_ID_1000, |
kevin1990 | 15:78f3f517417f | 51 | .adisense1000 = { |
kevin1990 | 15:78f3f517417f | 52 | .power = { |
kevin1990 | 15:78f3f517417f | 53 | .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, |
kevin1990 | 15:78f3f517417f | 54 | .supplyVoltage = 3.3, |
kevin1990 | 15:78f3f517417f | 55 | }, |
kevin1990 | 15:78f3f517417f | 56 | .measurement = { |
kevin1990 | 15:78f3f517417f | 57 | .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, |
kevin1990 | 15:78f3f517417f | 58 | .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, |
kevin1990 | 15:78f3f517417f | 59 | }, |
kevin1990 | 15:78f3f517417f | 60 | .channels = { |
kevin1990 | 15:78f3f517417f | 61 | [ADI_SENSE_1000_CHANNEL_ID_CJC_0] = { |
kevin1990 | 15:78f3f517417f | 62 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 63 | }, |
kevin1990 | 15:78f3f517417f | 64 | [ADI_SENSE_1000_CHANNEL_ID_CJC_1] = { |
kevin1990 | 15:78f3f517417f | 65 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 66 | }, |
kevin1990 | 15:78f3f517417f | 67 | [ADI_SENSE_1000_CHANNEL_ID_SENSOR_0] = { |
kevin1990 | 15:78f3f517417f | 68 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 69 | }, |
kevin1990 | 15:78f3f517417f | 70 | [ADI_SENSE_1000_CHANNEL_ID_SENSOR_1] = { |
kevin1990 | 15:78f3f517417f | 71 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 72 | }, |
kevin1990 | 15:78f3f517417f | 73 | [ADI_SENSE_1000_CHANNEL_ID_SENSOR_2] = { |
kevin1990 | 15:78f3f517417f | 74 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 75 | }, |
kevin1990 | 15:78f3f517417f | 76 | [ADI_SENSE_1000_CHANNEL_ID_SENSOR_3] = { |
kevin1990 | 15:78f3f517417f | 77 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 78 | }, |
kevin1990 | 15:78f3f517417f | 79 | [ADI_SENSE_1000_CHANNEL_ID_VOLTAGE_0] = { |
kevin1990 | 15:78f3f517417f | 80 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 81 | }, |
kevin1990 | 15:78f3f517417f | 82 | [ADI_SENSE_1000_CHANNEL_ID_CURRENT_0] = { |
kevin1990 | 15:78f3f517417f | 83 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 84 | }, |
kevin1990 | 15:78f3f517417f | 85 | [ADI_SENSE_1000_CHANNEL_ID_I2C_0] = { |
kevin1990 | 15:78f3f517417f | 86 | .enableChannel = true, |
kevin1990 | 15:78f3f517417f | 87 | .disablePublishing = false, |
kevin1990 | 15:78f3f517417f | 88 | .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, |
kevin1990 | 15:78f3f517417f | 89 | .measurementsPerCycle = 10, |
kevin1990 | 15:78f3f517417f | 90 | .extraSettlingTime = 15000, |
kevin1990 | 15:78f3f517417f | 91 | .i2cChannelConfig = { |
kevin1990 | 15:78f3f517417f | 92 | .sensor = ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_SENSIRION_SHT3X, |
kevin1990 | 15:78f3f517417f | 93 | .deviceAddress = 0x44, |
kevin1990 | 15:78f3f517417f | 94 | }, |
kevin1990 | 15:78f3f517417f | 95 | }, |
kevin1990 | 15:78f3f517417f | 96 | [ADI_SENSE_1000_CHANNEL_ID_I2C_1] = { |
kevin1990 | 15:78f3f517417f | 97 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 98 | }, |
kevin1990 | 15:78f3f517417f | 99 | [ADI_SENSE_1000_CHANNEL_ID_SPI_0] = { |
kevin1990 | 15:78f3f517417f | 100 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 101 | }, |
kevin1990 | 15:78f3f517417f | 102 | [ADI_SENSE_1000_CHANNEL_ID_SPI_1] = { |
kevin1990 | 15:78f3f517417f | 103 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 104 | }, |
kevin1990 | 15:78f3f517417f | 105 | [ADI_SENSE_1000_CHANNEL_ID_SPI_2] = { |
kevin1990 | 15:78f3f517417f | 106 | .enableChannel = false, |
kevin1990 | 15:78f3f517417f | 107 | }, |
kevin1990 | 15:78f3f517417f | 108 | }, |
kevin1990 | 15:78f3f517417f | 109 | }, |
kevin1990 | 15:78f3f517417f | 110 | }; |
kevin1990 | 15:78f3f517417f | 111 |