ADMW1001_Beta_Release
/
EV-PRO-MW1001_initialCommit
initial commit
i2c0_sensirionSHT3X_config.c@32:52445bef314d, 2019-10-25 (annotated)
- Committer:
- Vkadaba
- Date:
- Fri Oct 25 05:08:19 2019 +0000
- Revision:
- 32:52445bef314d
- Parent:
- 25:b278a215cf3b
- Child:
- 38:7604d3b44dd5
Register map updated.; Files changed:; 1. ADMW1001_REGISTERS.h; 2.ADMW1001_REGISTERS_typedefs.h; 3.admw_api.h; ; Changes are done to support the new register map. ; Files changed:; 1.utils.c; 2.admw1001.c; ; admw_spi.cpp file is changed to test DRDY issue ;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ADIJake | 0:85855ecd3257 | 1 | /* |
Vkadaba | 15:b5d57daeb7c0 | 2 | Copyright 2019 (c) Analog Devices, Inc. |
ADIJake | 0:85855ecd3257 | 3 | |
ADIJake | 0:85855ecd3257 | 4 | All rights reserved. |
ADIJake | 0:85855ecd3257 | 5 | |
ADIJake | 0:85855ecd3257 | 6 | Redistribution and use in source and binary forms, with or without |
ADIJake | 0:85855ecd3257 | 7 | modification, are permitted provided that the following conditions are met: |
ADIJake | 0:85855ecd3257 | 8 | - Redistributions of source code must retain the above copyright |
ADIJake | 0:85855ecd3257 | 9 | notice, this list of conditions and the following disclaimer. |
ADIJake | 0:85855ecd3257 | 10 | - Redistributions in binary form must reproduce the above copyright |
ADIJake | 0:85855ecd3257 | 11 | notice, this list of conditions and the following disclaimer in |
ADIJake | 0:85855ecd3257 | 12 | the documentation and/or other materials provided with the |
ADIJake | 0:85855ecd3257 | 13 | distribution. |
ADIJake | 0:85855ecd3257 | 14 | - Neither the name of Analog Devices, Inc. nor the names of its |
ADIJake | 0:85855ecd3257 | 15 | contributors may be used to endorse or promote products derived |
ADIJake | 0:85855ecd3257 | 16 | from this software without specific prior written permission. |
ADIJake | 0:85855ecd3257 | 17 | - The use of this software may or may not infringe the patent rights |
ADIJake | 0:85855ecd3257 | 18 | of one or more patent holders. This license does not release you |
ADIJake | 0:85855ecd3257 | 19 | from the requirement that you obtain separate licenses from these |
ADIJake | 0:85855ecd3257 | 20 | patent holders to use this software. |
ADIJake | 0:85855ecd3257 | 21 | - Use of the software either in source or binary form, must be run |
ADIJake | 0:85855ecd3257 | 22 | on or directly connected to an Analog Devices Inc. component. |
ADIJake | 0:85855ecd3257 | 23 | |
ADIJake | 0:85855ecd3257 | 24 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR |
ADIJake | 0:85855ecd3257 | 25 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
ADIJake | 0:85855ecd3257 | 26 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
ADIJake | 0:85855ecd3257 | 27 | IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, |
ADIJake | 0:85855ecd3257 | 28 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
ADIJake | 0:85855ecd3257 | 29 | LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR |
ADIJake | 0:85855ecd3257 | 30 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
ADIJake | 0:85855ecd3257 | 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
ADIJake | 0:85855ecd3257 | 32 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
ADIJake | 0:85855ecd3257 | 33 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
ADIJake | 0:85855ecd3257 | 34 | * |
ADIJake | 0:85855ecd3257 | 35 | *****************************************************************************/ |
ADIJake | 0:85855ecd3257 | 36 | |
ADIJake | 0:85855ecd3257 | 37 | /*! |
ADIJake | 0:85855ecd3257 | 38 | ****************************************************************************** |
ADIJake | 0:85855ecd3257 | 39 | * @file: |
ADIJake | 0:85855ecd3257 | 40 | * @brief: |
ADIJake | 0:85855ecd3257 | 41 | *----------------------------------------------------------------------------- |
ADIJake | 0:85855ecd3257 | 42 | */ |
Vkadaba | 5:0728bde67bdb | 43 | #include "admw_config_types.h" |
ADIJake | 0:85855ecd3257 | 44 | |
Vkadaba | 5:0728bde67bdb | 45 | ADMW_CONFIG i2c0_sensirionSHT3X_config = { |
Vkadaba | 13:97cb32670539 | 46 | .versionId = { .major = 2, .minor = 0 }, |
Vkadaba | 5:0728bde67bdb | 47 | .productId = ADMW_PRODUCT_ID_ADMW1001, |
Vkadaba | 5:0728bde67bdb | 48 | .admw1001 = { |
ADIJake | 0:85855ecd3257 | 49 | .power = { |
Vkadaba | 6:9d393a9677f4 | 50 | .powerMode = ADMW1001_POWER_MODE_ACTIVE, |
ADIJake | 0:85855ecd3257 | 51 | }, |
ADIJake | 0:85855ecd3257 | 52 | .measurement = { |
Vkadaba | 19:09d58952b65d | 53 | .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS, |
Vkadaba | 25:b278a215cf3b | 54 | .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, // FIX: Temporarily all values from json are hardcoded to this one in the Contracts.FileGenerator - > file translations!! |
Vkadaba | 25:b278a215cf3b | 55 | .cycleInterval = 0, |
Vkadaba | 25:b278a215cf3b | 56 | }, |
Vkadaba | 25:b278a215cf3b | 57 | .diagnostics = { |
Vkadaba | 25:b278a215cf3b | 58 | .disableGlobalDiag = true, |
Vkadaba | 25:b278a215cf3b | 59 | .disableMeasurementDiag = true, |
Vkadaba | 25:b278a215cf3b | 60 | .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED, |
ADIJake | 0:85855ecd3257 | 61 | }, |
ADIJake | 0:85855ecd3257 | 62 | .channels = { |
Vkadaba | 8:2f2775c34640 | 63 | [ADMW1001_CH_ID_DIG_I2C_0] = { |
ADIJake | 0:85855ecd3257 | 64 | .enableChannel = true, |
Vkadaba | 25:b278a215cf3b | 65 | // .gain = ADMW1001_ADC_GAIN_1X, |
ADIJake | 0:85855ecd3257 | 66 | .disablePublishing = false, |
Vkadaba | 8:2f2775c34640 | 67 | .compensationChannel = ADMW1001_CH_ID_NONE, |
Vkadaba | 25:b278a215cf3b | 68 | .measurementUnit = ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED, |
Vkadaba | 25:b278a215cf3b | 69 | .measurementsPerCycle = 1, |
Vkadaba | 25:b278a215cf3b | 70 | .extraSettlingTime = 99500.0014663674, |
ADIJake | 0:85855ecd3257 | 71 | .i2cChannelConfig = { |
Vkadaba | 8:2f2775c34640 | 72 | .sensor = ADMW1001_I2C_SENSOR_HUMIDITY_B, |
ADIJake | 0:85855ecd3257 | 73 | }, |
Vkadaba | 25:b278a215cf3b | 74 | } |
ADIJake | 0:85855ecd3257 | 75 | }, |
ADIJake | 0:85855ecd3257 | 76 | }, |
ADIJake | 0:85855ecd3257 | 77 | }; |
ADIJake | 0:85855ecd3257 | 78 |