Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
i2c0_onsemiNOA1305_config.c@0:85855ecd3257, 2019-04-01 (annotated)
- Committer:
 - ADIJake
 - Date:
 - Mon Apr 01 11:09:52 2019 +0000
 - Revision:
 - 0:85855ecd3257
 
Initial Commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| ADIJake | 0:85855ecd3257 | 1 | /* | 
| ADIJake | 0:85855ecd3257 | 2 | Copyright 2018 (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 | Copyright 2017 (c) Analog Devices, Inc. | 
| ADIJake | 0:85855ecd3257 | 36 | |
| ADIJake | 0:85855ecd3257 | 37 | All rights reserved. | 
| ADIJake | 0:85855ecd3257 | 38 | |
| ADIJake | 0:85855ecd3257 | 39 | Redistribution and use in source and binary forms, with or without | 
| ADIJake | 0:85855ecd3257 | 40 | modification, are permitted provided that the following conditions are met: | 
| ADIJake | 0:85855ecd3257 | 41 | - Redistributions of source code must retain the above copyright | 
| ADIJake | 0:85855ecd3257 | 42 | notice, this list of conditions and the following disclaimer. | 
| ADIJake | 0:85855ecd3257 | 43 | - Redistributions in binary form must reproduce the above copyright | 
| ADIJake | 0:85855ecd3257 | 44 | notice, this list of conditions and the following disclaimer in | 
| ADIJake | 0:85855ecd3257 | 45 | the documentation and/or other materials provided with the | 
| ADIJake | 0:85855ecd3257 | 46 | distribution. | 
| ADIJake | 0:85855ecd3257 | 47 | - Neither the name of Analog Devices, Inc. nor the names of its | 
| ADIJake | 0:85855ecd3257 | 48 | contributors may be used to endorse or promote products derived | 
| ADIJake | 0:85855ecd3257 | 49 | from this software without specific prior written permission. | 
| ADIJake | 0:85855ecd3257 | 50 | - The use of this software may or may not infringe the patent rights | 
| ADIJake | 0:85855ecd3257 | 51 | of one or more patent holders. This license does not release you | 
| ADIJake | 0:85855ecd3257 | 52 | from the requirement that you obtain separate licenses from these | 
| ADIJake | 0:85855ecd3257 | 53 | patent holders to use this software. | 
| ADIJake | 0:85855ecd3257 | 54 | - Use of the software either in source or binary form, must be run | 
| ADIJake | 0:85855ecd3257 | 55 | on or directly connected to an Analog Devices Inc. component. | 
| ADIJake | 0:85855ecd3257 | 56 | |
| ADIJake | 0:85855ecd3257 | 57 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR | 
| ADIJake | 0:85855ecd3257 | 58 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, | 
| ADIJake | 0:85855ecd3257 | 59 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 
| ADIJake | 0:85855ecd3257 | 60 | IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, | 
| ADIJake | 0:85855ecd3257 | 61 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 
| ADIJake | 0:85855ecd3257 | 62 | LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR | 
| ADIJake | 0:85855ecd3257 | 63 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | 
| ADIJake | 0:85855ecd3257 | 64 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | 
| ADIJake | 0:85855ecd3257 | 65 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 
| ADIJake | 0:85855ecd3257 | 66 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 
| ADIJake | 0:85855ecd3257 | 67 | * | 
| ADIJake | 0:85855ecd3257 | 68 | *****************************************************************************/ | 
| ADIJake | 0:85855ecd3257 | 69 | |
| ADIJake | 0:85855ecd3257 | 70 | /*! | 
| ADIJake | 0:85855ecd3257 | 71 | ****************************************************************************** | 
| ADIJake | 0:85855ecd3257 | 72 | * @file: | 
| ADIJake | 0:85855ecd3257 | 73 | * @brief: | 
| ADIJake | 0:85855ecd3257 | 74 | *----------------------------------------------------------------------------- | 
| ADIJake | 0:85855ecd3257 | 75 | */ | 
| ADIJake | 0:85855ecd3257 | 76 | #include "adi_sense_config_types.h" | 
| ADIJake | 0:85855ecd3257 | 77 | |
| ADIJake | 0:85855ecd3257 | 78 | ADI_SENSE_CONFIG i2c0_onsemiNOA1305_config = { | 
| ADIJake | 0:85855ecd3257 | 79 | .versionId = { .major = 1, .minor = 4 }, | 
| ADIJake | 0:85855ecd3257 | 80 | .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, | 
| ADIJake | 0:85855ecd3257 | 81 | .adisense1000 = { | 
| ADIJake | 0:85855ecd3257 | 82 | .power = { | 
| ADIJake | 0:85855ecd3257 | 83 | .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, | 
| ADIJake | 0:85855ecd3257 | 84 | }, | 
| ADIJake | 0:85855ecd3257 | 85 | .measurement = { | 
| ADIJake | 0:85855ecd3257 | 86 | .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, | 
| ADIJake | 0:85855ecd3257 | 87 | .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, | 
| ADIJake | 0:85855ecd3257 | 88 | }, | 
| ADIJake | 0:85855ecd3257 | 89 | .channels = { | 
| ADIJake | 0:85855ecd3257 | 90 | [ADI_SENSE_1000_CHANNEL_ID_I2C_0] = { | 
| ADIJake | 0:85855ecd3257 | 91 | .enableChannel = true, | 
| ADIJake | 0:85855ecd3257 | 92 | .disablePublishing = false, | 
| ADIJake | 0:85855ecd3257 | 93 | .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, | 
| ADIJake | 0:85855ecd3257 | 94 | .measurementsPerCycle = 10, | 
| ADIJake | 0:85855ecd3257 | 95 | .extraSettlingTime = 50000, | 
| ADIJake | 0:85855ecd3257 | 96 | .i2cChannelConfig = { | 
| ADIJake | 0:85855ecd3257 | 97 | .sensor = ADI_SENSE_1000_I2C_SENSOR_AMBIENTLIGHT_A_DEF_L1, | 
| ADIJake | 0:85855ecd3257 | 98 | .deviceAddress = 0x39, | 
| ADIJake | 0:85855ecd3257 | 99 | }, | 
| ADIJake | 0:85855ecd3257 | 100 | }, | 
| ADIJake | 0:85855ecd3257 | 101 | }, | 
| ADIJake | 0:85855ecd3257 | 102 | }, | 
| ADIJake | 0:85855ecd3257 | 103 | }; | 
| ADIJake | 0:85855ecd3257 | 104 |