Vybhav Kadaba
/
EV-PRO-MW1001_Development
added wait_us(31) in admw_spi.cpp to support hibernation mode
inc/admw1001/admw1001_api.h@6:9d393a9677f4, 2019-06-15 (annotated)
- Committer:
- Vkadaba
- Date:
- Sat Jun 15 14:30:49 2019 +0000
- Revision:
- 6:9d393a9677f4
- Parent:
- 5:0728bde67bdb
- Child:
- 8:2f2775c34640
Register map is updated and sensor config files are modified
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Vkadaba | 5:0728bde67bdb | 1 | /* |
Vkadaba | 5:0728bde67bdb | 2 | Copyright 2018 (c) Analog Devices, Inc. |
Vkadaba | 5:0728bde67bdb | 3 | |
Vkadaba | 5:0728bde67bdb | 4 | All rights reserved. |
Vkadaba | 5:0728bde67bdb | 5 | |
Vkadaba | 5:0728bde67bdb | 6 | Redistribution and use in source and binary forms, with or without |
Vkadaba | 5:0728bde67bdb | 7 | modification, are permitted provided that the following conditions are met: |
Vkadaba | 5:0728bde67bdb | 8 | - Redistributions of source code must retain the above copyright |
Vkadaba | 5:0728bde67bdb | 9 | notice, this list of conditions and the following disclaimer. |
Vkadaba | 5:0728bde67bdb | 10 | - Redistributions in binary form must reproduce the above copyright |
Vkadaba | 5:0728bde67bdb | 11 | notice, this list of conditions and the following disclaimer in |
Vkadaba | 5:0728bde67bdb | 12 | the documentation and/or other materials provided with the |
Vkadaba | 5:0728bde67bdb | 13 | distribution. |
Vkadaba | 5:0728bde67bdb | 14 | - Neither the name of Analog Devices, Inc. nor the names of its |
Vkadaba | 5:0728bde67bdb | 15 | contributors may be used to endorse or promote products derived |
Vkadaba | 5:0728bde67bdb | 16 | from this software without specific prior written permission. |
Vkadaba | 5:0728bde67bdb | 17 | - The use of this software may or may not infringe the patent rights |
Vkadaba | 5:0728bde67bdb | 18 | of one or more patent holders. This license does not release you |
Vkadaba | 5:0728bde67bdb | 19 | from the requirement that you obtain separate licenses from these |
Vkadaba | 5:0728bde67bdb | 20 | patent holders to use this software. |
Vkadaba | 5:0728bde67bdb | 21 | - Use of the software either in source or binary form, must be run |
Vkadaba | 5:0728bde67bdb | 22 | on or directly connected to an Analog Devices Inc. component. |
Vkadaba | 5:0728bde67bdb | 23 | |
Vkadaba | 5:0728bde67bdb | 24 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR |
Vkadaba | 5:0728bde67bdb | 25 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
Vkadaba | 5:0728bde67bdb | 26 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
Vkadaba | 5:0728bde67bdb | 27 | IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, |
Vkadaba | 5:0728bde67bdb | 28 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
Vkadaba | 5:0728bde67bdb | 29 | LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR |
Vkadaba | 5:0728bde67bdb | 30 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Vkadaba | 5:0728bde67bdb | 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Vkadaba | 5:0728bde67bdb | 32 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Vkadaba | 5:0728bde67bdb | 33 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Vkadaba | 5:0728bde67bdb | 34 | */ |
Vkadaba | 5:0728bde67bdb | 35 | |
Vkadaba | 5:0728bde67bdb | 36 | /* |
Vkadaba | 5:0728bde67bdb | 37 | Copyright 2017 (c) Analog Devices, Inc. |
Vkadaba | 5:0728bde67bdb | 38 | |
Vkadaba | 5:0728bde67bdb | 39 | All rights reserved. |
Vkadaba | 5:0728bde67bdb | 40 | |
Vkadaba | 5:0728bde67bdb | 41 | Redistribution and use in source and binary forms, with or without |
Vkadaba | 5:0728bde67bdb | 42 | modification, are permitted provided that the following conditions are met: |
Vkadaba | 5:0728bde67bdb | 43 | - Redistributions of source code must retain the above copyright |
Vkadaba | 5:0728bde67bdb | 44 | notice, this list of conditions and the following disclaimer. |
Vkadaba | 5:0728bde67bdb | 45 | - Redistributions in binary form must reproduce the above copyright |
Vkadaba | 5:0728bde67bdb | 46 | notice, this list of conditions and the following disclaimer in |
Vkadaba | 5:0728bde67bdb | 47 | the documentation and/or other materials provided with the |
Vkadaba | 5:0728bde67bdb | 48 | distribution. |
Vkadaba | 5:0728bde67bdb | 49 | - Neither the name of Analog Devices, Inc. nor the names of its |
Vkadaba | 5:0728bde67bdb | 50 | contributors may be used to endorse or promote products derived |
Vkadaba | 5:0728bde67bdb | 51 | from this software without specific prior written permission. |
Vkadaba | 5:0728bde67bdb | 52 | - The use of this software may or may not infringe the patent rights |
Vkadaba | 5:0728bde67bdb | 53 | of one or more patent holders. This license does not release you |
Vkadaba | 5:0728bde67bdb | 54 | from the requirement that you obtain separate licenses from these |
Vkadaba | 5:0728bde67bdb | 55 | patent holders to use this software. |
Vkadaba | 5:0728bde67bdb | 56 | - Use of the software either in source or binary form, must be run |
Vkadaba | 5:0728bde67bdb | 57 | on or directly connected to an Analog Devices Inc. component. |
Vkadaba | 5:0728bde67bdb | 58 | |
Vkadaba | 5:0728bde67bdb | 59 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR |
Vkadaba | 5:0728bde67bdb | 60 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
Vkadaba | 5:0728bde67bdb | 61 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
Vkadaba | 6:9d393a9677f4 | 62 | IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,/* |
Vkadaba | 6:9d393a9677f4 | 63 | Copyright 2019 (c) Analog Devices, Inc. |
Vkadaba | 6:9d393a9677f4 | 64 | |
Vkadaba | 6:9d393a9677f4 | 65 | All rights reserved. |
Vkadaba | 6:9d393a9677f4 | 66 | |
Vkadaba | 6:9d393a9677f4 | 67 | Redistribution and use in source and binary forms, with or without |
Vkadaba | 6:9d393a9677f4 | 68 | modification, are permitted provided that the following conditions are met: |
Vkadaba | 6:9d393a9677f4 | 69 | - Redistributions of source code must retain the above copyright |
Vkadaba | 6:9d393a9677f4 | 70 | notice, this list of conditions and the following disclaimer. |
Vkadaba | 6:9d393a9677f4 | 71 | - Redistributions in binary form must reproduce the above copyright |
Vkadaba | 6:9d393a9677f4 | 72 | notice, this list of conditions and the following disclaimer in |
Vkadaba | 6:9d393a9677f4 | 73 | the documentation and/or other materials provided with the |
Vkadaba | 6:9d393a9677f4 | 74 | distribution. |
Vkadaba | 6:9d393a9677f4 | 75 | - Neither the name of Analog Devices, Inc. nor the names of its |
Vkadaba | 6:9d393a9677f4 | 76 | contributors may be used to endorse or promote products derived |
Vkadaba | 6:9d393a9677f4 | 77 | from this software without specific prior written permission. |
Vkadaba | 6:9d393a9677f4 | 78 | - The use of this software may or may not infringe the patent rights |
Vkadaba | 6:9d393a9677f4 | 79 | of one or more patent holders. This license does not release you |
Vkadaba | 6:9d393a9677f4 | 80 | from the requirement that you obtain separate licenses from these |
Vkadaba | 6:9d393a9677f4 | 81 | patent holders to use this software. |
Vkadaba | 6:9d393a9677f4 | 82 | - Use of the software either in source or binary form, must be run |
Vkadaba | 6:9d393a9677f4 | 83 | on or directly connected to an Analog Devices Inc. component. |
Vkadaba | 6:9d393a9677f4 | 84 | |
Vkadaba | 6:9d393a9677f4 | 85 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR |
Vkadaba | 6:9d393a9677f4 | 86 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
Vkadaba | 6:9d393a9677f4 | 87 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
Vkadaba | 5:0728bde67bdb | 88 | IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, |
Vkadaba | 5:0728bde67bdb | 89 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
Vkadaba | 5:0728bde67bdb | 90 | LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR |
Vkadaba | 5:0728bde67bdb | 91 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Vkadaba | 5:0728bde67bdb | 92 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Vkadaba | 5:0728bde67bdb | 93 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Vkadaba | 5:0728bde67bdb | 94 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Vkadaba | 6:9d393a9677f4 | 95 | */ |
Vkadaba | 5:0728bde67bdb | 96 | |
Vkadaba | 5:0728bde67bdb | 97 | /*! |
Vkadaba | 5:0728bde67bdb | 98 | ****************************************************************************** |
Vkadaba | 6:9d393a9677f4 | 99 | * @file: admw_1001_api.h |
Vkadaba | 6:9d393a9677f4 | 100 | * @brief: ADMW1001 Host Library Application Programming Interface (API) |
Vkadaba | 5:0728bde67bdb | 101 | *----------------------------------------------------------------------------- |
Vkadaba | 5:0728bde67bdb | 102 | */ |
Vkadaba | 5:0728bde67bdb | 103 | |
Vkadaba | 5:0728bde67bdb | 104 | #ifndef __ADMW1001_API_H__ |
Vkadaba | 5:0728bde67bdb | 105 | #define __ADMW1001_API_H__ |
Vkadaba | 5:0728bde67bdb | 106 | |
Vkadaba | 5:0728bde67bdb | 107 | #include "inc/admw_types.h" |
Vkadaba | 5:0728bde67bdb | 108 | #include "inc/admw_config_types.h" |
Vkadaba | 5:0728bde67bdb | 109 | #include "inc/admw_platform.h" |
Vkadaba | 5:0728bde67bdb | 110 | #include "inc/admw1001/admw1001_config.h" |
Vkadaba | 5:0728bde67bdb | 111 | #include "inc/admw1001/admw1001_lut_data.h" |
Vkadaba | 5:0728bde67bdb | 112 | |
Vkadaba | 5:0728bde67bdb | 113 | /*! @ingroup ADMW_Api */ |
Vkadaba | 5:0728bde67bdb | 114 | |
Vkadaba | 5:0728bde67bdb | 115 | /*! @defgroup ADMW1001_Api ADMW1001 Host Library API |
Vkadaba | 5:0728bde67bdb | 116 | * ADMW1001 device-specific API function prototypes. |
Vkadaba | 5:0728bde67bdb | 117 | * These are supplementary to the common ADMW Host Library API. |
Vkadaba | 5:0728bde67bdb | 118 | * @{ |
Vkadaba | 5:0728bde67bdb | 119 | */ |
Vkadaba | 5:0728bde67bdb | 120 | |
Vkadaba | 5:0728bde67bdb | 121 | #ifdef __cplusplus |
Vkadaba | 5:0728bde67bdb | 122 | extern "C" { |
Vkadaba | 5:0728bde67bdb | 123 | #endif |
Vkadaba | 5:0728bde67bdb | 124 | |
Vkadaba | 5:0728bde67bdb | 125 | /*! |
Vkadaba | 5:0728bde67bdb | 126 | * @brief Read one or more device registers at the specified register address. |
Vkadaba | 5:0728bde67bdb | 127 | * |
Vkadaba | 5:0728bde67bdb | 128 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 129 | * @param[in] nAddress Register map address to read from |
Vkadaba | 5:0728bde67bdb | 130 | * @param[out] pData Pointer to return the register map data |
Vkadaba | 5:0728bde67bdb | 131 | * @param[in] nLength Number of bytes of data to read from the register map |
Vkadaba | 5:0728bde67bdb | 132 | * |
Vkadaba | 5:0728bde67bdb | 133 | * @return Status |
Vkadaba | 5:0728bde67bdb | 134 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 135 | * |
Vkadaba | 5:0728bde67bdb | 136 | * @details Provides direct byte-level read access to the device register map. |
Vkadaba | 5:0728bde67bdb | 137 | * The size and format of the register(s) must be known. |
Vkadaba | 5:0728bde67bdb | 138 | * |
Vkadaba | 5:0728bde67bdb | 139 | * @note Reads from special "keyhole" or "FIFO" registers will be handled |
Vkadaba | 5:0728bde67bdb | 140 | * according to documentation for those registers. |
Vkadaba | 5:0728bde67bdb | 141 | */ |
Vkadaba | 5:0728bde67bdb | 142 | ADMW_RESULT admw1001_ReadRegister( |
Vkadaba | 6:9d393a9677f4 | 143 | ADMW_DEVICE_HANDLE const hDevice, |
Vkadaba | 6:9d393a9677f4 | 144 | uint16_t const nAddress, |
Vkadaba | 6:9d393a9677f4 | 145 | void * const pData, |
Vkadaba | 6:9d393a9677f4 | 146 | unsigned const nLength); |
Vkadaba | 6:9d393a9677f4 | 147 | /*! |
Vkadaba | 6:9d393a9677f4 | 148 | * @brief Read one or more device registers at the specified debug register address. |
Vkadaba | 6:9d393a9677f4 | 149 | * |
Vkadaba | 6:9d393a9677f4 | 150 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 6:9d393a9677f4 | 151 | * @param[in] nAddress Register map address to read from |
Vkadaba | 6:9d393a9677f4 | 152 | * @param[out] pData Pointer to return the register map data |
Vkadaba | 6:9d393a9677f4 | 153 | * @param[in] nLength Number of bytes of data to read from the register map |
Vkadaba | 6:9d393a9677f4 | 154 | * |
Vkadaba | 6:9d393a9677f4 | 155 | * @return Status |
Vkadaba | 6:9d393a9677f4 | 156 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 6:9d393a9677f4 | 157 | * |
Vkadaba | 6:9d393a9677f4 | 158 | * @details Provides direct byte-level read access to the device register map. |
Vkadaba | 6:9d393a9677f4 | 159 | * The size and format of the register(s) must be known. |
Vkadaba | 6:9d393a9677f4 | 160 | * |
Vkadaba | 6:9d393a9677f4 | 161 | * @note Reads from special "keyhole" or "FIFO" registers will be handled |
Vkadaba | 6:9d393a9677f4 | 162 | * according to documentation for those registers. |
Vkadaba | 6:9d393a9677f4 | 163 | */ |
Vkadaba | 6:9d393a9677f4 | 164 | ADMW_RESULT admw1001_Read_Debug_Register( |
Vkadaba | 5:0728bde67bdb | 165 | ADMW_DEVICE_HANDLE const hDevice, |
Vkadaba | 5:0728bde67bdb | 166 | uint16_t const nAddress, |
Vkadaba | 5:0728bde67bdb | 167 | void * const pData, |
Vkadaba | 5:0728bde67bdb | 168 | unsigned const nLength); |
Vkadaba | 5:0728bde67bdb | 169 | |
Vkadaba | 5:0728bde67bdb | 170 | /*! |
Vkadaba | 5:0728bde67bdb | 171 | * @brief Write one or more device registers at the specified register address. |
Vkadaba | 5:0728bde67bdb | 172 | * |
Vkadaba | 6:9d393a9677f4 | 173 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 174 | * @param[in] nAddress Register map address to read from |
Vkadaba | 5:0728bde67bdb | 175 | * @param[out] pData Pointer to return the register map data |
Vkadaba | 5:0728bde67bdb | 176 | * @param[in] nLength Number of bytes of data to read from the register map |
Vkadaba | 5:0728bde67bdb | 177 | * |
Vkadaba | 5:0728bde67bdb | 178 | * @return Status |
Vkadaba | 5:0728bde67bdb | 179 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 180 | * |
Vkadaba | 5:0728bde67bdb | 181 | * @details Provides direct byte-level write access to the device register map. |
Vkadaba | 5:0728bde67bdb | 182 | * The size and format of the register(s) must be known. |
Vkadaba | 5:0728bde67bdb | 183 | * |
Vkadaba | 5:0728bde67bdb | 184 | * @note Writes to read-only registers will be ignored by the device. |
Vkadaba | 5:0728bde67bdb | 185 | * @note Writes to special "keyhole" registers will be handled according to |
Vkadaba | 5:0728bde67bdb | 186 | * documentation for those registers. |
Vkadaba | 5:0728bde67bdb | 187 | */ |
Vkadaba | 5:0728bde67bdb | 188 | ADMW_RESULT admw1001_WriteRegister( |
Vkadaba | 5:0728bde67bdb | 189 | ADMW_DEVICE_HANDLE const hDevice, |
Vkadaba | 5:0728bde67bdb | 190 | uint16_t const nAddress, |
Vkadaba | 5:0728bde67bdb | 191 | void * const pData, |
Vkadaba | 5:0728bde67bdb | 192 | unsigned const nLength); |
Vkadaba | 5:0728bde67bdb | 193 | |
Vkadaba | 5:0728bde67bdb | 194 | /*! |
Vkadaba | 6:9d393a9677f4 | 195 | * @brief Write one or more device registers at the specified debug register address. |
Vkadaba | 6:9d393a9677f4 | 196 | * |
Vkadaba | 6:9d393a9677f4 | 197 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 6:9d393a9677f4 | 198 | * @param[in] nAddress Register map address to read from |
Vkadaba | 6:9d393a9677f4 | 199 | * @param[out] pData Pointer to return the register map data |
Vkadaba | 6:9d393a9677f4 | 200 | * @param[in] nLength Number of bytes of data to read from the register map |
Vkadaba | 6:9d393a9677f4 | 201 | * |
Vkadaba | 6:9d393a9677f4 | 202 | * @return Status |
Vkadaba | 6:9d393a9677f4 | 203 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 6:9d393a9677f4 | 204 | * |
Vkadaba | 6:9d393a9677f4 | 205 | * @details Provides direct byte-level write access to the device register map. |
Vkadaba | 6:9d393a9677f4 | 206 | * The size and format of the register(s) must be known. |
Vkadaba | 6:9d393a9677f4 | 207 | * |
Vkadaba | 6:9d393a9677f4 | 208 | */ |
Vkadaba | 6:9d393a9677f4 | 209 | ADMW_RESULT admw1001_Write_Debug_Register( |
Vkadaba | 6:9d393a9677f4 | 210 | ADMW_DEVICE_HANDLE const hDevice, |
Vkadaba | 6:9d393a9677f4 | 211 | uint16_t const nAddress, |
Vkadaba | 6:9d393a9677f4 | 212 | void * const pData, |
Vkadaba | 6:9d393a9677f4 | 213 | unsigned const nLength); |
Vkadaba | 6:9d393a9677f4 | 214 | /* |
Vkadaba | 5:0728bde67bdb | 215 | * @brief Update power configuration settings on the device. |
Vkadaba | 5:0728bde67bdb | 216 | * |
Vkadaba | 6:9d393a9677f4 | 217 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 218 | * @param[in] pPowerConfig Power configuration details |
Vkadaba | 5:0728bde67bdb | 219 | * |
Vkadaba | 5:0728bde67bdb | 220 | * @return Status |
Vkadaba | 5:0728bde67bdb | 221 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 222 | * |
Vkadaba | 5:0728bde67bdb | 223 | * @details Translates configuration details provided into device-specific |
Vkadaba | 5:0728bde67bdb | 224 | * register settings and updates device configuration registers. |
Vkadaba | 5:0728bde67bdb | 225 | * |
Vkadaba | 6:9d393a9677f4 | 226 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 227 | */ |
Vkadaba | 5:0728bde67bdb | 228 | ADMW_RESULT admw1001_SetPowerConfig( |
Vkadaba | 5:0728bde67bdb | 229 | ADMW_DEVICE_HANDLE hDevice, |
Vkadaba | 5:0728bde67bdb | 230 | ADMW1001_POWER_CONFIG *pPowerConfig); |
Vkadaba | 5:0728bde67bdb | 231 | |
Vkadaba | 5:0728bde67bdb | 232 | /*! |
Vkadaba | 5:0728bde67bdb | 233 | * @brief Update measurement configuration settings on the device. |
Vkadaba | 5:0728bde67bdb | 234 | * |
Vkadaba | 6:9d393a9677f4 | 235 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 236 | * @param[in] pMeasurementConfig Measurement configuration details |
Vkadaba | 5:0728bde67bdb | 237 | * |
Vkadaba | 5:0728bde67bdb | 238 | * @return Status |
Vkadaba | 5:0728bde67bdb | 239 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 240 | * |
Vkadaba | 5:0728bde67bdb | 241 | * @details Translates configuration details provided into device-specific |
Vkadaba | 5:0728bde67bdb | 242 | * register settings and updates device configuration registers. |
Vkadaba | 5:0728bde67bdb | 243 | * |
Vkadaba | 6:9d393a9677f4 | 244 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 245 | */ |
Vkadaba | 5:0728bde67bdb | 246 | ADMW_RESULT admw1001_SetMeasurementConfig( |
Vkadaba | 5:0728bde67bdb | 247 | ADMW_DEVICE_HANDLE hDevice, |
Vkadaba | 5:0728bde67bdb | 248 | ADMW1001_MEASUREMENT_CONFIG *pMeasurementConfig); |
Vkadaba | 5:0728bde67bdb | 249 | |
Vkadaba | 5:0728bde67bdb | 250 | /*! |
Vkadaba | 5:0728bde67bdb | 251 | * @brief Update diagnostics configuration settings on the device. |
Vkadaba | 5:0728bde67bdb | 252 | * |
Vkadaba | 6:9d393a9677f4 | 253 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 254 | * @param[in] pDiagnosticsConfig Diagnostics configuration details |
Vkadaba | 5:0728bde67bdb | 255 | * |
Vkadaba | 5:0728bde67bdb | 256 | * @return Status |
Vkadaba | 5:0728bde67bdb | 257 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 258 | * |
Vkadaba | 5:0728bde67bdb | 259 | * @details Translates configuration details provided into device-specific |
Vkadaba | 5:0728bde67bdb | 260 | * register settings and updates device configuration registers. |
Vkadaba | 5:0728bde67bdb | 261 | * |
Vkadaba | 6:9d393a9677f4 | 262 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 263 | */ |
Vkadaba | 5:0728bde67bdb | 264 | ADMW_RESULT admw1001_SetDiagnosticsConfig( |
Vkadaba | 5:0728bde67bdb | 265 | ADMW_DEVICE_HANDLE hDevice, |
Vkadaba | 5:0728bde67bdb | 266 | ADMW1001_DIAGNOSTICS_CONFIG *pDiagnosticsConfig); |
Vkadaba | 5:0728bde67bdb | 267 | |
Vkadaba | 5:0728bde67bdb | 268 | /*! |
Vkadaba | 5:0728bde67bdb | 269 | * @brief Update channel configuration settings for a specific channel. |
Vkadaba | 5:0728bde67bdb | 270 | * |
Vkadaba | 6:9d393a9677f4 | 271 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 272 | * @param[in] eChannelId Selects the channel to be updated |
Vkadaba | 5:0728bde67bdb | 273 | * @param[in] pChannelConfig Channel configuration details |
Vkadaba | 5:0728bde67bdb | 274 | * |
Vkadaba | 5:0728bde67bdb | 275 | * @return Status |
Vkadaba | 5:0728bde67bdb | 276 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 277 | * |
Vkadaba | 5:0728bde67bdb | 278 | * @details Translates configuration details provided into device-specific |
Vkadaba | 5:0728bde67bdb | 279 | * register settings and updates device configuration registers. |
Vkadaba | 5:0728bde67bdb | 280 | * Allows individual channel configuration details to be dynamically |
Vkadaba | 5:0728bde67bdb | 281 | * adjusted without rewriting the full device configuration. |
Vkadaba | 5:0728bde67bdb | 282 | * |
Vkadaba | 6:9d393a9677f4 | 283 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 284 | */ |
Vkadaba | 5:0728bde67bdb | 285 | ADMW_RESULT admw1001_SetChannelConfig( |
Vkadaba | 5:0728bde67bdb | 286 | ADMW_DEVICE_HANDLE hDevice, |
Vkadaba | 5:0728bde67bdb | 287 | ADMW1001_CHANNEL_ID eChannelId, |
Vkadaba | 5:0728bde67bdb | 288 | ADMW1001_CHANNEL_CONFIG *pChannelConfig); |
Vkadaba | 5:0728bde67bdb | 289 | |
Vkadaba | 5:0728bde67bdb | 290 | /*! |
Vkadaba | 5:0728bde67bdb | 291 | * @brief Update number of measurements-per-cycle for a specific channel. |
Vkadaba | 5:0728bde67bdb | 292 | * |
Vkadaba | 6:9d393a9677f4 | 293 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 294 | * @param[in] eChannelId Selects the channel to be updated |
Vkadaba | 5:0728bde67bdb | 295 | * @param[in] nMeasurementsPerCycle Specifies the number of measurements to be |
Vkadaba | 5:0728bde67bdb | 296 | * obtained from this channel in each |
Vkadaba | 5:0728bde67bdb | 297 | * measurement cycle. Set as 0 to disable the |
Vkadaba | 5:0728bde67bdb | 298 | * channel (omit from measurement cycle). |
Vkadaba | 5:0728bde67bdb | 299 | * |
Vkadaba | 5:0728bde67bdb | 300 | * @return Status |
Vkadaba | 5:0728bde67bdb | 301 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 302 | * |
Vkadaba | 5:0728bde67bdb | 303 | * @details Translates configuration details provided into device-specific |
Vkadaba | 5:0728bde67bdb | 304 | * register settings and updates device configuration registers. |
Vkadaba | 5:0728bde67bdb | 305 | * Allows individual channels to be dynamically enabled/disabled, and |
Vkadaba | 5:0728bde67bdb | 306 | * measurements-per-cycle to be adjusted. |
Vkadaba | 5:0728bde67bdb | 307 | * |
Vkadaba | 6:9d393a9677f4 | 308 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 309 | */ |
Vkadaba | 5:0728bde67bdb | 310 | ADMW_RESULT admw1001_SetChannelCount( |
Vkadaba | 5:0728bde67bdb | 311 | ADMW_DEVICE_HANDLE hDevice, |
Vkadaba | 5:0728bde67bdb | 312 | ADMW1001_CHANNEL_ID eChannelId, |
Vkadaba | 5:0728bde67bdb | 313 | uint32_t nMeasurementsPerCycle); |
Vkadaba | 5:0728bde67bdb | 314 | |
Vkadaba | 5:0728bde67bdb | 315 | /*! |
Vkadaba | 5:0728bde67bdb | 316 | * @brief Update priority level for a specific channel. |
Vkadaba | 5:0728bde67bdb | 317 | * |
Vkadaba | 6:9d393a9677f4 | 318 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 319 | * @param[in] eChannelId Selects the channel to be updated |
Vkadaba | 5:0728bde67bdb | 320 | * @param[in] ePriority Specifies the channel priority level |
Vkadaba | 5:0728bde67bdb | 321 | * |
Vkadaba | 5:0728bde67bdb | 322 | * @return Status |
Vkadaba | 5:0728bde67bdb | 323 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 324 | * |
Vkadaba | 5:0728bde67bdb | 325 | * @details Translates configuration details provided into device-specific |
Vkadaba | 5:0728bde67bdb | 326 | * register settings and updates device configuration registers. |
Vkadaba | 5:0728bde67bdb | 327 | * Allows individual channels to be dynamically re-prioritised. |
Vkadaba | 5:0728bde67bdb | 328 | * |
Vkadaba | 6:9d393a9677f4 | 329 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 330 | */ |
Vkadaba | 5:0728bde67bdb | 331 | ADMW_RESULT admw1001_SetChannelPriority( |
Vkadaba | 5:0728bde67bdb | 332 | ADMW_DEVICE_HANDLE hDevice, |
Vkadaba | 5:0728bde67bdb | 333 | ADMW1001_CHANNEL_ID eChannelId, |
Vkadaba | 5:0728bde67bdb | 334 | ADMW1001_CHANNEL_PRIORITY ePriority); |
Vkadaba | 5:0728bde67bdb | 335 | |
Vkadaba | 5:0728bde67bdb | 336 | /*! |
Vkadaba | 5:0728bde67bdb | 337 | * @brief Update the measurement threshold limits for a specified channel. |
Vkadaba | 5:0728bde67bdb | 338 | * |
Vkadaba | 6:9d393a9677f4 | 339 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 340 | * @param[in] eChannelId Selects the channel to be updated |
Vkadaba | 5:0728bde67bdb | 341 | * @param[in] fHighThresholdLimit Optional maximum threshold value for each |
Vkadaba | 5:0728bde67bdb | 342 | * processed sample, to be checked prior to |
Vkadaba | 5:0728bde67bdb | 343 | * publishing. A channel ALERT condition is |
Vkadaba | 5:0728bde67bdb | 344 | * raised if the processed value is higher than |
Vkadaba | 5:0728bde67bdb | 345 | * this threshold. Set to NaN if not required. |
Vkadaba | 5:0728bde67bdb | 346 | * @param[in] fLowThresholdLimit Optional minimum threshold value for each |
Vkadaba | 5:0728bde67bdb | 347 | * processed sample, to be checked prior to |
Vkadaba | 5:0728bde67bdb | 348 | * publishing. A channel ALERT condition is |
Vkadaba | 5:0728bde67bdb | 349 | * raised if the processed value is lower than |
Vkadaba | 5:0728bde67bdb | 350 | * this threshold. Set to NaN if not required. |
Vkadaba | 5:0728bde67bdb | 351 | * |
Vkadaba | 5:0728bde67bdb | 352 | * @return Status |
Vkadaba | 5:0728bde67bdb | 353 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 354 | * |
Vkadaba | 5:0728bde67bdb | 355 | * @details Translates configuration details provided into device-specific |
Vkadaba | 5:0728bde67bdb | 356 | * register settings and updates device configuration registers. |
Vkadaba | 5:0728bde67bdb | 357 | * Allows individual channel thresholds to be dynamically adjusted. |
Vkadaba | 5:0728bde67bdb | 358 | * |
Vkadaba | 6:9d393a9677f4 | 359 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 360 | */ |
Vkadaba | 5:0728bde67bdb | 361 | ADMW_RESULT admw1001_SetChannelThresholdLimits( |
Vkadaba | 5:0728bde67bdb | 362 | ADMW_DEVICE_HANDLE hDevice, |
Vkadaba | 5:0728bde67bdb | 363 | ADMW1001_CHANNEL_ID eChannelId, |
Vkadaba | 5:0728bde67bdb | 364 | float32_t fHighThresholdLimit, |
Vkadaba | 5:0728bde67bdb | 365 | float32_t fLowThresholdLimit); |
Vkadaba | 5:0728bde67bdb | 366 | |
Vkadaba | 5:0728bde67bdb | 367 | |
Vkadaba | 5:0728bde67bdb | 368 | /*! |
Vkadaba | 5:0728bde67bdb | 369 | * @brief Set a sensor specific parameter for a specified channel. |
Vkadaba | 5:0728bde67bdb | 370 | * |
Vkadaba | 6:9d393a9677f4 | 371 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 372 | * @param[in] eChannelId Selects the channel to be updated |
Vkadaba | 5:0728bde67bdb | 373 | * @param[in] fSensorParam Sensor specific parameter |
Vkadaba | 5:0728bde67bdb | 374 | * |
Vkadaba | 5:0728bde67bdb | 375 | * @return Status |
Vkadaba | 5:0728bde67bdb | 376 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 377 | * |
Vkadaba | 5:0728bde67bdb | 378 | * @details Translates configuration details provided into device-specific |
Vkadaba | 5:0728bde67bdb | 379 | * register settings and updates device configuration registers. |
Vkadaba | 5:0728bde67bdb | 380 | * Allows optional sensor-specific parameter to be specified |
Vkadaba | 5:0728bde67bdb | 381 | * |
Vkadaba | 6:9d393a9677f4 | 382 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 383 | */ |
Vkadaba | 5:0728bde67bdb | 384 | ADMW_RESULT admw1001_SetSensorParameter( |
Vkadaba | 5:0728bde67bdb | 385 | ADMW_DEVICE_HANDLE hDevice, |
Vkadaba | 5:0728bde67bdb | 386 | ADMW1001_CHANNEL_ID eChannelId, |
Vkadaba | 5:0728bde67bdb | 387 | float32_t fSensorParam); |
Vkadaba | 5:0728bde67bdb | 388 | /*! |
Vkadaba | 5:0728bde67bdb | 389 | * @brief Update the extra settling time for a specified channel. |
Vkadaba | 5:0728bde67bdb | 390 | * |
Vkadaba | 6:9d393a9677f4 | 391 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 392 | * @param[in] eChannelId Selects the channel to be updated |
Vkadaba | 5:0728bde67bdb | 393 | * @param[in] nSettlingTime A minimum settling time is applied internally for |
Vkadaba | 5:0728bde67bdb | 394 | * each channel, based on the sensor type. However, |
Vkadaba | 5:0728bde67bdb | 395 | * additional settling time (microseconds) can |
Vkadaba | 5:0728bde67bdb | 396 | * optionally be specified here. Set to 0 if not |
Vkadaba | 5:0728bde67bdb | 397 | * required. |
Vkadaba | 5:0728bde67bdb | 398 | * |
Vkadaba | 5:0728bde67bdb | 399 | * @return Status |
Vkadaba | 5:0728bde67bdb | 400 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 401 | * |
Vkadaba | 5:0728bde67bdb | 402 | * @details Translates configuration details provided into device-specific |
Vkadaba | 5:0728bde67bdb | 403 | * register settings and updates device configuration registers. |
Vkadaba | 5:0728bde67bdb | 404 | * Allows individual channel settling times to be dynamically adjusted. |
Vkadaba | 5:0728bde67bdb | 405 | * |
Vkadaba | 6:9d393a9677f4 | 406 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 407 | */ |
Vkadaba | 5:0728bde67bdb | 408 | ADMW_RESULT admw1001_SetChannelSettlingTime( |
Vkadaba | 5:0728bde67bdb | 409 | ADMW_DEVICE_HANDLE hDevice, |
Vkadaba | 5:0728bde67bdb | 410 | ADMW1001_CHANNEL_ID eChannelId, |
Vkadaba | 5:0728bde67bdb | 411 | uint32_t nSettlingTime); |
Vkadaba | 5:0728bde67bdb | 412 | |
Vkadaba | 5:0728bde67bdb | 413 | #ifdef __V2_3_CFG_FMT__ |
Vkadaba | 5:0728bde67bdb | 414 | /*! |
Vkadaba | 5:0728bde67bdb | 415 | * @brief Enable access to advanced sensor configuration options. |
Vkadaba | 5:0728bde67bdb | 416 | * |
Vkadaba | 6:9d393a9677f4 | 417 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 418 | * @param[in] key Key to unlock advanced access |
Vkadaba | 5:0728bde67bdb | 419 | * |
Vkadaba | 5:0728bde67bdb | 420 | * @return Status |
Vkadaba | 5:0728bde67bdb | 421 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 422 | * |
Vkadaba | 5:0728bde67bdb | 423 | * @details When the correct access key is provided, access to advanced sensor |
Vkadaba | 5:0728bde67bdb | 424 | * configuration options and use of advanced sensor types is enabled. |
Vkadaba | 5:0728bde67bdb | 425 | * |
Vkadaba | 6:9d393a9677f4 | 426 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 427 | */ |
Vkadaba | 5:0728bde67bdb | 428 | ADMW_RESULT admw1001_SetAdvancedAccess( |
Vkadaba | 5:0728bde67bdb | 429 | ADMW_DEVICE_HANDLE const hDevice, |
Vkadaba | 5:0728bde67bdb | 430 | ADMW1001_ADVANCED_ACCESS_KEY key); |
Vkadaba | 5:0728bde67bdb | 431 | #endif |
Vkadaba | 5:0728bde67bdb | 432 | |
Vkadaba | 5:0728bde67bdb | 433 | /*! |
Vkadaba | 5:0728bde67bdb | 434 | * @brief Assemble a list of separate Look-Up Tables into a single buffer |
Vkadaba | 5:0728bde67bdb | 435 | * |
Vkadaba | 5:0728bde67bdb | 436 | * @param[out] pLutBuffer Pointer to the Look-Up Table data buffer where |
Vkadaba | 5:0728bde67bdb | 437 | * the assembled Look-Up Table data will be placed |
Vkadaba | 5:0728bde67bdb | 438 | * @param[in] nLutBufferSize Allocated size, in bytes, of the output data buffer |
Vkadaba | 5:0728bde67bdb | 439 | * @param[in] nNumTables Number of tables to add to the Look-Up Table buffer |
Vkadaba | 5:0728bde67bdb | 440 | * @param[in] ppDesc Array of pointers to the table descriptors to be added |
Vkadaba | 5:0728bde67bdb | 441 | * @param[in] ppData Array of pointers to the table data to be added |
Vkadaba | 5:0728bde67bdb | 442 | * |
Vkadaba | 5:0728bde67bdb | 443 | * @return Status |
Vkadaba | 5:0728bde67bdb | 444 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 445 | * |
Vkadaba | 5:0728bde67bdb | 446 | * @details This utiliity function fills the Look-up Table header fields; then |
Vkadaba | 5:0728bde67bdb | 447 | * walks through the array of individual table descriptor and data |
Vkadaba | 5:0728bde67bdb | 448 | * pointers provided, appending (copying) each one to the Look-Up Table |
Vkadaba | 5:0728bde67bdb | 449 | * data buffer. The length and crc16 fields of each table descriptor |
Vkadaba | 5:0728bde67bdb | 450 | * will be calculated and filled by this function, but other fields in |
Vkadaba | 5:0728bde67bdb | 451 | * the descriptor structure must be filled by the caller beforehand. |
Vkadaba | 5:0728bde67bdb | 452 | * |
Vkadaba | 5:0728bde67bdb | 453 | * @note The assembled LUT data buffer filled by this function can then be |
Vkadaba | 5:0728bde67bdb | 454 | * written to the device memory using @ref admw1001_SetLutData. |
Vkadaba | 5:0728bde67bdb | 455 | */ |
Vkadaba | 5:0728bde67bdb | 456 | ADMW_RESULT admw1001_AssembleLutData( |
Vkadaba | 5:0728bde67bdb | 457 | ADMW1001_LUT * pLutBuffer, |
Vkadaba | 5:0728bde67bdb | 458 | unsigned nLutBufferSize, |
Vkadaba | 5:0728bde67bdb | 459 | unsigned const nNumTables, |
Vkadaba | 5:0728bde67bdb | 460 | ADMW1001_LUT_DESCRIPTOR * const ppDesc[], |
Vkadaba | 5:0728bde67bdb | 461 | ADMW1001_LUT_TABLE_DATA * const ppData[]); |
Vkadaba | 5:0728bde67bdb | 462 | |
Vkadaba | 5:0728bde67bdb | 463 | /*! |
Vkadaba | 5:0728bde67bdb | 464 | * @brief Write Look-Up Table data to the device memory |
Vkadaba | 5:0728bde67bdb | 465 | * |
Vkadaba | 6:9d393a9677f4 | 466 | * @param[in] hDevice ADMW1001 device context handle |
Vkadaba | 5:0728bde67bdb | 467 | * @param[out] pLutData Pointer to the Look-Up Table data structure |
Vkadaba | 5:0728bde67bdb | 468 | * |
Vkadaba | 5:0728bde67bdb | 469 | * @return Status |
Vkadaba | 5:0728bde67bdb | 470 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 471 | * |
Vkadaba | 5:0728bde67bdb | 472 | * @details Validates the Look-Up Table data format and loads it into |
Vkadaba | 5:0728bde67bdb | 473 | * device memory via dedicated keyhole registers. |
Vkadaba | 5:0728bde67bdb | 474 | * |
Vkadaba | 6:9d393a9677f4 | 475 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 476 | */ |
Vkadaba | 5:0728bde67bdb | 477 | ADMW_RESULT admw1001_SetLutData( |
Vkadaba | 5:0728bde67bdb | 478 | ADMW_DEVICE_HANDLE const hDevice, |
Vkadaba | 5:0728bde67bdb | 479 | ADMW1001_LUT * const pLutData); |
Vkadaba | 5:0728bde67bdb | 480 | |
Vkadaba | 5:0728bde67bdb | 481 | /*! |
Vkadaba | 5:0728bde67bdb | 482 | * @brief Write Look-Up Table raw data to the device memory |
Vkadaba | 5:0728bde67bdb | 483 | * |
Vkadaba | 6:9d393a9677f4 | 484 | * @param[in] hDevice ADMW device context handle |
Vkadaba | 5:0728bde67bdb | 485 | * @param[out] pLutData Pointer to the Look-Up Table raw data structure |
Vkadaba | 5:0728bde67bdb | 486 | * |
Vkadaba | 5:0728bde67bdb | 487 | * @return Status |
Vkadaba | 5:0728bde67bdb | 488 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 489 | * |
Vkadaba | 5:0728bde67bdb | 490 | * @details This can be used instead of @ref admw1001_SetLutData for |
Vkadaba | 5:0728bde67bdb | 491 | * loading LUT data from the alternative raw data format. See |
Vkadaba | 5:0728bde67bdb | 492 | * @ref admw1001_SetLutData for more information. |
Vkadaba | 5:0728bde67bdb | 493 | * |
Vkadaba | 6:9d393a9677f4 | 494 | * @note Settings are not applied until admw_ApplyConfigUpdates() is called |
Vkadaba | 5:0728bde67bdb | 495 | */ |
Vkadaba | 5:0728bde67bdb | 496 | ADMW_RESULT admw1001_SetLutDataRaw( |
Vkadaba | 5:0728bde67bdb | 497 | ADMW_DEVICE_HANDLE const hDevice, |
Vkadaba | 5:0728bde67bdb | 498 | ADMW1001_LUT_RAW * const pLutData); |
Vkadaba | 5:0728bde67bdb | 499 | |
Vkadaba | 5:0728bde67bdb | 500 | /*! |
Vkadaba | 5:0728bde67bdb | 501 | * @brief Get the number of samples available when DATAREADY status is asserted. |
Vkadaba | 5:0728bde67bdb | 502 | * |
Vkadaba | 6:9d393a9677f4 | 503 | * @param[in] hDevice ADMW device context handle |
Vkadaba | 5:0728bde67bdb | 504 | * @param[in] eMeasurementMode Must be set to the same value used for @ref |
Vkadaba | 6:9d393a9677f4 | 505 | * admw_StartMeasurement(). |
Vkadaba | 5:0728bde67bdb | 506 | * @param[out] peOperatingMode Pointer to return the configured operating mode |
Vkadaba | 5:0728bde67bdb | 507 | * @param[out] peDataReadyMode Pointer to return the configured data publishing mode |
Vkadaba | 5:0728bde67bdb | 508 | * @param[out] pnSamplesPerDataready Pointer to return the calculated number of samples |
Vkadaba | 5:0728bde67bdb | 509 | * available when DATAREADY is asserted |
Vkadaba | 5:0728bde67bdb | 510 | * @param[out] pnSamplesPerCycle Pointer to return the calculated number of samples |
Vkadaba | 5:0728bde67bdb | 511 | * produced per measurement cycle |
Vkadaba | 5:0728bde67bdb | 512 | * @param[out] pnBytesPerSample Pointer to return the size, in bytes, of each sample |
Vkadaba | 5:0728bde67bdb | 513 | * |
Vkadaba | 5:0728bde67bdb | 514 | * @return Status |
Vkadaba | 5:0728bde67bdb | 515 | * - #ADMW_SUCCESS Call completed successfully. |
Vkadaba | 5:0728bde67bdb | 516 | * |
Vkadaba | 5:0728bde67bdb | 517 | * @details Examines the current configuration settings in the device registers |
Vkadaba | 5:0728bde67bdb | 518 | * to calculate the number of samples available whenever the DATAREADY |
Vkadaba | 5:0728bde67bdb | 519 | * signal is asserted, along with other related information. This may |
Vkadaba | 5:0728bde67bdb | 520 | * be used to allocate buffers to store samples and to determine how |
Vkadaba | 5:0728bde67bdb | 521 | * many samples to retrieve whenever the DATAREADY status is asserted. |
Vkadaba | 5:0728bde67bdb | 522 | */ |
Vkadaba | 5:0728bde67bdb | 523 | ADMW_RESULT admw1001_GetDataReadyModeInfo( |
Vkadaba | 5:0728bde67bdb | 524 | ADMW_DEVICE_HANDLE const hDevice, |
Vkadaba | 5:0728bde67bdb | 525 | ADMW_MEASUREMENT_MODE const eMeasurementMode, |
Vkadaba | 5:0728bde67bdb | 526 | ADMW1001_OPERATING_MODE * const peOperatingMode, |
Vkadaba | 5:0728bde67bdb | 527 | ADMW1001_DATAREADY_MODE * const peDataReadyMode, |
Vkadaba | 5:0728bde67bdb | 528 | uint32_t * const pnSamplesPerDataready, |
Vkadaba | 5:0728bde67bdb | 529 | uint32_t * const pnSamplesPerCycle, |
Vkadaba | 5:0728bde67bdb | 530 | uint8_t * const pnBytesPerSample); |
Vkadaba | 5:0728bde67bdb | 531 | |
Vkadaba | 5:0728bde67bdb | 532 | #ifdef __cplusplus |
Vkadaba | 5:0728bde67bdb | 533 | } |
Vkadaba | 5:0728bde67bdb | 534 | #endif |
Vkadaba | 5:0728bde67bdb | 535 | |
Vkadaba | 5:0728bde67bdb | 536 | /*! |
Vkadaba | 5:0728bde67bdb | 537 | * @} |
Vkadaba | 5:0728bde67bdb | 538 | */ |
Vkadaba | 5:0728bde67bdb | 539 | |
Vkadaba | 6:9d393a9677f4 | 540 | #endif /* __ADMW1001_API_H__ */ |