ADMW1001_Beta_Release
/
EV-PRO-MW1001_initialCommit
initial commit
Revision 5:0728bde67bdb, committed 2019-06-05
- Comitter:
- Vkadaba
- Date:
- Wed Jun 05 05:39:15 2019 +0000
- Parent:
- 4:2ca06eee5735
- Child:
- 6:9d393a9677f4
- Commit message:
- Replaced all references to ADISense/ADISENSE1000/adi_sense with ADMW/ADMW1001/admw and the prject builds.
Changed in this revision
--- a/cjc0_thermistor-10k-ntc_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG cjc0_thermistor_10k_ntc_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_CJC_0] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, - .measurementsPerCycle = 10, - .extraSettlingTime = 0, - .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_A_10K_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_1X, - .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, - }, - .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_2, - .disableBuffer = true, - }, - .enableVbias = false, - }, - }, - }, - }, -}; -
--- a/common/platform.h Tue Jun 04 10:09:11 2019 +0000 +++ b/common/platform.h Wed Jun 05 05:39:15 2019 +0000 @@ -1,8 +1,8 @@ #ifndef __PLATFORM_H__ #define __PLATFORM_H__ -#include "adi_sense_api.h" -#include "adi_sense_1000/adi_sense_1000_api.h" +#include "admw_api.h" +#include "admw1001/admw1001_api.h" #if defined (__MBED__) @@ -14,8 +14,7 @@ # define PLATFORM_SPI_SCK SPI_SCK # define PLATFORM_SPI_CS D9 # define PLATFORM_GPIO_RESET D6 -# define PLATFORM_GPIO_ERROR D2 -# define PLATFORM_GPIO_ALERT D3 +# define PLATFORM_GPIO_ALERT_ERROR D3 # define PLATFORM_GPIO_DATAREADY D4 # define PLATFORM_LOG_TX D1 # define PLATFORM_LOG_RX D0 @@ -25,8 +24,7 @@ # define PLATFORM_SPI_SCK SPI0_SCLK # define PLATFORM_SPI_CS D10 # define PLATFORM_GPIO_RESET D6 -# define PLATFORM_GPIO_ERROR D3 -# define PLATFORM_GPIO_ALERT D4 +# define PLATFORM_GPIO_ALERT_ERROR D3 # define PLATFORM_GPIO_DATAREADY D5 # define PLATFORM_LOG_TX D0 # define PLATFORM_LOG_RX D1 @@ -36,7 +34,7 @@ # define PLATFORM_CONNECTION_INFO \ { \ - .type = ADI_SENSE_CONNECTION_TYPE_SPI, \ + .type = ADMW_CONNECTION_TYPE_SPI, \ .spi = { \ .mosiPin = PLATFORM_SPI_MOSI, \ .misoPin = PLATFORM_SPI_MISO, \ @@ -46,8 +44,7 @@ }, \ .gpio = { \ .resetPin = PLATFORM_GPIO_RESET, \ - .errorPin = PLATFORM_GPIO_ERROR, \ - .alertPin = PLATFORM_GPIO_ALERT, \ + .alertErrorPin = PLATFORM_GPIO_ALERT_ERROR, \ .datareadyPin = PLATFORM_GPIO_DATAREADY,\ }, \ .log = { \
--- a/common/utils.c Tue Jun 04 10:09:11 2019 +0000 +++ b/common/utils.c Wed Jun 05 05:39:15 2019 +0000 @@ -1,111 +1,111 @@ #include <stdlib.h> #include "utils.h" -#include "adi_sense_log.h" +#include "admw_log.h" void utils_printStatus( - ADI_SENSE_STATUS *pStatus) + ADMW_STATUS *pStatus) { - ADI_SENSE_LOG_INFO("Status Summary:"); + ADMW_LOG_INFO("Status Summary:"); if (pStatus->deviceStatus == 0) { - ADI_SENSE_LOG_INFO("\tNo errors detected"); + ADMW_LOG_INFO("\tNo errors detected"); } else { - if (pStatus->deviceStatus & ADI_SENSE_DEVICE_STATUS_BUSY) - ADI_SENSE_LOG_INFO("\tCommand running"); - if (pStatus->deviceStatus & ADI_SENSE_DEVICE_STATUS_DATAREADY) - ADI_SENSE_LOG_INFO("\tData ready"); - if (pStatus->deviceStatus & ADI_SENSE_DEVICE_STATUS_ERROR) - ADI_SENSE_LOG_INFO("\tActive Errors - RESET REQUIRED"); - if (pStatus->deviceStatus & ADI_SENSE_DEVICE_STATUS_FIFO_ERROR) - ADI_SENSE_LOG_INFO("\tActive FIFO Errors - ATTENTION REQUIRED"); - if (pStatus->deviceStatus & ADI_SENSE_DEVICE_STATUS_CONFIG_ERROR) - ADI_SENSE_LOG_INFO("\tActive Configuration Errors - ATTENTION REQUIRED"); - if (pStatus->deviceStatus & ADI_SENSE_DEVICE_STATUS_LUT_ERROR) - ADI_SENSE_LOG_INFO("\tActive Look-Up Table Errors - ATTENTION REQUIRED"); - if (pStatus->deviceStatus & ADI_SENSE_DEVICE_STATUS_EXT_FLASH_ERROR) - ADI_SENSE_LOG_INFO("\tActive External Flash Errors - ATTENTION REQUIRED"); + if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_BUSY) + ADMW_LOG_INFO("\tCommand running"); + if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_DATAREADY) + ADMW_LOG_INFO("\tData ready"); + if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_ERROR) + ADMW_LOG_INFO("\tActive Errors - RESET REQUIRED"); + if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_FIFO_ERROR) + ADMW_LOG_INFO("\tActive FIFO Errors - ATTENTION REQUIRED"); + if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_CONFIG_ERROR) + ADMW_LOG_INFO("\tActive Configuration Errors - ATTENTION REQUIRED"); + if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_LUT_ERROR) + ADMW_LOG_INFO("\tActive Look-Up Table Errors - ATTENTION REQUIRED"); + if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_EXT_FLASH_ERROR) + ADMW_LOG_INFO("\tActive External Flash Errors - ATTENTION REQUIRED"); - if (pStatus->deviceStatus & ADI_SENSE_DEVICE_STATUS_ERROR) + if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_ERROR) { - ADI_SENSE_LOG_INFO("\tActive Errors - ATTENTION REQUIRED"); - ADI_SENSE_LOG_INFO("\t\tLast Error Code: %u (0x%X)", + ADMW_LOG_INFO("\tActive Errors - ATTENTION REQUIRED"); + ADMW_LOG_INFO("\t\tLast Error Code: %u (0x%X)", pStatus->errorCode, pStatus->errorCode); if (pStatus->diagnosticsStatus == 0) { - ADI_SENSE_LOG_INFO("\t\tNo diagnostics faults detected"); + ADMW_LOG_INFO("\t\tNo diagnostics faults detected"); } else { - ADI_SENSE_LOG_INFO("\t\tActive diagnostics faults:"); + ADMW_LOG_INFO("\t\tActive diagnostics faults:"); - if (pStatus->diagnosticsStatus & ADI_SENSE_DIAGNOSTICS_STATUS_CHECKSUM_ERROR) - ADI_SENSE_LOG_INFO("\t\t\tInternal Checksum fault detected"); - if (pStatus->diagnosticsStatus & ADI_SENSE_DIAGNOSTICS_STATUS_COMMS_ERROR) - ADI_SENSE_LOG_INFO("\t\t\tInternal Communications fault detected"); - if (pStatus->diagnosticsStatus & ADI_SENSE_DIAGNOSTICS_STATUS_SUPPLY_MONITOR_ERROR) - ADI_SENSE_LOG_INFO("\t\t\tSupply Monitor fault detected"); - if (pStatus->diagnosticsStatus & ADI_SENSE_DIAGNOSTICS_STATUS_SUPPLY_CAP_ERROR) - ADI_SENSE_LOG_INFO("\t\t\tSupply Regulator Capacitor fault detected"); - if (pStatus->diagnosticsStatus & ADI_SENSE_DIAGNOSTICS_STATUS_CONVERSION_ERROR) - ADI_SENSE_LOG_INFO("\t\t\tInternal ADC Conversions fault detected"); - if (pStatus->diagnosticsStatus & ADI_SENSE_DIAGNOSTICS_STATUS_CALIBRATION_ERROR) - ADI_SENSE_LOG_INFO("\t\t\tInternal Device Calibrations fault detected"); + if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_CHECKSUM_ERROR) + ADMW_LOG_INFO("\t\t\tInternal Checksum fault detected"); + if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_COMMS_ERROR) + ADMW_LOG_INFO("\t\t\tInternal Communications fault detected"); + if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_SUPPLY_MONITOR_ERROR) + ADMW_LOG_INFO("\t\t\tSupply Monitor fault detected"); + if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_SUPPLY_CAP_ERROR) + ADMW_LOG_INFO("\t\t\tSupply Regulator Capacitor fault detected"); + if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_CONVERSION_ERROR) + ADMW_LOG_INFO("\t\t\tInternal ADC Conversions fault detected"); + if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_CALIBRATION_ERROR) + ADMW_LOG_INFO("\t\t\tInternal Device Calibrations fault detected"); } } - if (pStatus->deviceStatus & ADI_SENSE_DEVICE_STATUS_ALERT) + if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_ALERT) { - ADI_SENSE_LOG_INFO("\tActive Alerts - ATTENTION REQUIRED:"); - ADI_SENSE_LOG_INFO("\t\tLast Alert Code: %u (0x%X)", + ADMW_LOG_INFO("\tActive Alerts - ATTENTION REQUIRED:"); + ADMW_LOG_INFO("\t\tLast Alert Code: %u (0x%X)", pStatus->alertCode, pStatus->alertCode); - for (unsigned i = 0; i < ADI_SENSE_1000_MAX_CHANNELS; i++) + for (unsigned i = 0; i < ADMW1001_MAX_CHANNELS; i++) { if (pStatus->channelAlerts[i] == 0) continue; - ADI_SENSE_LOG_INFO("\t\tChannel #%u:", i); - ADI_SENSE_LOG_INFO("\t\t\tLast Alert Code: %u (0x%X)", + ADMW_LOG_INFO("\t\tChannel #%u:", i); + ADMW_LOG_INFO("\t\t\tLast Alert Code: %u (0x%X)", pStatus->channelAlertCodes[i], pStatus->channelAlertCodes[i]); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_TIMEOUT) - ADI_SENSE_LOG_INFO("\t\t\tTimeout alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_UNDER_RANGE) - ADI_SENSE_LOG_INFO("\t\t\tUnder Range alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_OVER_RANGE) - ADI_SENSE_LOG_INFO("\t\t\tOver Range alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_LOW_LIMIT) - ADI_SENSE_LOG_INFO("\t\t\tLow limit alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_HIGH_LIMIT) - ADI_SENSE_LOG_INFO("\t\t\tHigh Limit alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_SENSOR_OPEN) - ADI_SENSE_LOG_INFO("\t\t\tSensor Fault alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_REF_DETECT) - ADI_SENSE_LOG_INFO("\t\t\tReference Detection alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_CONFIG_ERR) - ADI_SENSE_LOG_INFO("\t\t\tConfiguration Error alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_LUT_ERR) - ADI_SENSE_LOG_INFO("\t\t\tLook-Up Table Error alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_SENSOR_NOT_READY) - ADI_SENSE_LOG_INFO("\t\t\tSensor Not Ready alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_COMP_NOT_READY) - ADI_SENSE_LOG_INFO("\t\t\tCompensation Channel Not Ready alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_LUT_UNDER_RANGE) - ADI_SENSE_LOG_INFO("\t\t\tUnder Look-Up Table Range alert detected"); - if (pStatus->channelAlerts[i] & ADI_SENSE_CHANNEL_ALERT_LUT_OVER_RANGE) - ADI_SENSE_LOG_INFO("\t\t\tOver Look-Up Table Range alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_TIMEOUT) + ADMW_LOG_INFO("\t\t\tTimeout alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_UNDER_RANGE) + ADMW_LOG_INFO("\t\t\tUnder Range alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_OVER_RANGE) + ADMW_LOG_INFO("\t\t\tOver Range alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_LOW_LIMIT) + ADMW_LOG_INFO("\t\t\tLow limit alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_HIGH_LIMIT) + ADMW_LOG_INFO("\t\t\tHigh Limit alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_SENSOR_OPEN) + ADMW_LOG_INFO("\t\t\tSensor Fault alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_REF_DETECT) + ADMW_LOG_INFO("\t\t\tReference Detection alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_CONFIG_ERR) + ADMW_LOG_INFO("\t\t\tConfiguration Error alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_LUT_ERR) + ADMW_LOG_INFO("\t\t\tLook-Up Table Error alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_SENSOR_NOT_READY) + ADMW_LOG_INFO("\t\t\tSensor Not Ready alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_COMP_NOT_READY) + ADMW_LOG_INFO("\t\t\tCompensation Channel Not Ready alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_LUT_UNDER_RANGE) + ADMW_LOG_INFO("\t\t\tUnder Look-Up Table Range alert detected"); + if (pStatus->channelAlerts[i] & ADMW_CHANNEL_ALERT_LUT_OVER_RANGE) + ADMW_LOG_INFO("\t\t\tOver Look-Up Table Range alert detected"); } } - if ((pStatus->deviceStatus & ADI_SENSE_DEVICE_STATUS_ERROR) || - (pStatus->deviceStatus & ADI_SENSE_DEVICE_STATUS_ALERT)) + if ((pStatus->deviceStatus & ADMW_DEVICE_STATUS_ERROR) || + (pStatus->deviceStatus & ADMW_DEVICE_STATUS_ALERT)) { - ADI_SENSE_LOG_INFO("\t\tLast Debug Code: %u-%u", + ADMW_LOG_INFO("\t\tLast Debug Code: %u-%u", (pStatus->debugCode >> 16) & 0xFFFF, (pStatus->debugCode >> 0) & 0xFFFF); } @@ -113,185 +113,185 @@ } void utils_printSamples( - ADI_SENSE_DATA_SAMPLE *pSampleBuffer, + ADMW_DATA_SAMPLE *pSampleBuffer, uint32_t nNumSamples, - ADI_SENSE_MEASUREMENT_MODE eMeasurementMode) + ADMW_MEASUREMENT_MODE eMeasurementMode) { - bool fftMode = (eMeasurementMode == ADI_SENSE_MEASUREMENT_MODE_FFT); + bool fftMode = (eMeasurementMode == ADMW_MEASUREMENT_MODE_FFT); for (uint32_t i = 0; i < nNumSamples; i++) { if (fftMode) { - ADI_SENSE_LOG_INFO("Sample # %2d Channel # %2d :: Bin/Raw %8d :: Magnitude %e :: flags:%s%s", + ADMW_LOG_INFO("Sample # %2d Channel # %2d :: Bin/Raw %8d :: Magnitude %e :: flags:%s%s", i+1, pSampleBuffer[i].channelId, pSampleBuffer[i].rawValue, pSampleBuffer[i].processedValue, - pSampleBuffer[i].status & ADI_SENSE_DEVICE_STATUS_ERROR ? " ERROR" : "", - pSampleBuffer[i].status & ADI_SENSE_DEVICE_STATUS_ALERT ? " ALERT" : ""); + pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ERROR ? " ERROR" : "", + pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ALERT ? " ALERT" : ""); } else { - ADI_SENSE_LOG_INFO("Sample # %2d Channel # %2d :: Raw %0X %f :: Processed %f :: flags:%s%s", + ADMW_LOG_INFO("Sample # %2d Channel # %2d :: Raw %0X %f :: Processed %f :: flags:%s%s", i+1, pSampleBuffer[i].channelId, pSampleBuffer[i].rawValue, (pSampleBuffer[i].rawValue/1024.0), pSampleBuffer[i].processedValue, - pSampleBuffer[i].status & ADI_SENSE_DEVICE_STATUS_ERROR ? " ERROR" : "", - pSampleBuffer[i].status & ADI_SENSE_DEVICE_STATUS_ALERT ? " ALERT" : ""); + pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ERROR ? " ERROR" : "", + pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ALERT ? " ALERT" : ""); } } } -static void gpioCallbackFn(ADI_SENSE_GPIO_PIN ePinId, void * pArg) +static void gpioCallbackFn(ADMW_GPIO_PIN ePinId, void * pArg) { volatile bool *pbFlag = (volatile bool *)pArg; *pbFlag = true; } -ADI_SENSE_RESULT utils_registerCallbacks( - ADI_SENSE_DEVICE_HANDLE hDevice, +ADMW_RESULT utils_registerCallbacks( + ADMW_DEVICE_HANDLE hDevice, volatile bool *pbDataReady, volatile bool *pbError, volatile bool *pbAlert) { - ADI_SENSE_RESULT res; + ADMW_RESULT res; bool state; - res = adi_sense_RegisterGpioCallback(hDevice, ADI_SENSE_GPIO_PIN_DATAREADY, + res = admw_RegisterGpioCallback(hDevice, ADMW_GPIO_PIN_DATAREADY, gpioCallbackFn, (void *)pbDataReady); - if (res != ADI_SENSE_SUCCESS) + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to register DATAREADY callback"); + ADMW_LOG_ERROR("Failed to register DATAREADY callback"); return res; } - res = adi_sense_GetGpioState(hDevice, ADI_SENSE_GPIO_PIN_ERROR, &state); - if (res != ADI_SENSE_SUCCESS) + res = admw_GetGpioState(hDevice, ADMW_GPIO_PIN_ALERT_ERROR, &state); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to get current ERROR state"); + ADMW_LOG_ERROR("Failed to get current ERROR state"); return res; } if (state) { - ADI_SENSE_LOG_ERROR("ERROR signal already asserted"); - return ADI_SENSE_FAILURE; + ADMW_LOG_ERROR("ERROR signal already asserted"); + return ADMW_FAILURE; } - res = adi_sense_RegisterGpioCallback(hDevice, ADI_SENSE_GPIO_PIN_ERROR, + res = admw_RegisterGpioCallback(hDevice, ADMW_GPIO_PIN_ALERT_ERROR, gpioCallbackFn, (void *)pbError); - if (res != ADI_SENSE_SUCCESS) + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to register ERROR callback"); + ADMW_LOG_ERROR("Failed to register ERROR callback"); return res; } - /*res = adi_sense_GetGpioState(hDevice, ADI_SENSE_GPIO_PIN_ALERT, &state); - if (res != ADI_SENSE_SUCCESS) + /*res = admw_GetGpioState(hDevice, ADMW_GPIO_PIN_ALERT, &state); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to get current ALERT state"); + ADMW_LOG_ERROR("Failed to get current ALERT state"); return res; } if (state) { - ADI_SENSE_LOG_ERROR("ALERT signal already asserted"); - return ADI_SENSE_FAILURE; + ADMW_LOG_ERROR("ALERT signal already asserted"); + return ADMW_FAILURE; }*/ - res = adi_sense_RegisterGpioCallback(hDevice, ADI_SENSE_GPIO_PIN_ALERT, + res = admw_RegisterGpioCallback(hDevice, ADMW_GPIO_PIN_ALERT_ERROR, gpioCallbackFn, (void *)pbAlert); - if (res != ADI_SENSE_SUCCESS) + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to register ALERT callback"); + ADMW_LOG_ERROR("Failed to register ALERT callback"); return res; } - return ADI_SENSE_SUCCESS; + return ADMW_SUCCESS; } -ADI_SENSE_RESULT utils_deregisterCallbacks( - ADI_SENSE_DEVICE_HANDLE hDevice) +ADMW_RESULT utils_deregisterCallbacks( + ADMW_DEVICE_HANDLE hDevice) { - ADI_SENSE_RESULT res; + ADMW_RESULT res; - res = adi_sense_RegisterGpioCallback(hDevice, ADI_SENSE_GPIO_PIN_DATAREADY, + res = admw_RegisterGpioCallback(hDevice, ADMW_GPIO_PIN_DATAREADY, NULL, NULL); - if (res != ADI_SENSE_SUCCESS) + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to deregister DATAREADY callback"); + ADMW_LOG_ERROR("Failed to deregister DATAREADY callback"); return res; } - res = adi_sense_RegisterGpioCallback(hDevice, ADI_SENSE_GPIO_PIN_ERROR, + res = admw_RegisterGpioCallback(hDevice, ADMW_GPIO_PIN_ALERT_ERROR, NULL, NULL); - if (res != ADI_SENSE_SUCCESS) + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to deregister ERROR callback"); + ADMW_LOG_ERROR("Failed to deregister ERROR callback"); return res; } - res = adi_sense_RegisterGpioCallback(hDevice, ADI_SENSE_GPIO_PIN_ALERT, + res = admw_RegisterGpioCallback(hDevice, ADMW_GPIO_PIN_ALERT_ERROR, NULL, NULL); - if (res != ADI_SENSE_SUCCESS) + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_INFO("Failed to deregister ALERT callback"); + ADMW_LOG_INFO("Failed to deregister ALERT callback"); return res; } - return ADI_SENSE_SUCCESS; + return ADMW_SUCCESS; } -ADI_SENSE_RESULT utils_runMeasurement( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_MEASUREMENT_MODE eMeasurementMode) +ADMW_RESULT utils_runMeasurement( + ADMW_DEVICE_HANDLE hDevice, + ADMW_MEASUREMENT_MODE eMeasurementMode) { - ADI_SENSE_RESULT res; + ADMW_RESULT res; volatile bool bDataReady = false; volatile bool bError = false; volatile bool bAlert = false; res = utils_registerCallbacks(hDevice, &bDataReady, &bError, &bAlert); - if (res != ADI_SENSE_SUCCESS) + if (res != ADMW_SUCCESS) return res; /* * Retrieve the number of samples per cycle, per DATAREADY pulse, etc. for * this configuration. */ - ADI_SENSE_1000_OPERATING_MODE eOperatingMode; - ADI_SENSE_1000_DATAREADY_MODE eDataReadyMode; + ADMW1001_OPERATING_MODE eOperatingMode; + ADMW1001_DATAREADY_MODE eDataReadyMode; uint32_t nSamplesPerDataready; uint32_t nSamplesPerCycle; uint8_t nBytesPerSample; - res = adi_sense_1000_GetDataReadyModeInfo(hDevice, + res = admw1001_GetDataReadyModeInfo(hDevice, eMeasurementMode, &eOperatingMode, &eDataReadyMode, &nSamplesPerDataready, &nSamplesPerCycle, &nBytesPerSample); - if (res != ADI_SENSE_SUCCESS) + if (res != ADMW_SUCCESS) return res; /* * Allocate a buffer to store the samples retrieved on each DATAREADY pulse */ - ADI_SENSE_DATA_SAMPLE *pSampleBuffer; - pSampleBuffer = malloc(sizeof(ADI_SENSE_DATA_SAMPLE) * + ADMW_DATA_SAMPLE *pSampleBuffer; + pSampleBuffer = malloc(sizeof(ADMW_DATA_SAMPLE) * nSamplesPerDataready); if (pSampleBuffer == NULL) { - ADI_SENSE_LOG_ERROR("Failed to allocate sample buffer"); - return ADI_SENSE_NO_MEM; + ADMW_LOG_ERROR("Failed to allocate sample buffer"); + return ADMW_NO_MEM; } /* * Kick off the measurement cycle(s) here */ - ADI_SENSE_LOG_INFO("Starting measurement"); - res = adi_sense_StartMeasurement(hDevice, eMeasurementMode); - if (res != ADI_SENSE_SUCCESS) + ADMW_LOG_INFO("Starting measurement"); + res = admw_StartMeasurement(hDevice, eMeasurementMode); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to start measurement"); + ADMW_LOG_ERROR("Failed to start measurement"); return res; } @@ -302,7 +302,7 @@ uint32_t nReturned; while (true) { - ADI_SENSE_STATUS status; + ADMW_STATUS status; /* * Wait until the next batch of 1 or more samples is ready, continuously @@ -317,24 +317,24 @@ * Get data samples from the measurement cycle, if no error has occurred */ bDataReady = false; - res = adi_sense_GetData(hDevice, eMeasurementMode, pSampleBuffer, + res = admw_GetData(hDevice, eMeasurementMode, pSampleBuffer, nBytesPerSample, nSamplesPerDataready, &nReturned); - if (res != ADI_SENSE_SUCCESS) + if (res != ADMW_SUCCESS) { - if (res == ADI_SENSE_INCOMPLETE) + if (res == ADMW_INCOMPLETE) { /* * This is expected in cases where cycleSkipCount may * be non-zero for some channels, resulting in * variable-length sequences */ - ADI_SENSE_LOG_DEBUG("Retrieved %u of %u requested data samples", + ADMW_LOG_DEBUG("Retrieved %u of %u requested data samples", nReturned, nSamplesPerDataready); } else { - ADI_SENSE_LOG_WARN("Failed to get data samples from device"); + ADMW_LOG_WARN("Failed to get data samples from device"); return res; } } @@ -356,15 +356,15 @@ */ if (bError || bAlert) { - res = adi_sense_GetStatus(hDevice, &status); - if (res != ADI_SENSE_SUCCESS) + res = admw_GetStatus(hDevice, &status); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to retrieve device status"); + ADMW_LOG_ERROR("Failed to retrieve device status"); return res; } if (status.deviceStatus & - (ADI_SENSE_DEVICE_STATUS_ERROR | ADI_SENSE_DEVICE_STATUS_ALERT)) + (ADMW_DEVICE_STATUS_ERROR | ADMW_DEVICE_STATUS_ALERT)) { utils_printStatus(&status); @@ -374,7 +374,7 @@ } } - if (eOperatingMode == ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE) + if (eOperatingMode == ADMW1001_OPERATING_MODE_SINGLECYCLE) { /* * In this mode, break out of the loop when the measurement command @@ -390,10 +390,10 @@ * completed a single cycle. */ bool bCommandRunning; - res = adi_sense_GetCommandRunningState(hDevice, &bCommandRunning); - if (res != ADI_SENSE_SUCCESS) + res = admw_GetCommandRunningState(hDevice, &bCommandRunning); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to get command-running status"); + ADMW_LOG_ERROR("Failed to get command-running status"); return res; } @@ -402,20 +402,20 @@ } } - ADI_SENSE_LOG_INFO("Stopping measurement"); - res = adi_sense_StopMeasurement(hDevice); - if (res != ADI_SENSE_SUCCESS) + ADMW_LOG_INFO("Stopping measurement"); + res = admw_StopMeasurement(hDevice); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to send stop measurement"); + ADMW_LOG_ERROR("Failed to send stop measurement"); return res; } free(pSampleBuffer); res = utils_deregisterCallbacks(hDevice); - if (res != ADI_SENSE_SUCCESS) + if (res != ADMW_SUCCESS) return res; - return ADI_SENSE_SUCCESS; + return ADMW_SUCCESS; }
--- a/common/utils.h Tue Jun 04 10:09:11 2019 +0000 +++ b/common/utils.h Wed Jun 05 05:39:15 2019 +0000 @@ -1,8 +1,8 @@ #ifndef __UTILS_H__ #define __UTILS_H__ -#include "adi_sense_api.h" -#include "adi_sense_1000/adi_sense_1000_api.h" +#include "admw_api.h" +#include "admw1001/admw1001_api.h" #ifdef __cplusplus extern "C" { @@ -10,34 +10,34 @@ /* Utility function to print the status read from the ADI Sense device */ void utils_printStatus( - ADI_SENSE_STATUS *pStatus); + ADMW_STATUS *pStatus); /* Utility function to print data samples read from the ADI Sense device */ void utils_printSamples( - ADI_SENSE_DATA_SAMPLE *pSampleBuffer, + ADMW_DATA_SAMPLE *pSampleBuffer, uint32_t nNumSamples, - ADI_SENSE_MEASUREMENT_MODE eMeasurementMode); + ADMW_MEASUREMENT_MODE eMeasurementMode); /* Utility function to register callbacks for ADI Sense device notification signals */ -ADI_SENSE_RESULT utils_registerCallbacks( - ADI_SENSE_DEVICE_HANDLE hDevice, +ADMW_RESULT utils_registerCallbacks( + ADMW_DEVICE_HANDLE hDevice, volatile bool *pbDataReady, volatile bool *pbError, volatile bool *pbAlert); /* Utility function to de-register callbacks for ADI Sense device notification signals */ -ADI_SENSE_RESULT utils_deregisterCallbacks( - ADI_SENSE_DEVICE_HANDLE hDevice); +ADMW_RESULT utils_deregisterCallbacks( + ADMW_DEVICE_HANDLE hDevice); /* Utility function to run measurements on ADI Sense device, according to its current * configuration, and display data samples and device status following each cycle */ -ADI_SENSE_RESULT utils_runMeasurement( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_MEASUREMENT_MODE eMeasurementMode); +ADMW_RESULT utils_runMeasurement( + ADMW_DEVICE_HANDLE hDevice, + ADMW_MEASUREMENT_MODE eMeasurementMode); /* Utility function to retrieve and print the factory calibration coefficients table from the ADI Sense device */ -ADI_SENSE_RESULT utils_printCalTable( - ADI_SENSE_DEVICE_HANDLE hDevice); +ADMW_RESULT utils_printCalTable( + ADMW_DEVICE_HANDLE hDevice); #ifdef __cplusplus }
--- a/current_honeywellPressure_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - * - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG current_honeywellPressure_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_CURRENT_0] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementsPerCycle = 10, - .extraSettlingTime = 0, - .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_2X, - .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, - }, - .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, - .disableBuffer = true, - }, - .enableVbias = false, - }, - }, - }, - }, -}; -
--- a/i2c0_honeywellHumidicon_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG i2c0_honeywellHumidicon_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_I2C_0] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementsPerCycle = 10, - .extraSettlingTime = 36500, - .i2cChannelConfig = { - .sensor = ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_DEF_L1, - .deviceAddress = 0x27, - }, - }, - }, - }, -}; -
--- a/i2c0_onsemiNOA1305_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* -Copyright 2018 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG i2c0_onsemiNOA1305_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_I2C_0] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementsPerCycle = 10, - .extraSettlingTime = 50000, - .i2cChannelConfig = { - .sensor = ADI_SENSE_1000_I2C_SENSOR_AMBIENTLIGHT_A_DEF_L1, - .deviceAddress = 0x39, - }, - }, - }, - }, -}; -
--- a/i2c0_sensirionSHT3X_config.c Tue Jun 04 10:09:11 2019 +0000 +++ b/i2c0_sensirionSHT3X_config.c Wed Jun 05 05:39:15 2019 +0000 @@ -40,28 +40,28 @@ * @brief: *----------------------------------------------------------------------------- */ -#include "adi_sense_config_types.h" +#include "admw_config_types.h" -ADI_SENSE_CONFIG i2c0_sensirionSHT3X_config = { +ADMW_CONFIG i2c0_sensirionSHT3X_config = { .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { + .productId = ADMW_PRODUCT_ID_ADMW1001, + .admw1001 = { .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, + .powerMode = ADMW1001_POWER_MODE_FULL, }, .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, + .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, }, .channels = { - [ADI_SENSE_1000_CHANNEL_ID_I2C_0] = { + [ADMW1001_CHANNEL_ID_I2C_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, .measurementsPerCycle = 10, .extraSettlingTime = 15000, .i2cChannelConfig = { - .sensor = ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_B_DEF_L1, + .sensor = ADMW1001_I2C_SENSOR_HUMIDITY_B_DEF_L1, .deviceAddress = 0x44, }, },
--- a/inc/adi_sense_1000/ADISENSE1000_REGISTERS.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2304 +0,0 @@ -/* ================================================================================ - - Project : ADISENSE1000_REGISTERS - File : ADISENSE1000_REGISTERS.h - Description : Register Definitions - - Date : Nov 5, 2018 - - Copyright (c) 2018 Analog Devices, Inc. All Rights Reserved. - This software is proprietary and confidential to Analog Devices, Inc. and - its licensors. - - This file was auto-generated. Do not make local changes to this file. - - ================================================================================ */ - -#ifndef _DEF_ADISENSE1000_REGISTERS_H -#define _DEF_ADISENSE1000_REGISTERS_H - -#if defined(_LANGUAGE_C) || (defined(__GNUC__) && !defined(__ASSEMBLER__)) -#include <stdint.h> -#endif /* _LANGUAGE_C */ - -#ifndef __ADI_GENERATED_DEF_HEADERS__ -#define __ADI_GENERATED_DEF_HEADERS__ 1 -#endif - -#define __ADI_HAS_ADISENSE_CORE__ 1 -#define __ADI_HAS_ADISENSE_SPI__ 1 -#define __ADI_HAS_ADISENSE_TEST__ 1 - -/* ============================================================================================================================ - - ============================================================================================================================ */ - -/* ============================================================================================================================ - ADISENSE_SPI - ============================================================================================================================ */ -#define REG_ADISENSE_SPI_INTERFACE_CONFIG_A_RESET 0x00000030 /* Reset Value for Interface_Config_A */ -#define REG_ADISENSE_SPI_INTERFACE_CONFIG_A 0x00000000 /* ADISENSE_SPI Interface Configuration A */ -#define REG_ADISENSE_SPI_INTERFACE_CONFIG_B_RESET 0x00000000 /* Reset Value for Interface_Config_B */ -#define REG_ADISENSE_SPI_INTERFACE_CONFIG_B 0x00000001 /* ADISENSE_SPI Interface Configuration B */ -#define REG_ADISENSE_SPI_DEVICE_CONFIG_RESET 0x00000000 /* Reset Value for Device_Config */ -#define REG_ADISENSE_SPI_DEVICE_CONFIG 0x00000002 /* ADISENSE_SPI Device Configuration */ -#define REG_ADISENSE_SPI_CHIP_TYPE_RESET 0x00000007 /* Reset Value for Chip_Type */ -#define REG_ADISENSE_SPI_CHIP_TYPE 0x00000003 /* ADISENSE_SPI Chip Type */ -#define REG_ADISENSE_SPI_PRODUCT_ID_L_RESET 0x00000020 /* Reset Value for Product_ID_L */ -#define REG_ADISENSE_SPI_PRODUCT_ID_L 0x00000004 /* ADISENSE_SPI Product ID Low */ -#define REG_ADISENSE_SPI_PRODUCT_ID_H_RESET 0x00000000 /* Reset Value for Product_ID_H */ -#define REG_ADISENSE_SPI_PRODUCT_ID_H 0x00000005 /* ADISENSE_SPI Product ID High */ -#define REG_ADISENSE_SPI_CHIP_GRADE_RESET 0x00000000 /* Reset Value for Chip_Grade */ -#define REG_ADISENSE_SPI_CHIP_GRADE 0x00000006 /* ADISENSE_SPI Chip Grade */ -#define REG_ADISENSE_SPI_SCRATCH_PAD_RESET 0x00000000 /* Reset Value for Scratch_Pad */ -#define REG_ADISENSE_SPI_SCRATCH_PAD 0x0000000A /* ADISENSE_SPI Scratch Pad */ -#define REG_ADISENSE_SPI_SPI_REVISION_RESET 0x00000082 /* Reset Value for SPI_Revision */ -#define REG_ADISENSE_SPI_SPI_REVISION 0x0000000B /* ADISENSE_SPI SPI Revision */ -#define REG_ADISENSE_SPI_VENDOR_L_RESET 0x00000056 /* Reset Value for Vendor_L */ -#define REG_ADISENSE_SPI_VENDOR_L 0x0000000C /* ADISENSE_SPI Vendor ID Low */ -#define REG_ADISENSE_SPI_VENDOR_H_RESET 0x00000004 /* Reset Value for Vendor_H */ -#define REG_ADISENSE_SPI_VENDOR_H 0x0000000D /* ADISENSE_SPI Vendor ID High */ -#define REG_ADISENSE_SPI_STREAM_MODE_RESET 0x00000000 /* Reset Value for Stream_Mode */ -#define REG_ADISENSE_SPI_STREAM_MODE 0x0000000E /* ADISENSE_SPI Stream Mode */ -#define REG_ADISENSE_SPI_TRANSFER_CONFIG_RESET 0x00000000 /* Reset Value for Transfer_Config */ -#define REG_ADISENSE_SPI_TRANSFER_CONFIG 0x0000000F /* ADISENSE_SPI Transfer Config */ -#define REG_ADISENSE_SPI_INTERFACE_CONFIG_C_RESET 0x00000033 /* Reset Value for Interface_Config_C */ -#define REG_ADISENSE_SPI_INTERFACE_CONFIG_C 0x00000010 /* ADISENSE_SPI Interface Configuration C */ -#define REG_ADISENSE_SPI_INTERFACE_STATUS_A_RESET 0x00000000 /* Reset Value for Interface_Status_A */ -#define REG_ADISENSE_SPI_INTERFACE_STATUS_A 0x00000011 /* ADISENSE_SPI Interface Status A */ - -/* ============================================================================================================================ - ADISENSE_SPI Register BitMasks, Positions & Enumerations - ============================================================================================================================ */ -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_INTERFACE_CONFIG_A Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_INTERFACE_CONFIG_A_SW_RESET 7 /* First of Two of SW_RESET Bits. */ -#define BITP_ADISENSE_SPI_INTERFACE_CONFIG_A_ADDR_ASCENSION 5 /* Determines Sequential Addressing Behavior */ -#define BITP_ADISENSE_SPI_INTERFACE_CONFIG_A_SDO_ENABLE 4 /* SDO Pin Enable */ -#define BITP_ADISENSE_SPI_INTERFACE_CONFIG_A_SW_RESETX 0 /* Second of Two of SW_RESET Bits. */ -#define BITM_ADISENSE_SPI_INTERFACE_CONFIG_A_SW_RESET 0x00000080 /* First of Two of SW_RESET Bits. */ -#define BITM_ADISENSE_SPI_INTERFACE_CONFIG_A_ADDR_ASCENSION 0x00000020 /* Determines Sequential Addressing Behavior */ -#define BITM_ADISENSE_SPI_INTERFACE_CONFIG_A_SDO_ENABLE 0x00000010 /* SDO Pin Enable */ -#define BITM_ADISENSE_SPI_INTERFACE_CONFIG_A_SW_RESETX 0x00000001 /* Second of Two of SW_RESET Bits. */ -#define ENUM_ADISENSE_SPI_INTERFACE_CONFIG_A_DESCEND 0x00000000 /* Addr_Ascension: Address accessed is decremented by one for each data byte when streaming */ -#define ENUM_ADISENSE_SPI_INTERFACE_CONFIG_A_ASCEND 0x00000020 /* Addr_Ascension: Address accessed is incremented by one for each data byte when streaming */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_INTERFACE_CONFIG_B Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_INTERFACE_CONFIG_B_SINGLE_INST 7 /* Select Streaming or Single Instruction Mode */ -#define BITM_ADISENSE_SPI_INTERFACE_CONFIG_B_SINGLE_INST 0x00000080 /* Select Streaming or Single Instruction Mode */ -#define ENUM_ADISENSE_SPI_INTERFACE_CONFIG_B_STREAMING_MODE 0x00000000 /* Single_Inst: Streaming mode is enabled */ -#define ENUM_ADISENSE_SPI_INTERFACE_CONFIG_B_SINGLE_INSTRUCTION_MODE 0x00000080 /* Single_Inst: Single Instruction mode is enabled */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_DEVICE_CONFIG Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_DEVICE_CONFIG_OPERATING_MODES 0 /* Power Modes */ -#define BITM_ADISENSE_SPI_DEVICE_CONFIG_OPERATING_MODES 0x00000003 /* Power Modes */ -#define ENUM_ADISENSE_SPI_DEVICE_CONFIG_NORMAL 0x00000000 /* Operating_Modes: Normal Operating Mode */ -#define ENUM_ADISENSE_SPI_DEVICE_CONFIG_SLEEP 0x00000003 /* Operating_Modes: Low Power Mode */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_CHIP_TYPE Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_CHIP_TYPE_CHIP_TYPE 0 /* Precision ADC */ -#define BITM_ADISENSE_SPI_CHIP_TYPE_CHIP_TYPE 0x0000000F /* Precision ADC */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_PRODUCT_ID_L Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_PRODUCT_ID_L_PRODUCT_ID 0 /* This is Device Chip Type/Family */ -#define BITM_ADISENSE_SPI_PRODUCT_ID_L_PRODUCT_ID 0x000000FF /* This is Device Chip Type/Family */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_PRODUCT_ID_H Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_PRODUCT_ID_H_PRODUCT_ID 0 /* This is Device Chip Type/Family */ -#define BITM_ADISENSE_SPI_PRODUCT_ID_H_PRODUCT_ID 0x000000FF /* This is Device Chip Type/Family */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_CHIP_GRADE Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_CHIP_GRADE_GRADE 4 /* This is the Device Performance Grade */ -#define BITP_ADISENSE_SPI_CHIP_GRADE_DEVICE_REVISION 0 /* This is the Device Hardware Revision */ -#define BITM_ADISENSE_SPI_CHIP_GRADE_GRADE 0x000000F0 /* This is the Device Performance Grade */ -#define BITM_ADISENSE_SPI_CHIP_GRADE_DEVICE_REVISION 0x0000000F /* This is the Device Hardware Revision */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_SCRATCH_PAD Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_SCRATCH_PAD_SCRATCH_VALUE 0 /* Software Scratchpad */ -#define BITM_ADISENSE_SPI_SCRATCH_PAD_SCRATCH_VALUE 0x000000FF /* Software Scratchpad */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_SPI_REVISION Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_SPI_REVISION_SPI_TYPE 6 /* Always Reads as 0x2 */ -#define BITP_ADISENSE_SPI_SPI_REVISION_VERSION 0 /* SPI Version */ -#define BITM_ADISENSE_SPI_SPI_REVISION_SPI_TYPE 0x000000C0 /* Always Reads as 0x2 */ -#define BITM_ADISENSE_SPI_SPI_REVISION_VERSION 0x0000003F /* SPI Version */ -#define ENUM_ADISENSE_SPI_SPI_REVISION_ADI_SPI 0x00000000 -#define ENUM_ADISENSE_SPI_SPI_REVISION_LPT_SPI 0x00000080 -#define ENUM_ADISENSE_SPI_SPI_REVISION_REV1_0 0x00000002 /* Version: Revision 1.0 */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_VENDOR_L Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_VENDOR_L_VID 0 /* Analog Devices Vendor ID */ -#define BITM_ADISENSE_SPI_VENDOR_L_VID 0x000000FF /* Analog Devices Vendor ID */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_VENDOR_H Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_VENDOR_H_VID 0 /* Analog Devices Vendor ID */ -#define BITM_ADISENSE_SPI_VENDOR_H_VID 0x000000FF /* Analog Devices Vendor ID */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_STREAM_MODE Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_STREAM_MODE_LOOP_COUNT 0 /* Sets the Data Byte Count Before Looping to Start Address */ -#define BITM_ADISENSE_SPI_STREAM_MODE_LOOP_COUNT 0x000000FF /* Sets the Data Byte Count Before Looping to Start Address */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_TRANSFER_CONFIG Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_TRANSFER_CONFIG_STREAM_MODE 1 /* When Streaming, Controls Master-Slave Transfer */ -#define BITM_ADISENSE_SPI_TRANSFER_CONFIG_STREAM_MODE 0x00000002 /* When Streaming, Controls Master-Slave Transfer */ -#define ENUM_ADISENSE_SPI_TRANSFER_CONFIG_UPDATE_ON_WRITE 0x00000000 /* Stream_Mode: Transfers after each byte/mulit-byte register */ -#define ENUM_ADISENSE_SPI_TRANSFER_CONFIG_UPDATE_ON_ADDRESS_LOOP 0x00000002 /* Stream_Mode: Transfers when address loops */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_INTERFACE_CONFIG_C Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_INTERFACE_CONFIG_C_CRC_ENABLE 6 /* CRC Enable */ -#define BITP_ADISENSE_SPI_INTERFACE_CONFIG_C_STRICT_REGISTER_ACCESS 5 /* Multi-byte Registers Must Be Read/Written in Full */ -#define BITP_ADISENSE_SPI_INTERFACE_CONFIG_C_SEND_STATUS 4 /* Enables Sending of Status in 4-wire Mode */ -#define BITP_ADISENSE_SPI_INTERFACE_CONFIG_C_CRC_ENABLEB 0 /* Inverted CRC Enable */ -#define BITM_ADISENSE_SPI_INTERFACE_CONFIG_C_CRC_ENABLE 0x000000C0 /* CRC Enable */ -#define BITM_ADISENSE_SPI_INTERFACE_CONFIG_C_STRICT_REGISTER_ACCESS 0x00000020 /* Multi-byte Registers Must Be Read/Written in Full */ -#define BITM_ADISENSE_SPI_INTERFACE_CONFIG_C_SEND_STATUS 0x00000010 /* Enables Sending of Status in 4-wire Mode */ -#define BITM_ADISENSE_SPI_INTERFACE_CONFIG_C_CRC_ENABLEB 0x00000003 /* Inverted CRC Enable */ -#define ENUM_ADISENSE_SPI_INTERFACE_CONFIG_C_DISABLED 0x00000000 /* CRC_Enable: CRC Disabled */ -#define ENUM_ADISENSE_SPI_INTERFACE_CONFIG_C_ENABLED 0x00000040 /* CRC_Enable: CRC Enabled */ -#define ENUM_ADISENSE_SPI_INTERFACE_CONFIG_C_NORMAL_ACCESS 0x00000000 /* Strict_Register_Access: Normal mode, no access restrictions */ -#define ENUM_ADISENSE_SPI_INTERFACE_CONFIG_C_STRICT_ACCESS 0x00000020 /* Strict_Register_Access: Strict mode, multi-byte registers require all bytes read/written */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_SPI_INTERFACE_STATUS_A Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_SPI_INTERFACE_STATUS_A_NOT_READY_ERROR 7 /* Device Not Ready for Transaction */ -#define BITP_ADISENSE_SPI_INTERFACE_STATUS_A_CLOCK_COUNT_ERROR 4 /* Incorrect Number of Clocks Detected in a Transaction */ -#define BITP_ADISENSE_SPI_INTERFACE_STATUS_A_CRC_ERROR 3 /* Invalid/No CRC Received */ -#define BITP_ADISENSE_SPI_INTERFACE_STATUS_A_WR_TO_RD_ONLY_REG_ERROR 2 /* Write to Read-Only Register Attempted */ -#define BITP_ADISENSE_SPI_INTERFACE_STATUS_A_REGISTER_PARTIAL_ACCESS_ERROR 1 /* Set When Fewer Than Expected Number of Bytes Read/Written */ -#define BITP_ADISENSE_SPI_INTERFACE_STATUS_A_ADDRESS_INVALID_ERROR 0 /* Attempt to Read/Write Non-existent Register Address */ -#define BITM_ADISENSE_SPI_INTERFACE_STATUS_A_NOT_READY_ERROR 0x00000080 /* Device Not Ready for Transaction */ -#define BITM_ADISENSE_SPI_INTERFACE_STATUS_A_CLOCK_COUNT_ERROR 0x00000010 /* Incorrect Number of Clocks Detected in a Transaction */ -#define BITM_ADISENSE_SPI_INTERFACE_STATUS_A_CRC_ERROR 0x00000008 /* Invalid/No CRC Received */ -#define BITM_ADISENSE_SPI_INTERFACE_STATUS_A_WR_TO_RD_ONLY_REG_ERROR 0x00000004 /* Write to Read-Only Register Attempted */ -#define BITM_ADISENSE_SPI_INTERFACE_STATUS_A_REGISTER_PARTIAL_ACCESS_ERROR 0x00000002 /* Set When Fewer Than Expected Number of Bytes Read/Written */ -#define BITM_ADISENSE_SPI_INTERFACE_STATUS_A_ADDRESS_INVALID_ERROR 0x00000001 /* Attempt to Read/Write Non-existent Register Address */ - - -/* ============================================================================================================================ - ADISENSE1000 Core Registers - ============================================================================================================================ */ - -/* ============================================================================================================================ - ADISENSE_CORE - ============================================================================================================================ */ -#define REG_ADISENSE_CORE_COMMAND_RESET 0x00000000 /* Reset Value for Command */ -#define REG_ADISENSE_CORE_COMMAND 0x00000014 /* ADISENSE_CORE Special Command */ -#define REG_ADISENSE_CORE_MODE_RESET 0x00000000 /* Reset Value for Mode */ -#define REG_ADISENSE_CORE_MODE 0x00000016 /* ADISENSE_CORE Operating Mode and DRDY Control */ -#define REG_ADISENSE_CORE_POWER_CONFIG_RESET 0x00000000 /* Reset Value for Power_Config */ -#define REG_ADISENSE_CORE_POWER_CONFIG 0x00000017 /* ADISENSE_CORE General Configuration */ -#define REG_ADISENSE_CORE_CYCLE_CONTROL_RESET 0x00000000 /* Reset Value for Cycle_Control */ -#define REG_ADISENSE_CORE_CYCLE_CONTROL 0x00000018 /* ADISENSE_CORE Measurement Cycle */ -#define REG_ADISENSE_CORE_FIFO_NUM_CYCLES_RESET 0x00000001 /* Reset Value for Fifo_Num_Cycles */ -#define REG_ADISENSE_CORE_FIFO_NUM_CYCLES 0x0000001A /* ADISENSE_CORE Number of Measurement Cycles to Store in FIFO */ -#define REG_ADISENSE_CORE_MULTI_CYCLE_REPEAT_INTERVAL_RESET 0x00000000 /* Reset Value for Multi_Cycle_Repeat_Interval */ -#define REG_ADISENSE_CORE_MULTI_CYCLE_REPEAT_INTERVAL 0x0000001C /* ADISENSE_CORE Time Between Repeats of Multi-Cycle Conversions.... */ -#define REG_ADISENSE_CORE_STATUS_RESET 0x00000000 /* Reset Value for Status */ -#define REG_ADISENSE_CORE_STATUS 0x00000020 /* ADISENSE_CORE General Status */ -#define REG_ADISENSE_CORE_DIAGNOSTICS_STATUS_RESET 0x00000000 /* Reset Value for Diagnostics_Status */ -#define REG_ADISENSE_CORE_DIAGNOSTICS_STATUS 0x00000024 /* ADISENSE_CORE Diagnostics Status */ -#define REG_ADISENSE_CORE_CHANNEL_ALERT_STATUS_RESET 0x00000000 /* Reset Value for Channel_Alert_Status */ -#define REG_ADISENSE_CORE_CHANNEL_ALERT_STATUS 0x00000026 /* ADISENSE_CORE Alert Status Summary */ -#define REG_ADISENSE_CORE_ALERT_STATUS_2_RESET 0x00000000 /* Reset Value for Alert_Status_2 */ -#define REG_ADISENSE_CORE_ALERT_STATUS_2 0x00000028 /* ADISENSE_CORE Additional Alert Status Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CHn_RESET 0x00000000 /* Reset Value for Alert_Detail_Ch[n] */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH0 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH1 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH2 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH3 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH4 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH5 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH6 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH7 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH8 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH9 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH10 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH11 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH12 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH13 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH14 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_DETAIL_CH15 */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH0 0x0000002A /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH1 0x0000002C /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH2 0x0000002E /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH3 0x00000030 /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH4 0x00000032 /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH5 0x00000034 /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH6 0x00000036 /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH7 0x00000038 /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH8 0x0000003A /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH9 0x0000003C /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH10 0x0000003E /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH11 0x00000040 /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH12 0x00000042 /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH13 0x00000044 /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH14 0x00000046 /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CH15 0x00000048 /* ADISENSE_CORE Detailed Error Information */ -#define REG_ADISENSE_CORE_ALERT_DETAIL_CHn(i) (REG_ADISENSE_CORE_ALERT_DETAIL_CH0 + ((i) * 2)) -#define REG_ADISENSE_CORE_ALERT_DETAIL_CHn_COUNT 16 -#define REG_ADISENSE_CORE_ERROR_CODE_RESET 0x00000000 /* Reset Value for Error_Code */ -#define REG_ADISENSE_CORE_ERROR_CODE 0x0000004C /* ADISENSE_CORE Code Indicating Source of Error */ -#define REG_ADISENSE_CORE_ALERT_CODE_RESET 0x00000000 /* Reset Value for Alert_Code */ -#define REG_ADISENSE_CORE_ALERT_CODE 0x0000004E /* ADISENSE_CORE Code Indicating Source of Alert */ -#define REG_ADISENSE_CORE_EXTERNAL_REFERENCE1_RESET 0x00000000 /* Reset Value for External_Reference1 */ -#define REG_ADISENSE_CORE_EXTERNAL_REFERENCE1 0x00000050 /* ADISENSE_CORE External Reference Information */ -#define REG_ADISENSE_CORE_EXTERNAL_REFERENCE2_RESET 0x00000000 /* Reset Value for External_Reference2 */ -#define REG_ADISENSE_CORE_EXTERNAL_REFERENCE2 0x00000054 /* ADISENSE_CORE External Reference Information */ -#define REG_ADISENSE_CORE_DIAGNOSTICS_CONTROL_RESET 0x00000000 /* Reset Value for Diagnostics_Control */ -#define REG_ADISENSE_CORE_DIAGNOSTICS_CONTROL 0x0000005C /* ADISENSE_CORE Diagnostic Control */ -#define REG_ADISENSE_CORE_DATA_FIFO_RESET 0x00000000 /* Reset Value for Data_FIFO */ -#define REG_ADISENSE_CORE_DATA_FIFO 0x00000060 /* ADISENSE_CORE FIFO Buffer of Sensor Results */ -#define REG_ADISENSE_CORE_DEBUG_CODE_RESET 0x00000000 /* Reset Value for Debug_Code */ -#define REG_ADISENSE_CORE_DEBUG_CODE 0x00000064 /* ADISENSE_CORE Additional Information on Source of Alert or Errors */ -#define REG_ADISENSE_CORE_FFT_CONFIG_RESET 0x00000000 /* Reset Value for FFT_Config */ -#define REG_ADISENSE_CORE_FFT_CONFIG 0x00000068 /* ADISENSE_CORE FFT Configuration */ -#define REG_ADISENSE_CORE_ADVANCED_SENSOR_ACCESS_RESET 0x00000000 /* Reset Value for Advanced_Sensor_Access */ -#define REG_ADISENSE_CORE_ADVANCED_SENSOR_ACCESS 0x0000006E /* ADISENSE_CORE Enables Access to Advanced Sensor Configuration */ -#define REG_ADISENSE_CORE_LUT_SELECT_RESET 0x00000000 /* Reset Value for LUT_Select */ -#define REG_ADISENSE_CORE_LUT_SELECT 0x00000070 /* ADISENSE_CORE Read/Write Strobe */ -#define REG_ADISENSE_CORE_LUT_OFFSET_RESET 0x00000000 /* Reset Value for LUT_Offset */ -#define REG_ADISENSE_CORE_LUT_OFFSET 0x00000072 /* ADISENSE_CORE Offset into Selected LUT */ -#define REG_ADISENSE_CORE_LUT_DATA_RESET 0x00000000 /* Reset Value for LUT_Data */ -#define REG_ADISENSE_CORE_LUT_DATA 0x00000074 /* ADISENSE_CORE Data to Read/Write from Addressed LUT Entry */ -#define REG_ADISENSE_CORE_EXT_FLASH_INDEX_RESET 0x00000000 /* Reset Value for Ext_Flash_Index */ -#define REG_ADISENSE_CORE_EXT_FLASH_INDEX 0x00000080 /* ADISENSE_CORE Start Position (Sample No.) for Retrieval of Ext. Flash Data */ -#define REG_ADISENSE_CORE_EXT_FLASH_SAMPLE_COUNT_RESET 0x00000000 /* Reset Value for Ext_Flash_Sample_Count */ -#define REG_ADISENSE_CORE_EXT_FLASH_SAMPLE_COUNT 0x00000084 /* ADISENSE_CORE Indicates How Many Samples Stored in External Flash */ -#define REG_ADISENSE_CORE_EXT_FLASH_DATA_RESET 0x00000000 /* Reset Value for Ext_Flash_Data */ -#define REG_ADISENSE_CORE_EXT_FLASH_DATA 0x00000088 /* ADISENSE_CORE Data Read Back from External Flash */ -#define REG_ADISENSE_CORE_REVISION_RESET 0x00000000 /* Reset Value for Revision */ -#define REG_ADISENSE_CORE_REVISION 0x0000008C /* ADISENSE_CORE Hardware, Firmware Revision */ -#define REG_ADISENSE_CORE_CHANNEL_COUNTn_RESET 0x00000000 /* Reset Value for Channel_Count[n] */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT0 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT1 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT2 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT3 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT4 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT5 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT6 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT7 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT8 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT9 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT10 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT11 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT12 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT13 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT14 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_COUNT15 */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT0 0x00000090 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT1 0x000000D0 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT2 0x00000110 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT3 0x00000150 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT4 0x00000190 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT5 0x000001D0 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT6 0x00000210 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT7 0x00000250 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT8 0x00000290 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT9 0x000002D0 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT10 0x00000310 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT11 0x00000350 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT12 0x00000390 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT13 0x000003D0 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT14 0x00000410 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNT15 0x00000450 /* ADISENSE_CORE Number of Channel Occurrences per Measurement Cycle */ -#define REG_ADISENSE_CORE_CHANNEL_COUNTn(i) (REG_ADISENSE_CORE_CHANNEL_COUNT0 + ((i) * 64)) -#define REG_ADISENSE_CORE_CHANNEL_COUNTn_COUNT 16 -#define REG_ADISENSE_CORE_CHANNEL_OPTIONSn_RESET 0x00000000 /* Reset Value for Channel_Options[n] */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS0 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS1 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS2 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS3 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS4 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS5 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS6 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS7 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS8 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS9 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS10 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS11 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS12 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS13 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS14 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_OPTIONS15 */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS0 0x00000091 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS1 0x000000D1 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS2 0x00000111 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS3 0x00000151 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS4 0x00000191 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS5 0x000001D1 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS6 0x00000211 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS7 0x00000251 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS8 0x00000291 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS9 0x000002D1 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS10 0x00000311 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS11 0x00000351 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS12 0x00000391 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS13 0x000003D1 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS14 0x00000411 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONS15 0x00000451 /* ADISENSE_CORE Position of Channel Within Sequence and Enable for FFT */ -#define REG_ADISENSE_CORE_CHANNEL_OPTIONSn(i) (REG_ADISENSE_CORE_CHANNEL_OPTIONS0 + ((i) * 64)) -#define REG_ADISENSE_CORE_CHANNEL_OPTIONSn_COUNT 16 -#define REG_ADISENSE_CORE_SENSOR_TYPEn_RESET 0x00000000 /* Reset Value for Sensor_Type[n] */ -#define REG_ADISENSE_CORE_SENSOR_TYPE0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE0 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE1 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE2 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE3 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE4 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE5 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE6 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE7 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE8 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE9 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE10 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE11 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE12 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE13 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE14 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_TYPE15 */ -#define REG_ADISENSE_CORE_SENSOR_TYPE0 0x00000092 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE1 0x000000D2 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE2 0x00000112 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE3 0x00000152 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE4 0x00000192 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE5 0x000001D2 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE6 0x00000212 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE7 0x00000252 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE8 0x00000292 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE9 0x000002D2 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE10 0x00000312 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE11 0x00000352 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE12 0x00000392 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE13 0x000003D2 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE14 0x00000412 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPE15 0x00000452 /* ADISENSE_CORE Sensor Select */ -#define REG_ADISENSE_CORE_SENSOR_TYPEn(i) (REG_ADISENSE_CORE_SENSOR_TYPE0 + ((i) * 64)) -#define REG_ADISENSE_CORE_SENSOR_TYPEn_COUNT 16 -#define REG_ADISENSE_CORE_SENSOR_DETAILSn_RESET 0x0000FFF0 /* Reset Value for Sensor_Details[n] */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS0_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS0 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS1_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS1 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS2_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS2 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS3_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS3 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS4_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS4 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS5_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS5 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS6_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS6 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS7_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS7 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS8_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS8 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS9_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS9 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS10_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS10 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS11_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS11 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS12_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS12 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS13_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS13 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS14_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS14 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS15_RESET 0x0000FFF0 /* Reset Value for REG_ADISENSE_CORE_SENSOR_DETAILS15 */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS0 0x00000094 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS1 0x000000D4 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS2 0x00000114 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS3 0x00000154 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS4 0x00000194 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS5 0x000001D4 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS6 0x00000214 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS7 0x00000254 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS8 0x00000294 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS9 0x000002D4 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS10 0x00000314 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS11 0x00000354 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS12 0x00000394 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS13 0x000003D4 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS14 0x00000414 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILS15 0x00000454 /* ADISENSE_CORE Sensor Details */ -#define REG_ADISENSE_CORE_SENSOR_DETAILSn(i) (REG_ADISENSE_CORE_SENSOR_DETAILS0 + ((i) * 64)) -#define REG_ADISENSE_CORE_SENSOR_DETAILSn_COUNT 16 -#define REG_ADISENSE_CORE_CHANNEL_EXCITATIONn_RESET 0x00000000 /* Reset Value for Channel_Excitation[n] */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION0 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION1 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION2 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION3 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION4 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION5 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION6 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION7 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION8 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION9 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION10 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION11 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION12 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION13 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION14 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_EXCITATION15 */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION0 0x00000098 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION1 0x000000D8 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION2 0x00000118 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION3 0x00000158 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION4 0x00000198 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION5 0x000001D8 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION6 0x00000218 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION7 0x00000258 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION8 0x00000298 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION9 0x000002D8 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION10 0x00000318 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION11 0x00000358 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION12 0x00000398 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION13 0x000003D8 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION14 0x00000418 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATION15 0x00000458 /* ADISENSE_CORE Excitation Current */ -#define REG_ADISENSE_CORE_CHANNEL_EXCITATIONn(i) (REG_ADISENSE_CORE_CHANNEL_EXCITATION0 + ((i) * 64)) -#define REG_ADISENSE_CORE_CHANNEL_EXCITATIONn_COUNT 16 -#define REG_ADISENSE_CORE_SETTLING_TIMEn_RESET 0x00000000 /* Reset Value for Settling_Time[n] */ -#define REG_ADISENSE_CORE_SETTLING_TIME0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME0 */ -#define REG_ADISENSE_CORE_SETTLING_TIME1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME1 */ -#define REG_ADISENSE_CORE_SETTLING_TIME2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME2 */ -#define REG_ADISENSE_CORE_SETTLING_TIME3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME3 */ -#define REG_ADISENSE_CORE_SETTLING_TIME4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME4 */ -#define REG_ADISENSE_CORE_SETTLING_TIME5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME5 */ -#define REG_ADISENSE_CORE_SETTLING_TIME6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME6 */ -#define REG_ADISENSE_CORE_SETTLING_TIME7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME7 */ -#define REG_ADISENSE_CORE_SETTLING_TIME8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME8 */ -#define REG_ADISENSE_CORE_SETTLING_TIME9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME9 */ -#define REG_ADISENSE_CORE_SETTLING_TIME10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME10 */ -#define REG_ADISENSE_CORE_SETTLING_TIME11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME11 */ -#define REG_ADISENSE_CORE_SETTLING_TIME12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME12 */ -#define REG_ADISENSE_CORE_SETTLING_TIME13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME13 */ -#define REG_ADISENSE_CORE_SETTLING_TIME14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME14 */ -#define REG_ADISENSE_CORE_SETTLING_TIME15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SETTLING_TIME15 */ -#define REG_ADISENSE_CORE_SETTLING_TIME0 0x0000009A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME1 0x000000DA /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME2 0x0000011A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME3 0x0000015A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME4 0x0000019A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME5 0x000001DA /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME6 0x0000021A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME7 0x0000025A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME8 0x0000029A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME9 0x000002DA /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME10 0x0000031A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME11 0x0000035A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME12 0x0000039A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME13 0x000003DA /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME14 0x0000041A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIME15 0x0000045A /* ADISENSE_CORE Settling Time */ -#define REG_ADISENSE_CORE_SETTLING_TIMEn(i) (REG_ADISENSE_CORE_SETTLING_TIME0 + ((i) * 64)) -#define REG_ADISENSE_CORE_SETTLING_TIMEn_COUNT 16 -#define REG_ADISENSE_CORE_FILTER_SELECTn_RESET 0x00000000 /* Reset Value for Filter_Select[n] */ -#define REG_ADISENSE_CORE_FILTER_SELECT0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT0 */ -#define REG_ADISENSE_CORE_FILTER_SELECT1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT1 */ -#define REG_ADISENSE_CORE_FILTER_SELECT2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT2 */ -#define REG_ADISENSE_CORE_FILTER_SELECT3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT3 */ -#define REG_ADISENSE_CORE_FILTER_SELECT4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT4 */ -#define REG_ADISENSE_CORE_FILTER_SELECT5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT5 */ -#define REG_ADISENSE_CORE_FILTER_SELECT6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT6 */ -#define REG_ADISENSE_CORE_FILTER_SELECT7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT7 */ -#define REG_ADISENSE_CORE_FILTER_SELECT8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT8 */ -#define REG_ADISENSE_CORE_FILTER_SELECT9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT9 */ -#define REG_ADISENSE_CORE_FILTER_SELECT10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT10 */ -#define REG_ADISENSE_CORE_FILTER_SELECT11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT11 */ -#define REG_ADISENSE_CORE_FILTER_SELECT12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT12 */ -#define REG_ADISENSE_CORE_FILTER_SELECT13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT13 */ -#define REG_ADISENSE_CORE_FILTER_SELECT14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT14 */ -#define REG_ADISENSE_CORE_FILTER_SELECT15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_FILTER_SELECT15 */ -#define REG_ADISENSE_CORE_FILTER_SELECT0 0x0000009C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT1 0x000000DC /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT2 0x0000011C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT3 0x0000015C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT4 0x0000019C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT5 0x000001DC /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT6 0x0000021C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT7 0x0000025C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT8 0x0000029C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT9 0x000002DC /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT10 0x0000031C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT11 0x0000035C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT12 0x0000039C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT13 0x000003DC /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT14 0x0000041C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECT15 0x0000045C /* ADISENSE_CORE ADC Digital Filter Selection */ -#define REG_ADISENSE_CORE_FILTER_SELECTn(i) (REG_ADISENSE_CORE_FILTER_SELECT0 + ((i) * 64)) -#define REG_ADISENSE_CORE_FILTER_SELECTn_COUNT 16 -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMITn_RESET 0x7F800000 /* Reset Value for High_Threshold_Limit[n] */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT0_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT0 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT1_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT1 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT2_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT2 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT3_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT3 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT4_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT4 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT5_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT5 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT6_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT6 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT7_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT7 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT8_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT8 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT9_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT9 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT10_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT10 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT11_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT11 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT12_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT12 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT13_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT13 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT14_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT14 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT15_RESET 0x7F800000 /* Reset Value for REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT15 */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT0 0x000000A0 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT1 0x000000E0 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT2 0x00000120 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT3 0x00000160 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT4 0x000001A0 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT5 0x000001E0 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT6 0x00000220 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT7 0x00000260 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT8 0x000002A0 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT9 0x000002E0 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT10 0x00000320 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT11 0x00000360 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT12 0x000003A0 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT13 0x000003E0 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT14 0x00000420 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT15 0x00000460 /* ADISENSE_CORE High Threshold */ -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMITn(i) (REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT0 + ((i) * 64)) -#define REG_ADISENSE_CORE_HIGH_THRESHOLD_LIMITn_COUNT 16 -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMITn_RESET 0xFF800000 /* Reset Value for Low_Threshold_Limit[n] */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT0_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT0 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT1_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT1 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT2_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT2 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT3_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT3 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT4_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT4 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT5_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT5 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT6_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT6 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT7_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT7 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT8_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT8 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT9_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT9 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT10_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT10 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT11_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT11 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT12_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT12 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT13_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT13 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT14_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT14 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT15_RESET 0xFF800000 /* Reset Value for REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT15 */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT0 0x000000A4 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT1 0x000000E4 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT2 0x00000124 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT3 0x00000164 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT4 0x000001A4 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT5 0x000001E4 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT6 0x00000224 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT7 0x00000264 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT8 0x000002A4 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT9 0x000002E4 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT10 0x00000324 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT11 0x00000364 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT12 0x000003A4 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT13 0x000003E4 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT14 0x00000424 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT15 0x00000464 /* ADISENSE_CORE Low Threshold */ -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMITn(i) (REG_ADISENSE_CORE_LOW_THRESHOLD_LIMIT0 + ((i) * 64)) -#define REG_ADISENSE_CORE_LOW_THRESHOLD_LIMITn_COUNT 16 -#define REG_ADISENSE_CORE_SENSOR_OFFSETn_RESET 0x00000000 /* Reset Value for Sensor_Offset[n] */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET0 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET1 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET2 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET3 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET4 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET5 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET6 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET7 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET8 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET9 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET10 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET11 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET12 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET13 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET14 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_OFFSET15 */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET0 0x000000A8 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET1 0x000000E8 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET2 0x00000128 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET3 0x00000168 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET4 0x000001A8 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET5 0x000001E8 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET6 0x00000228 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET7 0x00000268 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET8 0x000002A8 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET9 0x000002E8 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET10 0x00000328 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET11 0x00000368 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET12 0x000003A8 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET13 0x000003E8 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET14 0x00000428 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSET15 0x00000468 /* ADISENSE_CORE Sensor Offset Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_OFFSETn(i) (REG_ADISENSE_CORE_SENSOR_OFFSET0 + ((i) * 64)) -#define REG_ADISENSE_CORE_SENSOR_OFFSETn_COUNT 16 -#define REG_ADISENSE_CORE_SENSOR_GAINn_RESET 0x3F800000 /* Reset Value for Sensor_Gain[n] */ -#define REG_ADISENSE_CORE_SENSOR_GAIN0_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN0 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN1_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN1 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN2_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN2 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN3_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN3 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN4_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN4 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN5_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN5 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN6_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN6 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN7_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN7 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN8_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN8 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN9_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN9 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN10_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN10 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN11_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN11 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN12_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN12 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN13_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN13 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN14_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN14 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN15_RESET 0x3F800000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_GAIN15 */ -#define REG_ADISENSE_CORE_SENSOR_GAIN0 0x000000AC /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN1 0x000000EC /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN2 0x0000012C /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN3 0x0000016C /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN4 0x000001AC /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN5 0x000001EC /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN6 0x0000022C /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN7 0x0000026C /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN8 0x000002AC /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN9 0x000002EC /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN10 0x0000032C /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN11 0x0000036C /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN12 0x000003AC /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN13 0x000003EC /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN14 0x0000042C /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAIN15 0x0000046C /* ADISENSE_CORE Sensor Gain Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_GAINn(i) (REG_ADISENSE_CORE_SENSOR_GAIN0 + ((i) * 64)) -#define REG_ADISENSE_CORE_SENSOR_GAINn_COUNT 16 -#define REG_ADISENSE_CORE_ALERT_CODE_CHn_RESET 0x00000000 /* Reset Value for Alert_Code_Ch[n] */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH0 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH1 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH2 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH3 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH4 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH5 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH6 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH7 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH8 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH9 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH10 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH11 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH12 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH13 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH14 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_ALERT_CODE_CH15 */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH0 0x000000B0 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH1 0x000000F0 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH2 0x00000130 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH3 0x00000170 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH4 0x000001B0 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH5 0x000001F0 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH6 0x00000230 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH7 0x00000270 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH8 0x000002B0 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH9 0x000002F0 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH10 0x00000330 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH11 0x00000370 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH12 0x000003B0 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH13 0x000003F0 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH14 0x00000430 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CH15 0x00000470 /* ADISENSE_CORE Per-Channel Detailed Alert-Code Information */ -#define REG_ADISENSE_CORE_ALERT_CODE_CHn(i) (REG_ADISENSE_CORE_ALERT_CODE_CH0 + ((i) * 64)) -#define REG_ADISENSE_CORE_ALERT_CODE_CHn_COUNT 16 -#define REG_ADISENSE_CORE_CHANNEL_SKIPn_RESET 0x00000000 /* Reset Value for Channel_Skip[n] */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP0 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP1 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP2 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP3 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP4 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP5 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP6 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP7 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP8 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP9 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP10 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP11 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP12 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP13 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP14 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CHANNEL_SKIP15 */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP0 0x000000B2 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP1 0x000000F2 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP2 0x00000132 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP3 0x00000172 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP4 0x000001B2 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP5 0x000001F2 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP6 0x00000232 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP7 0x00000272 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP8 0x000002B2 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP9 0x000002F2 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP10 0x00000332 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP11 0x00000372 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP12 0x000003B2 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP13 0x000003F2 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP14 0x00000432 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIP15 0x00000472 /* ADISENSE_CORE Indicates If Channel Will Skip Some Measurement Cycles */ -#define REG_ADISENSE_CORE_CHANNEL_SKIPn(i) (REG_ADISENSE_CORE_CHANNEL_SKIP0 + ((i) * 64)) -#define REG_ADISENSE_CORE_CHANNEL_SKIPn_COUNT 16 -#define REG_ADISENSE_CORE_SENSOR_PARAMETERn_RESET 0x7FC00000 /* Reset Value for Sensor_Parameter[n] */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER0_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER0 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER1_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER1 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER2_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER2 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER3_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER3 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER4_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER4 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER5_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER5 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER6_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER6 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER7_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER7 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER8_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER8 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER9_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER9 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER10_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER10 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER11_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER11 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER12_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER12 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER13_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER13 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER14_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER14 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER15_RESET 0x7FC00000 /* Reset Value for REG_ADISENSE_CORE_SENSOR_PARAMETER15 */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER0 0x000000B4 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER1 0x000000F4 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER2 0x00000134 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER3 0x00000174 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER4 0x000001B4 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER5 0x000001F4 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER6 0x00000234 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER7 0x00000274 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER8 0x000002B4 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER9 0x000002F4 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER10 0x00000334 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER11 0x00000374 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER12 0x000003B4 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER13 0x000003F4 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER14 0x00000434 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETER15 0x00000474 /* ADISENSE_CORE Sensor Parameter Adjustment */ -#define REG_ADISENSE_CORE_SENSOR_PARAMETERn(i) (REG_ADISENSE_CORE_SENSOR_PARAMETER0 + ((i) * 64)) -#define REG_ADISENSE_CORE_SENSOR_PARAMETERn_COUNT 16 -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETERn_RESET 0x00000000 /* Reset Value for Calibration_Parameter[n] */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER0 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER1 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER2 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER3 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER4 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER5 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER6 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER7 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER8 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER9 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER10 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER11 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER12 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER13 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER14 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_CALIBRATION_PARAMETER15 */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER0 0x000000B8 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER1 0x000000F8 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER2 0x00000138 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER3 0x00000178 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER4 0x000001B8 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER5 0x000001F8 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER6 0x00000238 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER7 0x00000278 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER8 0x000002B8 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER9 0x000002F8 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER10 0x00000338 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER11 0x00000378 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER12 0x000003B8 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER13 0x000003F8 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER14 0x00000438 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETER15 0x00000478 /* ADISENSE_CORE Calibration Parameter Value */ -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETERn(i) (REG_ADISENSE_CORE_CALIBRATION_PARAMETER0 + ((i) * 64)) -#define REG_ADISENSE_CORE_CALIBRATION_PARAMETERn_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIGn_RESET 0x00000000 /* Reset Value for Digital_Sensor_Config[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG0 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG8 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG9 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG10 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG11 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG12 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG13 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG14 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG15 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG0 0x000000BC /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG1 0x000000FC /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG2 0x0000013C /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG3 0x0000017C /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG4 0x000001BC /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG5 0x000001FC /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG6 0x0000023C /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG7 0x0000027C /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG8 0x000002BC /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG9 0x000002FC /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG10 0x0000033C /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG11 0x0000037C /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG12 0x000003BC /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG13 0x000003FC /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG14 0x0000043C /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG15 0x0000047C /* ADISENSE_CORE Digital Sensor Data Coding */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIGn(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG0 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_CONFIGn_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESSn_RESET 0x00000000 /* Reset Value for Digital_Sensor_Address[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS0 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS8 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS9 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS10 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS11 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS12 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS13 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS14 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS15 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS0 0x000000BE /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS1 0x000000FE /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS2 0x0000013E /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS3 0x0000017E /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS4 0x000001BE /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS5 0x000001FE /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS6 0x0000023E /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS7 0x0000027E /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS8 0x000002BE /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS9 0x000002FE /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS10 0x0000033E /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS11 0x0000037E /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS12 0x000003BE /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS13 0x000003FE /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS14 0x0000043E /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS15 0x0000047E /* ADISENSE_CORE Sensor Address */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESSn(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS0 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESSn_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDSn_RESET 0x00000000 /* Reset Value for Digital_Sensor_Num_Cmds[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS0_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS0 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS1_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS2_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS3_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS4_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS5_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS6_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS7_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS8_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS8 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS9_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS9 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS10 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS11 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS12 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS13 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS14 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS15 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS0 0x000000BF /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS1 0x000000FF /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS2 0x0000013F /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS3 0x0000017F /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS4 0x000001BF /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS5 0x000001FF /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS6 0x0000023F /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS7 0x0000027F /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS8 0x000002BF /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS9 0x000002FF /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS10 0x0000033F /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS11 0x0000037F /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS12 0x000003BF /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS13 0x000003FF /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS14 0x0000043F /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS15 0x0000047F /* ADISENSE_CORE Number of Configuration, Read Commands for Digital Sensors */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDSn(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS0 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDSn_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMSn_RESET 0x00000006 /* Reset Value for Digital_Sensor_Comms[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS0_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS0 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS1_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS2_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS3_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS4_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS5_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS6_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS7_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS8_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS8 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS9_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS9 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS10_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS10 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS11_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS11 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS12_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS12 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS13_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS13 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS14_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS14 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS15_RESET 0x00000006 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS15 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS0 0x000000C0 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS1 0x00000100 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS2 0x00000140 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS3 0x00000180 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS4 0x000001C0 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS5 0x00000200 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS6 0x00000240 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS7 0x00000280 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS8 0x000002C0 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS9 0x00000300 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS10 0x00000340 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS11 0x00000380 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS12 0x000003C0 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS13 0x00000400 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS14 0x00000440 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS15 0x00000480 /* ADISENSE_CORE Digital Sensor Communication Clock Configuration */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMSn(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMS0 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMSn_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND1n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command1[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND10 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND11 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND12 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND13 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND14 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND15 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND16_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND16 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND17_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND17 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND18_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND18 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND19_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND19 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND110_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND110 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND111_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND111 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND112_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND112 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND113_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND113 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND114_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND114 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND115_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND115 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND10 0x000000C2 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND11 0x00000102 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND12 0x00000142 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND13 0x00000182 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND14 0x000001C2 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND15 0x00000202 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND16 0x00000242 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND17 0x00000282 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND18 0x000002C2 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND19 0x00000302 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND110 0x00000342 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND111 0x00000382 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND112 0x000003C2 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND113 0x00000402 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND114 0x00000442 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND115 0x00000482 /* ADISENSE_CORE Sensor Configuration Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND1n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND10 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND1n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND2n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command2[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND20_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND20 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND21_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND21 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND22_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND22 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND23_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND23 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND24_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND24 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND25_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND25 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND26_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND26 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND27_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND27 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND28_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND28 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND29_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND29 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND210_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND210 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND211_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND211 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND212_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND212 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND213_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND213 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND214_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND214 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND215_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND215 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND20 0x000000C3 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND21 0x00000103 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND22 0x00000143 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND23 0x00000183 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND24 0x000001C3 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND25 0x00000203 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND26 0x00000243 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND27 0x00000283 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND28 0x000002C3 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND29 0x00000303 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND210 0x00000343 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND211 0x00000383 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND212 0x000003C3 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND213 0x00000403 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND214 0x00000443 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND215 0x00000483 /* ADISENSE_CORE Sensor Configuration Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND2n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND20 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND2n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND3n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command3[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND30_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND30 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND31_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND31 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND32_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND32 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND33_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND33 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND34_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND34 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND35_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND35 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND36_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND36 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND37_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND37 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND38_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND38 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND39_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND39 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND310_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND310 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND311_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND311 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND312_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND312 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND313_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND313 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND314_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND314 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND315_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND315 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND30 0x000000C4 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND31 0x00000104 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND32 0x00000144 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND33 0x00000184 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND34 0x000001C4 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND35 0x00000204 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND36 0x00000244 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND37 0x00000284 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND38 0x000002C4 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND39 0x00000304 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND310 0x00000344 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND311 0x00000384 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND312 0x000003C4 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND313 0x00000404 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND314 0x00000444 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND315 0x00000484 /* ADISENSE_CORE Sensor Configuration Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND3n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND30 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND3n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND4n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command4[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND40_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND40 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND41_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND41 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND42_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND42 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND43_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND43 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND44_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND44 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND45_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND45 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND46_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND46 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND47_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND47 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND48_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND48 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND49_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND49 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND410_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND410 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND411_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND411 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND412_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND412 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND413_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND413 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND414_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND414 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND415_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND415 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND40 0x000000C5 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND41 0x00000105 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND42 0x00000145 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND43 0x00000185 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND44 0x000001C5 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND45 0x00000205 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND46 0x00000245 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND47 0x00000285 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND48 0x000002C5 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND49 0x00000305 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND410 0x00000345 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND411 0x00000385 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND412 0x000003C5 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND413 0x00000405 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND414 0x00000445 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND415 0x00000485 /* ADISENSE_CORE Sensor Configuration Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND4n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND40 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND4n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND5n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command5[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND50_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND50 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND51_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND51 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND52_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND52 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND53_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND53 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND54_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND54 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND55_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND55 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND56_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND56 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND57_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND57 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND58_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND58 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND59_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND59 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND510_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND510 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND511_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND511 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND512_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND512 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND513_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND513 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND514_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND514 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND515_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND515 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND50 0x000000C6 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND51 0x00000106 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND52 0x00000146 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND53 0x00000186 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND54 0x000001C6 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND55 0x00000206 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND56 0x00000246 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND57 0x00000286 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND58 0x000002C6 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND59 0x00000306 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND510 0x00000346 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND511 0x00000386 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND512 0x000003C6 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND513 0x00000406 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND514 0x00000446 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND515 0x00000486 /* ADISENSE_CORE Sensor Configuration Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND5n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND50 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND5n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND6n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command6[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND60_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND60 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND61_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND61 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND62_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND62 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND63_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND63 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND64_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND64 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND65_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND65 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND66_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND66 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND67_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND67 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND68_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND68 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND69_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND69 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND610_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND610 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND611_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND611 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND612_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND612 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND613_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND613 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND614_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND614 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND615_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND615 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND60 0x000000C7 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND61 0x00000107 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND62 0x00000147 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND63 0x00000187 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND64 0x000001C7 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND65 0x00000207 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND66 0x00000247 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND67 0x00000287 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND68 0x000002C7 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND69 0x00000307 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND610 0x00000347 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND611 0x00000387 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND612 0x000003C7 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND613 0x00000407 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND614 0x00000447 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND615 0x00000487 /* ADISENSE_CORE Sensor Configuration Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND6n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND60 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND6n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND7n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command7[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND70_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND70 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND71_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND71 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND72_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND72 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND73_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND73 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND74_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND74 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND75_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND75 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND76_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND76 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND77_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND77 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND78_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND78 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND79_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND79 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND710_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND710 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND711_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND711 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND712_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND712 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND713_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND713 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND714_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND714 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND715_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND715 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND70 0x000000C8 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND71 0x00000108 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND72 0x00000148 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND73 0x00000188 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND74 0x000001C8 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND75 0x00000208 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND76 0x00000248 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND77 0x00000288 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND78 0x000002C8 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND79 0x00000308 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND710 0x00000348 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND711 0x00000388 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND712 0x000003C8 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND713 0x00000408 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND714 0x00000448 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND715 0x00000488 /* ADISENSE_CORE Sensor Configuration Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND7n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND70 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND7n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD1n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd1[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD10_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD10 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD11_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD11 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD12_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD12 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD13_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD13 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD14_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD14 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD15_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD15 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD16_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD16 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD17_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD17 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD18_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD18 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD19_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD19 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD110_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD110 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD111_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD111 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD112_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD112 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD113_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD113 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD114_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD114 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD115_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD115 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD10 0x000000C9 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD11 0x00000109 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD12 0x00000149 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD13 0x00000189 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD14 0x000001C9 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD15 0x00000209 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD16 0x00000249 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD17 0x00000289 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD18 0x000002C9 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD19 0x00000309 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD110 0x00000349 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD111 0x00000389 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD112 0x000003C9 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD113 0x00000409 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD114 0x00000449 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD115 0x00000489 /* ADISENSE_CORE Sensor Read Command1 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD1n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD10 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD1n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD2n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd2[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD20_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD20 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD21_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD21 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD22_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD22 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD23_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD23 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD24_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD24 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD25_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD25 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD26_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD26 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD27_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD27 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD28_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD28 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD29_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD29 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD210_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD210 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD211_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD211 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD212_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD212 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD213_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD213 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD214_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD214 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD215_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD215 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD20 0x000000CA /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD21 0x0000010A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD22 0x0000014A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD23 0x0000018A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD24 0x000001CA /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD25 0x0000020A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD26 0x0000024A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD27 0x0000028A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD28 0x000002CA /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD29 0x0000030A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD210 0x0000034A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD211 0x0000038A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD212 0x000003CA /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD213 0x0000040A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD214 0x0000044A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD215 0x0000048A /* ADISENSE_CORE Sensor Read Command2 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD2n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD20 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD2n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD3n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd3[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD30_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD30 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD31_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD31 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD32_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD32 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD33_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD33 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD34_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD34 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD35_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD35 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD36_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD36 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD37_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD37 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD38_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD38 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD39_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD39 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD310_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD310 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD311_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD311 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD312_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD312 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD313_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD313 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD314_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD314 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD315_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD315 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD30 0x000000CB /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD31 0x0000010B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD32 0x0000014B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD33 0x0000018B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD34 0x000001CB /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD35 0x0000020B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD36 0x0000024B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD37 0x0000028B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD38 0x000002CB /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD39 0x0000030B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD310 0x0000034B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD311 0x0000038B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD312 0x000003CB /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD313 0x0000040B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD314 0x0000044B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD315 0x0000048B /* ADISENSE_CORE Sensor Read Command3 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD3n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD30 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD3n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD4n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd4[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD40_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD40 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD41_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD41 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD42_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD42 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD43_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD43 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD44_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD44 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD45_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD45 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD46_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD46 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD47_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD47 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD48_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD48 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD49_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD49 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD410_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD410 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD411_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD411 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD412_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD412 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD413_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD413 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD414_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD414 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD415_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD415 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD40 0x000000CC /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD41 0x0000010C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD42 0x0000014C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD43 0x0000018C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD44 0x000001CC /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD45 0x0000020C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD46 0x0000024C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD47 0x0000028C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD48 0x000002CC /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD49 0x0000030C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD410 0x0000034C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD411 0x0000038C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD412 0x000003CC /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD413 0x0000040C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD414 0x0000044C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD415 0x0000048C /* ADISENSE_CORE Sensor Read Command4 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD4n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD40 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD4n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD5n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd5[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD50_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD50 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD51_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD51 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD52_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD52 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD53_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD53 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD54_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD54 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD55_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD55 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD56_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD56 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD57_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD57 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD58_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD58 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD59_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD59 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD510_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD510 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD511_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD511 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD512_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD512 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD513_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD513 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD514_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD514 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD515_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD515 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD50 0x000000CD /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD51 0x0000010D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD52 0x0000014D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD53 0x0000018D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD54 0x000001CD /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD55 0x0000020D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD56 0x0000024D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD57 0x0000028D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD58 0x000002CD /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD59 0x0000030D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD510 0x0000034D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD511 0x0000038D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD512 0x000003CD /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD513 0x0000040D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD514 0x0000044D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD515 0x0000048D /* ADISENSE_CORE Sensor Read Command5 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD5n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD50 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD5n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD6n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd6[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD60_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD60 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD61_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD61 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD62_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD62 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD63_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD63 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD64_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD64 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD65_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD65 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD66_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD66 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD67_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD67 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD68_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD68 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD69_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD69 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD610_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD610 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD611_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD611 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD612_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD612 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD613_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD613 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD614_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD614 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD615_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD615 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD60 0x000000CE /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD61 0x0000010E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD62 0x0000014E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD63 0x0000018E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD64 0x000001CE /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD65 0x0000020E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD66 0x0000024E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD67 0x0000028E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD68 0x000002CE /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD69 0x0000030E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD610 0x0000034E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD611 0x0000038E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD612 0x000003CE /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD613 0x0000040E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD614 0x0000044E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD615 0x0000048E /* ADISENSE_CORE Sensor Read Command6 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD6n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD60 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD6n_COUNT 16 -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD7n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd7[n] */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD70_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD70 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD71_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD71 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD72_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD72 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD73_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD73 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD74_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD74 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD75_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD75 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD76_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD76 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD77_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD77 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD78_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD78 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD79_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD79 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD710_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD710 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD711_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD711 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD712_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD712 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD713_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD713 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD714_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD714 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD715_RESET 0x00000000 /* Reset Value for REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD715 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD70 0x000000CF /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD71 0x0000010F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD72 0x0000014F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD73 0x0000018F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD74 0x000001CF /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD75 0x0000020F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD76 0x0000024F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD77 0x0000028F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD78 0x000002CF /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD79 0x0000030F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD710 0x0000034F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD711 0x0000038F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD712 0x000003CF /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD713 0x0000040F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD714 0x0000044F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD715 0x0000048F /* ADISENSE_CORE Sensor Read Command7 */ -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD7n(i) (REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD70 + ((i) * 64)) -#define REG_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD7n_COUNT 16 - -/* ============================================================================================================================ - ADISENSE_CORE Register BitMasks, Positions & Enumerations - ============================================================================================================================ */ -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_COMMAND Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_COMMAND_SPECIAL_COMMAND 0 /* Special Command */ -#define BITM_ADISENSE_CORE_COMMAND_SPECIAL_COMMAND 0x000000FF /* Special Command */ -#define ENUM_ADISENSE_CORE_COMMAND_NOP 0x00000000 /* Special_Command: No Command */ -#define ENUM_ADISENSE_CORE_COMMAND_CONVERT 0x00000001 /* Special_Command: Start ADC Conversions */ -#define ENUM_ADISENSE_CORE_COMMAND_CONVERT_WITH_RAW 0x00000002 /* Special_Command: Start Conversions with Added RAW ADC Data */ -#define ENUM_ADISENSE_CORE_COMMAND_RUN_DIAGNOSTICS 0x00000003 /* Special_Command: Initiate a Diagnostics Cycle */ -#define ENUM_ADISENSE_CORE_COMMAND_SELF_CALIBRATION 0x00000004 /* Special_Command: Initiate a Self-Calibration Cycle */ -#define ENUM_ADISENSE_CORE_COMMAND_LATCH_CONFIG 0x00000007 /* Special_Command: Latch Configuration. */ -#define ENUM_ADISENSE_CORE_COMMAND_LOAD_LUT 0x00000008 /* Special_Command: Load LUT from FLASH */ -#define ENUM_ADISENSE_CORE_COMMAND_SAVE_LUT 0x00000009 /* Special_Command: Save LUT to FLASH */ -#define ENUM_ADISENSE_CORE_COMMAND_SYSTEM_CHECK 0x0000000A /* Special_Command: Full Suite of Measurement Diagnostics */ -#define ENUM_ADISENSE_CORE_COMMAND_CONVERT_FFT 0x0000000B /* Special_Command: Perform FFTs on Selected Channel(s) */ -#define ENUM_ADISENSE_CORE_COMMAND_ERASE_EXTERNAL_FLASH 0x00000010 /* Special_Command: Erase Contents of External Flash */ -#define ENUM_ADISENSE_CORE_COMMAND_POWER_DOWN 0x00000014 /* Special_Command: Enter Low Power State */ -#define ENUM_ADISENSE_CORE_COMMAND_LOAD_CONFIG_1 0x00000018 /* Special_Command: Load Registers with Configuration#1 from FLASH */ -#define ENUM_ADISENSE_CORE_COMMAND_SAVE_CONFIG_1 0x00000019 /* Special_Command: Store Current Registers to FLASH Configuration#1 */ -#define ENUM_ADISENSE_CORE_COMMAND_LOAD_CONFIG_2 0x0000001A /* Special_Command: Load Registers with Configuration#2 from FLASH */ -#define ENUM_ADISENSE_CORE_COMMAND_SAVE_CONFIG_2 0x0000001B /* Special_Command: Store Current Registers to FLASH Configuration#2 */ -#define ENUM_ADISENSE_CORE_COMMAND_LOAD_CONFIG_3 0x0000001C /* Special_Command: Load Registers with Configuration#3 from FLASH */ -#define ENUM_ADISENSE_CORE_COMMAND_SAVE_CONFIG_3 0x0000001D /* Special_Command: Store Current Registers to FLASH Configuration#3 */ -#define ENUM_ADISENSE_CORE_COMMAND_LOAD_CONFIG_4 0x0000001E /* Special_Command: Load Registers with Configuration#4 from FLASH */ -#define ENUM_ADISENSE_CORE_COMMAND_SAVE_CONFIG_4 0x0000001F /* Special_Command: Store Current Registers to FLASH Configuration#4 */ -#define ENUM_ADISENSE_CORE_COMMAND_CALIBRATE_DIGITAL 0x00000020 /* Special_Command: Performs a Calibration of Digital Sensor, if Supported & Enabled. */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_MODE Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_MODE_EXT_FLASH_STORE 7 /* Indicates If Measurement Data Should Be Stored in Flash */ -#define BITP_ADISENSE_CORE_MODE_FFT_MODE 5 /* Indicates Single or Multiple Sequence of FFTs */ -#define BITP_ADISENSE_CORE_MODE_CALIBRATION_METHOD 4 /* Indicates If Calibration is Required on 'Latch' Command */ -#define BITP_ADISENSE_CORE_MODE_DRDY_MODE 2 /* Indicates Behavior of DRDY with Respect to FIFO State */ -#define BITP_ADISENSE_CORE_MODE_CONVERSION_MODE 0 /* Conversion Mode */ -#define BITM_ADISENSE_CORE_MODE_EXT_FLASH_STORE 0x00000080 /* Indicates If Measurement Data Should Be Stored in Flash */ -#define BITM_ADISENSE_CORE_MODE_FFT_MODE 0x00000020 /* Indicates Single or Multiple Sequence of FFTs */ -#define BITM_ADISENSE_CORE_MODE_CALIBRATION_METHOD 0x00000010 /* Indicates If Calibration is Required on 'Latch' Command */ -#define BITM_ADISENSE_CORE_MODE_DRDY_MODE 0x0000000C /* Indicates Behavior of DRDY with Respect to FIFO State */ -#define BITM_ADISENSE_CORE_MODE_CONVERSION_MODE 0x00000003 /* Conversion Mode */ -#define ENUM_ADISENSE_CORE_MODE_EXT_FLASH_NOT_USED 0x00000000 /* Ext_Flash_Store: Do Not Use External Flash */ -#define ENUM_ADISENSE_CORE_MODE_EXT_FLASH_USED 0x00000080 /* Ext_Flash_Store: Use External Flash */ -#define ENUM_ADISENSE_CORE_MODE_FFT_MODE_SINGLE 0x00000000 /* FFT_Mode: Perform Single Sequence of FFT(s) on Selected Channel(s) */ -#define ENUM_ADISENSE_CORE_MODE_FFT_MODE_CONTINUOUS 0x00000020 /* FFT_Mode: Perform Continuous Sequence of FFTs on Selected Channel(s) */ -#define ENUM_ADISENSE_CORE_MODE_NO_CAL 0x00000000 /* Calibration_Method: No Calibration Performed */ -#define ENUM_ADISENSE_CORE_MODE_DO_CAL 0x00000010 /* Calibration_Method: Calibration Performed */ -#define ENUM_ADISENSE_CORE_MODE_DRDY_PER_CONVERSION 0x00000000 /* Drdy_Mode: Data Ready Per Conversion */ -#define ENUM_ADISENSE_CORE_MODE_DRDY_PER_CYCLE 0x00000004 /* Drdy_Mode: Data Ready Per Cycle */ -#define ENUM_ADISENSE_CORE_MODE_DRDY_PER_FIFO_FILL 0x00000008 /* Drdy_Mode: Data Ready Per FIFO Fill / Multi-Cycle Burst */ -#define ENUM_ADISENSE_CORE_MODE_SINGLECYCLE 0x00000000 /* Conversion_Mode: Single Cycle */ -#define ENUM_ADISENSE_CORE_MODE_MULTICYCLE 0x00000001 /* Conversion_Mode: Multi Cycle */ -#define ENUM_ADISENSE_CORE_MODE_CONTINUOUS 0x00000002 /* Conversion_Mode: Continuous Conversion */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_POWER_CONFIG Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_POWER_CONFIG_POWER_MODE_ADC 0 /* ADC Power Mode */ -#define BITM_ADISENSE_CORE_POWER_CONFIG_POWER_MODE_ADC 0x00000003 /* ADC Power Mode */ -#define ENUM_ADISENSE_CORE_POWER_CONFIG_ADC_LOW_POWER 0x00000000 /* Power_Mode_ADC: ADC Low Power Mode */ -#define ENUM_ADISENSE_CORE_POWER_CONFIG_ADC_MID_POWER 0x00000001 /* Power_Mode_ADC: ADC Mid Power Mode */ -#define ENUM_ADISENSE_CORE_POWER_CONFIG_ADC_FULL_POWER 0x00000002 /* Power_Mode_ADC: ADC Full Power Mode */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_CYCLE_CONTROL Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TIME_UNITS 14 /* Units for Cycle Time */ -#define BITP_ADISENSE_CORE_CYCLE_CONTROL_FILTER_SETTLING 13 /* Determines ADC Filter Settling in a Multi-Channel Sequence */ -#define BITP_ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TYPE 12 /* Type of Measurement Cycle */ -#define BITP_ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TIME 0 /* Duration of a Full Measurement Cycle */ -#define BITM_ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TIME_UNITS 0x0000C000 /* Units for Cycle Time */ -#define BITM_ADISENSE_CORE_CYCLE_CONTROL_FILTER_SETTLING 0x00002000 /* Determines ADC Filter Settling in a Multi-Channel Sequence */ -#define BITM_ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TYPE 0x00001000 /* Type of Measurement Cycle */ -#define BITM_ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TIME 0x00000FFF /* Duration of a Full Measurement Cycle */ -#define ENUM_ADISENSE_CORE_CYCLE_CONTROL_MICROSECONDS 0x00000000 /* Cycle_Time_Units: Micro-Seconds */ -#define ENUM_ADISENSE_CORE_CYCLE_CONTROL_MILLISECONDS 0x00004000 /* Cycle_Time_Units: Milli-Seconds */ -#define ENUM_ADISENSE_CORE_CYCLE_CONTROL_SECONDS 0x00008000 /* Cycle_Time_Units: Seconds */ -#define ENUM_ADISENSE_CORE_CYCLE_CONTROL_FILTER_SETTLING_SETTLED 0x00000000 /* Filter_Settling: ADC Result Fully Settles for Every Output */ -#define ENUM_ADISENSE_CORE_CYCLE_CONTROL_FILTER_SETTLING_FAST 0x00002000 /* Filter_Settling: ADC Result Appears at Higher Update Rate for Consecutive Conversions */ -#define ENUM_ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TYPE_SWITCH 0x00000000 /* Cycle_Type: Switch Channels After Every Conversion */ -#define ENUM_ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TYPE_FULL 0x00001000 /* Cycle_Type: Perform Full Number Of Conversions On A Channel Consecutively */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_FIFO_NUM_CYCLES Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_FIFO_NUM_CYCLES_FIFO_NUM_CYCLES 0 /* How Many Cycles to Fill FIFO */ -#define BITM_ADISENSE_CORE_FIFO_NUM_CYCLES_FIFO_NUM_CYCLES 0x000000FF /* How Many Cycles to Fill FIFO */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_MULTI_CYCLE_REPEAT_INTERVAL Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_MULTI_CYCLE_REPEAT_INTERVAL_MULTI_CYCLE_REPEAT_INTERVAL 0 /* Defines Time Between Repetitions of Measurement Cycles. */ -#define BITM_ADISENSE_CORE_MULTI_CYCLE_REPEAT_INTERVAL_MULTI_CYCLE_REPEAT_INTERVAL 0x00FFFFFF /* Defines Time Between Repetitions of Measurement Cycles. */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_STATUS Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_STATUS_FIFO_ERROR 5 /* Indicates Error with FIFO */ -#define BITP_ADISENSE_CORE_STATUS_CMD_RUNNING 4 /* Indicates a Special Command is Active */ -#define BITP_ADISENSE_CORE_STATUS_DRDY 3 /* Indicates a New Sensor Result is Available to Be Read */ -#define BITP_ADISENSE_CORE_STATUS_ERROR 2 /* Indicates an Error */ -#define BITP_ADISENSE_CORE_STATUS_ALERT_ACTIVE 1 /* Indicates One or More Sensors Alerts are Active */ -#define BITM_ADISENSE_CORE_STATUS_FIFO_ERROR 0x00000020 /* Indicates Error with FIFO */ -#define BITM_ADISENSE_CORE_STATUS_CMD_RUNNING 0x00000010 /* Indicates a Special Command is Active */ -#define BITM_ADISENSE_CORE_STATUS_DRDY 0x00000008 /* Indicates a New Sensor Result is Available to Be Read */ -#define BITM_ADISENSE_CORE_STATUS_ERROR 0x00000004 /* Indicates an Error */ -#define BITM_ADISENSE_CORE_STATUS_ALERT_ACTIVE 0x00000002 /* Indicates One or More Sensors Alerts are Active */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIAGNOSTICS_STATUS Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_CALIBRATION_ERROR 13 /* Indicates Error During Internal Device Calibrations */ -#define BITP_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_CONVERSION_ERROR 12 /* Indicates Error During Internal ADC Conversions */ -#define BITP_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_SUPPLY_CAP_ERROR 3 /* Indicates Fault on Internal Supply Regulator Capacitor */ -#define BITP_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_SUPPLY_MONITOR_ERROR 2 /* Indicates Low Voltage on Internal Supply Voltages */ -#define BITP_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_COMMS_ERROR 1 /* Indicates Error on Internal Device Communications */ -#define BITP_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_CHECKSUM_ERROR 0 /* Indicates Error on Internal Checksum Calculations */ -#define BITM_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_CALIBRATION_ERROR 0x00002000 /* Indicates Error During Internal Device Calibrations */ -#define BITM_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_CONVERSION_ERROR 0x00001000 /* Indicates Error During Internal ADC Conversions */ -#define BITM_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_SUPPLY_CAP_ERROR 0x00000008 /* Indicates Fault on Internal Supply Regulator Capacitor */ -#define BITM_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_SUPPLY_MONITOR_ERROR 0x00000004 /* Indicates Low Voltage on Internal Supply Voltages */ -#define BITM_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_COMMS_ERROR 0x00000002 /* Indicates Error on Internal Device Communications */ -#define BITM_ADISENSE_CORE_DIAGNOSTICS_STATUS_DIAG_CHECKSUM_ERROR 0x00000001 /* Indicates Error on Internal Checksum Calculations */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_CHANNEL_ALERT_STATUS Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH15 15 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH14 14 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH13 13 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH12 12 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH11 11 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH10 10 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH9 9 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH8 8 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH7 7 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH6 6 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH5 5 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH4 4 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH3 3 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH2 2 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH1 1 /* Indicates Channel Alert is Active */ -#define BITP_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH0 0 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH15 0x00008000 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH14 0x00004000 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH13 0x00002000 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH12 0x00001000 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH11 0x00000800 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH10 0x00000400 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH9 0x00000200 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH8 0x00000100 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH7 0x00000080 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH6 0x00000040 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH5 0x00000020 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH4 0x00000010 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH3 0x00000008 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH2 0x00000004 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH1 0x00000002 /* Indicates Channel Alert is Active */ -#define BITM_ADISENSE_CORE_CHANNEL_ALERT_STATUS_ALERT_CH0 0x00000001 /* Indicates Channel Alert is Active */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_ALERT_STATUS_2 Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_ALERT_STATUS_2_EXT_FLASH_ERROR 7 /* Indicates with External Flash Memory */ -#define BITP_ADISENSE_CORE_ALERT_STATUS_2_TEMPERATURE_ALARM_LO 6 /* Indicates Device Temperature Low Alarm */ -#define BITP_ADISENSE_CORE_ALERT_STATUS_2_TEMPERATURE_ALARM_HI 5 /* Indicates Device Temperature High Alarm */ -#define BITP_ADISENSE_CORE_ALERT_STATUS_2_TEMPERATURE_ALERT_LO 4 /* Indicates Device Temperature Low Alert */ -#define BITP_ADISENSE_CORE_ALERT_STATUS_2_TEMPERATURE_ALERT_HI 3 /* Indicates Device Temperature High Alert */ -#define BITP_ADISENSE_CORE_ALERT_STATUS_2_CONFIGURATION_ERROR 2 /* Indicates Error with Programmed Configuration */ -#define BITP_ADISENSE_CORE_ALERT_STATUS_2_LUT_ERROR 1 /* Indicates Error with One or More Look-Up-Tables */ -#define BITM_ADISENSE_CORE_ALERT_STATUS_2_EXT_FLASH_ERROR 0x00000080 /* Indicates with External Flash Memory */ -#define BITM_ADISENSE_CORE_ALERT_STATUS_2_TEMPERATURE_ALARM_LO 0x00000040 /* Indicates Device Temperature Low Alarm */ -#define BITM_ADISENSE_CORE_ALERT_STATUS_2_TEMPERATURE_ALARM_HI 0x00000020 /* Indicates Device Temperature High Alarm */ -#define BITM_ADISENSE_CORE_ALERT_STATUS_2_TEMPERATURE_ALERT_LO 0x00000010 /* Indicates Device Temperature Low Alert */ -#define BITM_ADISENSE_CORE_ALERT_STATUS_2_TEMPERATURE_ALERT_HI 0x00000008 /* Indicates Device Temperature High Alert */ -#define BITM_ADISENSE_CORE_ALERT_STATUS_2_CONFIGURATION_ERROR 0x00000004 /* Indicates Error with Programmed Configuration */ -#define BITM_ADISENSE_CORE_ALERT_STATUS_2_LUT_ERROR 0x00000002 /* Indicates Error with One or More Look-Up-Tables */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_ALERT_DETAIL_CH[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_COMP_NOT_READY 15 /* Indicates Compensation Channel Not Ready When Required */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_SENSOR_NOT_READY 14 /* Indicates Digital Sensor Not Ready When Read */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_CORRECTION_OVERRANGE 13 /* Indicates Result Larger Than LUT/Equation Range */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_CORRECTION_UNDERRANGE 12 /* Indicates Result Less Than LUT/Equation Range */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_OVER_VOLTAGE 11 /* Indicates Channel Over-Voltage */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_UNDER_VOLTAGE 10 /* Indicates Channel Under-Voltage */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_LUT_ERROR_CH 9 /* Indicates Error with Channel Look-Up-Table */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_CONFIG_ERR 8 /* Indicates Configuration Error on Channel */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_CALIBRATION_INVALID 7 /* Indicates Problem During Calibration of Channel */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_REF_DETECT 6 /* Indicates Whether ADC Reference is Valid */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_SENSOR_OPEN 5 /* Indicates Sensor Input is Open Circuit */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_HIGH_LIMIT 4 /* Indicates Sensor Result is Greater Than High Limit */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_LOW_LIMIT 3 /* Indicates Sensor Result is Less Than Low Limit */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_OVER_RANGE 2 /* Indicates Channel Over-Range */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_UNDER_RANGE 1 /* Indicates Channel Under-Range */ -#define BITP_ADISENSE_CORE_ALERT_DETAIL_CH_TIME_OUT 0 /* Indicates Time-Out Error from Digital Sensor */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_COMP_NOT_READY 0x00008000 /* Indicates Compensation Channel Not Ready When Required */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_SENSOR_NOT_READY 0x00004000 /* Indicates Digital Sensor Not Ready When Read */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_CORRECTION_OVERRANGE 0x00002000 /* Indicates Result Larger Than LUT/Equation Range */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_CORRECTION_UNDERRANGE 0x00001000 /* Indicates Result Less Than LUT/Equation Range */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_OVER_VOLTAGE 0x00000800 /* Indicates Channel Over-Voltage */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_UNDER_VOLTAGE 0x00000400 /* Indicates Channel Under-Voltage */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_LUT_ERROR_CH 0x00000200 /* Indicates Error with Channel Look-Up-Table */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_CONFIG_ERR 0x00000100 /* Indicates Configuration Error on Channel */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_CALIBRATION_INVALID 0x00000080 /* Indicates Problem During Calibration of Channel */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_REF_DETECT 0x00000040 /* Indicates Whether ADC Reference is Valid */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_SENSOR_OPEN 0x00000020 /* Indicates Sensor Input is Open Circuit */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_HIGH_LIMIT 0x00000010 /* Indicates Sensor Result is Greater Than High Limit */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_LOW_LIMIT 0x00000008 /* Indicates Sensor Result is Less Than Low Limit */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_OVER_RANGE 0x00000004 /* Indicates Channel Over-Range */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_UNDER_RANGE 0x00000002 /* Indicates Channel Under-Range */ -#define BITM_ADISENSE_CORE_ALERT_DETAIL_CH_TIME_OUT 0x00000001 /* Indicates Time-Out Error from Digital Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_ERROR_CODE Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_ERROR_CODE_ERROR_CODE 0 /* Code Indicating Type of Error */ -#define BITM_ADISENSE_CORE_ERROR_CODE_ERROR_CODE 0x0000FFFF /* Code Indicating Type of Error */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_ALERT_CODE Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_ALERT_CODE_ALERT_CODE 0 /* Code Indicating Type of Alert */ -#define BITM_ADISENSE_CORE_ALERT_CODE_ALERT_CODE 0x0000FFFF /* Code Indicating Type of Alert */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_EXTERNAL_REFERENCE1 Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_EXTERNAL_REFERENCE1_EXT_REFIN1_VALUE 0 /* Refin1 Value */ -#define BITM_ADISENSE_CORE_EXTERNAL_REFERENCE1_EXT_REFIN1_VALUE 0xFFFFFFFF /* Refin1 Value */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_EXTERNAL_REFERENCE2 Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_EXTERNAL_REFERENCE2_EXT_REFIN2_VALUE 0 /* Refin2 Value */ -#define BITM_ADISENSE_CORE_EXTERNAL_REFERENCE2_EXT_REFIN2_VALUE 0xFFFFFFFF /* Refin2 Value */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIAGNOSTICS_CONTROL Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIAGNOSTICS_CONTROL_TEMPERARURE_ALARM_ACTION 4 /* Determines Output in Response to Temperature Alarm */ -#define BITP_ADISENSE_CORE_DIAGNOSTICS_CONTROL_DIAG_OSD_FREQ 2 /* Diagnostics Open Sensor Detect Frequency */ -#define BITP_ADISENSE_CORE_DIAGNOSTICS_CONTROL_DIAG_MEAS_EN 1 /* Diagnostics Measure Enable */ -#define BITP_ADISENSE_CORE_DIAGNOSTICS_CONTROL_DIAG_GLOBAL_EN 0 /* Diagnostics Global Enable */ -#define BITM_ADISENSE_CORE_DIAGNOSTICS_CONTROL_TEMPERARURE_ALARM_ACTION 0x00000010 /* Determines Output in Response to Temperature Alarm */ -#define BITM_ADISENSE_CORE_DIAGNOSTICS_CONTROL_DIAG_OSD_FREQ 0x0000000C /* Diagnostics Open Sensor Detect Frequency */ -#define BITM_ADISENSE_CORE_DIAGNOSTICS_CONTROL_DIAG_MEAS_EN 0x00000002 /* Diagnostics Measure Enable */ -#define BITM_ADISENSE_CORE_DIAGNOSTICS_CONTROL_DIAG_GLOBAL_EN 0x00000001 /* Diagnostics Global Enable */ -#define ENUM_ADISENSE_CORE_DIAGNOSTICS_CONTROL_TEMPERATURE_ALARM_NAN 0x00000000 /* Temperarure_Alarm_Action: Sensor Output Equals Not-A-Number in Response to Temperature Alarm */ -#define ENUM_ADISENSE_CORE_DIAGNOSTICS_CONTROL_TEMPERATURE_ALARM_OUTPUT_ACTIVE 0x00000010 /* Temperarure_Alarm_Action: Sensor Output is not Clamped to Not-A-Number in Response to Temperature Alarm */ -#define ENUM_ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_OFF 0x00000000 /* Diag_OSD_Freq: No Open-Circuit Detection During Measurement */ -#define ENUM_ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_PER_1_CYCLE 0x00000004 /* Diag_OSD_Freq: Open-Circuit Detection Performed Once Per Measurement Cycle */ -#define ENUM_ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_PER_100_CYCLES 0x00000008 /* Diag_OSD_Freq: Open-Circuit Detection Performed Once Per Hundred Measurement Cycles */ -#define ENUM_ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_PER_1000_CYCLES 0x0000000C /* Diag_OSD_Freq: Open-Circuit Detection Performed Once Per Thousand Measurement Cycles */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DATA_FIFO Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DATA_FIFO_DATA_FIFO 0 /* Fifo Buffer of Sensor Results */ -#define BITM_ADISENSE_CORE_DATA_FIFO_DATA_FIFO 0x000000FF /* Fifo Buffer of Sensor Results */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DEBUG_CODE Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DEBUG_CODE_DEBUG_CODE 0 /* Additional Information on Source of Alert or Errors */ -#define BITM_ADISENSE_CORE_DEBUG_CODE_DEBUG_CODE 0xFFFFFFFF /* Additional Information on Source of Alert or Errors */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_FFT_CONFIG Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_FFT_CONFIG_FFT_NUM_CHANNELS 6 /* Indicates Number of Channels for FFT */ -#define BITP_ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT 4 /* Indicates FFT Output Format */ -#define BITP_ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW 2 /* Indicates Window Type for FFT */ -#define BITP_ADISENSE_CORE_FFT_CONFIG_FFT_NUM_BINS 0 /* Indicates Number of Bins in FFT */ -#define BITM_ADISENSE_CORE_FFT_CONFIG_FFT_NUM_CHANNELS 0x000000C0 /* Indicates Number of Channels for FFT */ -#define BITM_ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT 0x00000030 /* Indicates FFT Output Format */ -#define BITM_ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW 0x0000000C /* Indicates Window Type for FFT */ -#define BITM_ADISENSE_CORE_FFT_CONFIG_FFT_NUM_BINS 0x00000003 /* Indicates Number of Bins in FFT */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_CHANS_1 0x00000000 /* FFT_Num_Channels: One FFT Channel */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_CHANS_2 0x00000040 /* FFT_Num_Channels: Two FFT Channels */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_CHANS_3 0x00000080 /* FFT_Num_Channels: Three FFT Channels */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_CHANS_4 0x000000C0 /* FFT_Num_Channels: Four FFT Channels */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_FULL 0x00000000 /* FFT_Output: N/2-Term Amplitude Response */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_MAX16 0x00000010 /* FFT_Output: Bin-Number and Amplitude of 16 Highest Peaks of Amplitude Response */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_FULL_WITH_RAW 0x00000020 /* FFT_Output: N/2-Term Amplitude Response Plus N Raw ADC Samples */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW_NONE 0x00000000 /* FFT_Window: No Window */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW_HANN 0x00000004 /* FFT_Window: Hann Window */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW_BLACKMANN_HARRIS 0x00000008 /* FFT_Window: Blackman-Harris-Nuttall Window */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW_TBD 0x0000000C /* FFT_Window: Reserved */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_BINS_256 0x00000000 /* FFT_Num_Bins: FFT Size 256 */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_BINS_512 0x00000001 /* FFT_Num_Bins: FFT Size 512 */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_BINS_1024 0x00000002 /* FFT_Num_Bins: FFT Size 1024 */ -#define ENUM_ADISENSE_CORE_FFT_CONFIG_FFT_BINS_2048 0x00000003 /* FFT_Num_Bins: FFT Size 2048 */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_ADVANCED_SENSOR_ACCESS Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_ADVANCED_SENSOR_ACCESS_ADVANCED_SENSOR_ACCESS 0 /* Write Specific Key Value to Access Advanced Sensors */ -#define BITM_ADISENSE_CORE_ADVANCED_SENSOR_ACCESS_ADVANCED_SENSOR_ACCESS 0x0000FFFF /* Write Specific Key Value to Access Advanced Sensors */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_LUT_SELECT Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_LUT_SELECT_LUT_RW 7 /* Read or Write LUT Data */ -#define BITM_ADISENSE_CORE_LUT_SELECT_LUT_RW 0x00000080 /* Read or Write LUT Data */ -#define ENUM_ADISENSE_CORE_LUT_SELECT_LUT_READ 0x00000000 /* LUT_RW: Read Addressed LUT Data */ -#define ENUM_ADISENSE_CORE_LUT_SELECT_LUT_WRITE 0x00000080 /* LUT_RW: Write Addressed LUT Data */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_LUT_OFFSET Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_LUT_OFFSET_LUT_OFFSET 0 /* Offset into Look-Up-Table */ -#define BITM_ADISENSE_CORE_LUT_OFFSET_LUT_OFFSET 0x00003FFF /* Offset into Look-Up-Table */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_LUT_DATA Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_LUT_DATA_LUT_DATA 0 /* Data Byte to Write to / Read from Look-Up-Table */ -#define BITM_ADISENSE_CORE_LUT_DATA_LUT_DATA 0x000000FF /* Data Byte to Write to / Read from Look-Up-Table */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_EXT_FLASH_INDEX Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_EXT_FLASH_INDEX_EXT_FLASH_INDEX 0 /* Start Position (Sample No.) for Retrieval of Ext. Flash Data */ -#define BITM_ADISENSE_CORE_EXT_FLASH_INDEX_EXT_FLASH_INDEX 0xFFFFFFFF /* Start Position (Sample No.) for Retrieval of Ext. Flash Data */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_EXT_FLASH_SAMPLE_COUNT Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_EXT_FLASH_SAMPLE_COUNT_EXT_FLASH_SAMPLE_COUNT 0 /* Indicates How Many Samples Stored in External Flash */ -#define BITM_ADISENSE_CORE_EXT_FLASH_SAMPLE_COUNT_EXT_FLASH_SAMPLE_COUNT 0xFFFFFFFF /* Indicates How Many Samples Stored in External Flash */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_EXT_FLASH_DATA Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_EXT_FLASH_DATA_EXT_FLASH_DATA 0 /* Data Read Back from External Flash */ -#define BITM_ADISENSE_CORE_EXT_FLASH_DATA_EXT_FLASH_DATA 0x000000FF /* Data Read Back from External Flash */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_REVISION Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_REVISION_REV_MAJOR 24 /* Major Revision Information */ -#define BITP_ADISENSE_CORE_REVISION_REV_MINOR 16 /* Minor Revision Information */ -#define BITP_ADISENSE_CORE_REVISION_REV_PATCH 0 /* Patch Revision Information */ -#define BITM_ADISENSE_CORE_REVISION_REV_MAJOR 0xFF000000 /* Major Revision Information */ -#define BITM_ADISENSE_CORE_REVISION_REV_MINOR 0x00FF0000 /* Minor Revision Information */ -#define BITM_ADISENSE_CORE_REVISION_REV_PATCH 0x0000FFFF /* Patch Revision Information */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_CHANNEL_COUNT[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_CHANNEL_COUNT_CHANNEL_ENABLE 7 /* Enable Channel in Measurement Cycle */ -#define BITP_ADISENSE_CORE_CHANNEL_COUNT_CHANNEL_COUNT 0 /* How Many Times Channel Should Appear in One Cycle */ -#define BITM_ADISENSE_CORE_CHANNEL_COUNT_CHANNEL_ENABLE 0x00000080 /* Enable Channel in Measurement Cycle */ -#define BITM_ADISENSE_CORE_CHANNEL_COUNT_CHANNEL_COUNT 0x0000007F /* How Many Times Channel Should Appear in One Cycle */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_CHANNEL_OPTIONS[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_CHANNEL_OPTIONS_FFT_ENABLE_CH 7 /* Indicates Channel to Be Used for FFT */ -#define BITP_ADISENSE_CORE_CHANNEL_OPTIONS_CHANNEL_PRIORITY 0 /* Indicates Priority or Position of This Channel in Sequence */ -#define BITM_ADISENSE_CORE_CHANNEL_OPTIONS_FFT_ENABLE_CH 0x00000080 /* Indicates Channel to Be Used for FFT */ -#define BITM_ADISENSE_CORE_CHANNEL_OPTIONS_CHANNEL_PRIORITY 0x0000000F /* Indicates Priority or Position of This Channel in Sequence */ -#define ENUM_ADISENSE_CORE_CHANNEL_OPTIONS_NO_FFT 0x00000000 /* FFT_Enable_Ch: FFT Will not be Performed on This Channel */ -#define ENUM_ADISENSE_CORE_CHANNEL_OPTIONS_DO_FFT 0x00000080 /* FFT_Enable_Ch: FFT Will be Performed on This Channel */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_SENSOR_TYPE[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_SENSOR_TYPE_SENSOR_TYPE 0 /* Sensor Type */ -#define BITM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_TYPE 0x00000FFF /* Sensor Type */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_T_DEF_L1 0x00000000 /* Sensor_Type: Thermocouple T-Type Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_J_DEF_L1 0x00000001 /* Sensor_Type: Thermocouple J-Type Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_K_DEF_L1 0x00000002 /* Sensor_Type: Thermocouple K-Type Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_1_DEF_L2 0x00000008 /* Sensor_Type: Thermocouple Sensor 1 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_2_DEF_L2 0x00000009 /* Sensor_Type: Thermocouple Sensor 2 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_3_DEF_L2 0x0000000A /* Sensor_Type: Thermocouple Sensor 3 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_4_DEF_L2 0x0000000B /* Sensor_Type: Thermocouple Sensor 4 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_T_ADV_L1 0x00000010 /* Sensor_Type: Thermocouple T-Type Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_J_ADV_L1 0x00000011 /* Sensor_Type: Thermocouple J-Type Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_K_ADV_L1 0x00000012 /* Sensor_Type: Thermocouple K-Type Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_1_ADV_L2 0x00000018 /* Sensor_Type: Thermocouple Sensor 1 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_2_ADV_L2 0x00000019 /* Sensor_Type: Thermocouple Sensor 2 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_3_ADV_L2 0x0000001A /* Sensor_Type: Thermocouple Sensor 3 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_4_ADV_L2 0x0000001B /* Sensor_Type: Thermocouple Sensor 4 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT100_DEF_L1 0x00000020 /* Sensor_Type: RTD 2 Wire PT100 Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT1000_DEF_L1 0x00000021 /* Sensor_Type: RTD 2 Wire PT1000 Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_1_DEF_L2 0x00000028 /* Sensor_Type: RTD 2 Wire Sensor 1 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_2_DEF_L2 0x00000029 /* Sensor_Type: RTD 2 Wire Sensor 2 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_3_DEF_L2 0x0000002A /* Sensor_Type: RTD 2 Wire Sensor 3 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_4_DEF_L2 0x0000002B /* Sensor_Type: RTD 2 Wire Sensor 4 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT100_ADV_L1 0x00000030 /* Sensor_Type: RTD 2 Wire PT100 Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT1000_ADV_L1 0x00000031 /* Sensor_Type: RTD 2 Wire PT1000 Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_1_ADV_L2 0x00000038 /* Sensor_Type: RTD 2 Wire Sensor 1 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_2_ADV_L2 0x00000039 /* Sensor_Type: RTD 2 Wire Sensor 2 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_3_ADV_L2 0x0000003A /* Sensor_Type: RTD 2 Wire Sensor 3 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_4_ADV_L2 0x0000003B /* Sensor_Type: RTD 2 Wire Sensor 4 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT100_DEF_L1 0x00000040 /* Sensor_Type: RTD 3 Wire PT100 Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT1000_DEF_L1 0x00000041 /* Sensor_Type: RTD 3 Wire PT1000 Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_1_DEF_L2 0x00000048 /* Sensor_Type: RTD 3 Wire Sensor 1 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_2_DEF_L2 0x00000049 /* Sensor_Type: RTD 3 Wire Sensor 2 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_3_DEF_L2 0x0000004A /* Sensor_Type: RTD 3 Wire Sensor 3 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_4_DEF_L2 0x0000004B /* Sensor_Type: RTD 3 Wire Sensor 4 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT100_ADV_L1 0x00000050 /* Sensor_Type: RTD 3 Wire PT100 Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT1000_ADV_L1 0x00000051 /* Sensor_Type: RTD 3 Wire PT1000 Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_1_ADV_L2 0x00000058 /* Sensor_Type: RTD 3 Wire Sensor 1 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_2_ADV_L2 0x00000059 /* Sensor_Type: RTD 3 Wire Sensor 2 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_3_ADV_L2 0x0000005A /* Sensor_Type: RTD 3 Wire Sensor 3 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_4_ADV_L2 0x0000005B /* Sensor_Type: RTD 3 Wire Sensor 4 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT100_DEF_L1 0x00000060 /* Sensor_Type: RTD 4 Wire PT100 Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT1000_DEF_L1 0x00000061 /* Sensor_Type: RTD 4 Wire PT1000 Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_1_DEF_L2 0x00000068 /* Sensor_Type: RTD 4 Wire Sensor 1 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_2_DEF_L2 0x00000069 /* Sensor_Type: RTD 4 Wire Sensor 2 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_3_DEF_L2 0x0000006A /* Sensor_Type: RTD 4 Wire Sensor 3 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_4_DEF_L2 0x0000006B /* Sensor_Type: RTD 4 Wire Sensor 4 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT100_ADV_L1 0x00000070 /* Sensor_Type: RTD 4 Wire PT100 Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT1000_ADV_L1 0x00000071 /* Sensor_Type: RTD 4 Wire PT1000 Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_1_ADV_L2 0x00000078 /* Sensor_Type: RTD 4 Wire Sensor 1 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_2_ADV_L2 0x00000079 /* Sensor_Type: RTD 4 Wire Sensor 2 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_3_ADV_L2 0x0000007A /* Sensor_Type: RTD 4 Wire Sensor 3 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_4_ADV_L2 0x0000007B /* Sensor_Type: RTD 4 Wire Sensor 4 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_A_10K_DEF_L1 0x00000080 /* Sensor_Type: Thermistor Type A 10kOhm Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_B_10K_DEF_L1 0x00000081 /* Sensor_Type: Thermistor Type B 10kOhm Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_1_DEF_L2 0x00000088 /* Sensor_Type: Thermistor Sensor 1 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_2_DEF_L2 0x00000089 /* Sensor_Type: Thermistor Sensor 2 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_3_DEF_L2 0x0000008A /* Sensor_Type: Thermistor Sensor 3 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_4_DEF_L2 0x0000008B /* Sensor_Type: Thermistor Sensor 4 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_A_10K_ADV_L1 0x00000090 /* Sensor_Type: Thermistor Type A 10kOhm Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_B_10K_ADV_L1 0x00000091 /* Sensor_Type: Thermistor Type B 10kOhm Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_1_ADV_L2 0x00000098 /* Sensor_Type: Thermistor Sensor 1 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_2_ADV_L2 0x00000099 /* Sensor_Type: Thermistor Sensor 2 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_3_ADV_L2 0x0000009A /* Sensor_Type: Thermistor Sensor 3 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_4_ADV_L2 0x0000009B /* Sensor_Type: Thermistor Sensor 4 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_1_DEF_L2 0x000000A8 /* Sensor_Type: Bridge 4 Wire Sensor 1 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_2_DEF_L2 0x000000A9 /* Sensor_Type: Bridge 4 Wire Sensor 2 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_3_DEF_L2 0x000000AA /* Sensor_Type: Bridge 4 Wire Sensor 3 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_4_DEF_L2 0x000000AB /* Sensor_Type: Bridge 4 Wire Sensor 4 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_1_ADV_L2 0x000000B8 /* Sensor_Type: Bridge 4 Wire Sensor 1 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_2_ADV_L2 0x000000B9 /* Sensor_Type: Bridge 4 Wire Sensor 2 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_3_ADV_L2 0x000000BA /* Sensor_Type: Bridge 4 Wire Sensor 2 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_4_ADV_L2 0x000000BB /* Sensor_Type: Bridge 4 Wire Sensor 2 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_1_DEF_L2 0x000000C8 /* Sensor_Type: Bridge 6 Wire Sensor 1 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_2_DEF_L2 0x000000C9 /* Sensor_Type: Bridge 6 Wire Sensor 2 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_3_DEF_L2 0x000000CA /* Sensor_Type: Bridge 6 Wire Sensor 3 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_4_DEF_L2 0x000000CB /* Sensor_Type: Bridge 6 Wire Sensor 4 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_1_ADV_L2 0x000000D8 /* Sensor_Type: Bridge 6 Wire Sensor 1 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_2_ADV_L2 0x000000D9 /* Sensor_Type: Bridge 6 Wire Sensor 2 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_3_ADV_L2 0x000000DA /* Sensor_Type: Bridge 6 Wire Sensor 3 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_4_ADV_L2 0x000000DB /* Sensor_Type: Bridge 6 Wire Sensor 4 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_TYPEA_DEF_L1 0x000000E0 /* Sensor_Type: Diode 2 Current Type A Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_TYPEA_DEF_L1 0x000000E1 /* Sensor_Type: Diode 3 Current Type A Sensor Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_1_DEF_L2 0x000000E8 /* Sensor_Type: Diode 2 Current Sensor 1 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_1_DEF_L2 0x000000E9 /* Sensor_Type: Diode 3 Current Sensor 1 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_TYPEA_ADV_L1 0x000000F0 /* Sensor_Type: Diode 2 Current Type A Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_TYPEA_ADV_L1 0x000000F1 /* Sensor_Type: Diode 3 Current Type A Sensor Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_1_ADV_L2 0x000000F8 /* Sensor_Type: Diode 2 Current Sensor 1 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_1_ADV_L2 0x000000F9 /* Sensor_Type: Diode 3 Current Sensor 1 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_A_DEF_L1 0x00000100 /* Sensor_Type: Microphone With No External Amplifier Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_B_DEF_L1 0x00000101 /* Sensor_Type: Microphone With External Amplifier Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_1_DEF_L2 0x00000108 /* Sensor_Type: Microphone With No External Amplifier Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_2_DEF_L2 0x00000109 /* Sensor_Type: Microphone With External Amplifier Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_A_ADV_L1 0x00000110 /* Sensor_Type: Microphone With No External Amplifier Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_B_ADV_L1 0x00000111 /* Sensor_Type: Microphone With External Amplifier Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_1_ADV_L2 0x00000116 /* Sensor_Type: Microphone With No External Amplifier Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_2_ADV_L2 0x00000117 /* Sensor_Type: Microphone With External Amplifier Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE 0x00000200 /* Sensor_Type: Voltage Input */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1 0x00000220 /* Sensor_Type: Voltage Output Pressure Sensor A Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_B_DEF_L1 0x00000221 /* Sensor_Type: Voltage Output Pressure Sensor B Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_1_DEF_L2 0x00000228 /* Sensor_Type: Voltage Output Pressure Sensor 1 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_2_DEF_L2 0x00000229 /* Sensor_Type: Voltage Output Pressure Sensor 2 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_A_ADV_L1 0x00000230 /* Sensor_Type: Voltage Output Pressure Sensor A Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_B_ADV_L1 0x00000231 /* Sensor_Type: Voltage Output Pressure Sensor B Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_1_ADV_L2 0x00000238 /* Sensor_Type: Voltage Output Pressure Sensor 1 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_2_ADV_L2 0x00000239 /* Sensor_Type: Voltage Output Pressure Sensor 2 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT 0x00000300 /* Sensor_Type: Current Input */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_A_DEF_L1 0x00000320 /* Sensor_Type: Current Output Pressure Sensor A Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_1_DEF_L2 0x00000328 /* Sensor_Type: Current Output Pressure Sensor 1 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_2_DEF_L2 0x00000329 /* Sensor_Type: Current Output Pressure Sensor 2 Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_A_ADV_L1 0x00000330 /* Sensor_Type: Current Output Pressure Sensor A Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_1_ADV_L2 0x00000338 /* Sensor_Type: Current Output Pressure Sensor 1 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_2_ADV_L2 0x00000339 /* Sensor_Type: Current Output Pressure Sensor 2 Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_DEF_L1 0x00000800 /* Sensor_Type: I2C Pressure Sensor A Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_DEF_L1 0x00000801 /* Sensor_Type: I2C Pressure Sensor B Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_DEF_L2 0x00000808 /* Sensor_Type: I2C Pressure Sensor A Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_DEF_L2 0x00000809 /* Sensor_Type: I2C Pressure Sensor B Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_ADV_L1 0x00000810 /* Sensor_Type: I2C Pressure Sensor A Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_ADV_L1 0x00000811 /* Sensor_Type: I2C Pressure Sensor B Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_ADV_L2 0x00000818 /* Sensor_Type: I2C Pressure Sensor A Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_ADV_L2 0x00000819 /* Sensor_Type: I2C Pressure Sensor B Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_DEF_L1 0x00000840 /* Sensor_Type: I2C Humidity Sensor A Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_DEF_L1 0x00000841 /* Sensor_Type: I2C Humidity Sensor B Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_DEF_L2 0x00000848 /* Sensor_Type: I2C Humidity Sensor A Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_DEF_L2 0x00000849 /* Sensor_Type: I2C Humidity Sensor B Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_ADV_L1 0x00000850 /* Sensor_Type: I2C Humidity Sensor A Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_ADV_L1 0x00000851 /* Sensor_Type: I2C Humidity Sensor B Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_ADV_L2 0x00000858 /* Sensor_Type: I2C Humidity Sensor A Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_ADV_L2 0x00000859 /* Sensor_Type: I2C Humidity Sensor B Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_DEF_L1 0x00000880 /* Sensor_Type: I2C Ambient Light Sensor A Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_DEF_L2 0x00000888 /* Sensor_Type: I2C Ambient Light Sensor A Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_ADV_L1 0x00000890 /* Sensor_Type: I2C Ambient Light Sensor A Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_ADV_L2 0x00000898 /* Sensor_Type: I2C Ambient Light Sensor A Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_DEF_L1 0x00000C00 /* Sensor_Type: SPI Pressure Sensor A Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_DEF_L2 0x00000C08 /* Sensor_Type: SPI Pressure Sensor A Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_ADV_L1 0x00000C10 /* Sensor_Type: SPI Pressure Sensor A Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_ADV_L2 0x00000C18 /* Sensor_Type: SPI Pressure Sensor A Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_DEF_L1 0x00000C40 /* Sensor_Type: SPI Humidity Sensor A Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_DEF_L1 0x00000C41 /* Sensor_Type: SPI Humidity Sensor B Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_DEF_L2 0x00000C48 /* Sensor_Type: SPI Humidity Sensor A Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_DEF_L2 0x00000C49 /* Sensor_Type: SPI Humidity Sensor B Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_ADV_L1 0x00000C50 /* Sensor_Type: SPI Humidity Sensor A Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_ADV_L1 0x00000C51 /* Sensor_Type: SPI Humidity Sensor B Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_ADV_L2 0x00000C58 /* Sensor_Type: SPI Humidity Sensor A Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_ADV_L2 0x00000C59 /* Sensor_Type: SPI Humidity Sensor B Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_DEF_L1 0x00000C80 /* Sensor_Type: SPI Accelerometer Sensor A 3-Axis Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_DEF_L1 0x00000C81 /* Sensor_Type: SPI Accelerometer Sensor B 3-Axis Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_DEF_L2 0x00000C88 /* Sensor_Type: SPI Accelerometer Sensor A 3-Axis Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_DEF_L2 0x00000C89 /* Sensor_Type: SPI Accelerometer Sensor B 3-Axis Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_ADV_L1 0x00000C90 /* Sensor_Type: SPI Accelerometer Sensor A 3-Axis Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_ADV_L1 0x00000C91 /* Sensor_Type: SPI Accelerometer Sensor B 3-Axis Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_ADV_L2 0x00000C98 /* Sensor_Type: SPI Accelerometer Sensor A 3-Axis Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_ADV_L2 0x00000C99 /* Sensor_Type: SPI Accelerometer Sensor B 3-Axis Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_DEF_L1 0x00000E00 /* Sensor_Type: UART CO2 Sensor A Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_DEF_L1 0x00000E01 /* Sensor_Type: UART CO2 Sensor B Defined Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_DEF_L2 0x00000E08 /* Sensor_Type: UART CO2 Sensor A Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_DEF_L2 0x00000E09 /* Sensor_Type: UART CO2 Sensor B Defined Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_ADV_L1 0x00000E10 /* Sensor_Type: UART CO2 Sensor A Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_ADV_L1 0x00000E11 /* Sensor_Type: UART CO2 Sensor B Advanced Level 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_ADV_L2 0x00000E18 /* Sensor_Type: UART CO2 Sensor A Advanced Level 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_ADV_L2 0x00000E19 /* Sensor_Type: UART CO2 Sensor B Advanced Level 2 */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_SENSOR_DETAILS[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_SENSOR_DETAILS_COMPENSATION_DISABLE 31 /* Indicates Compensation Data Should Not Be Used */ -#define BITP_ADISENSE_CORE_SENSOR_DETAILS_AVERAGING 28 /* Number of ADC Results to Average */ -#define BITP_ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN 24 /* PGA Gain */ -#define BITP_ADISENSE_CORE_SENSOR_DETAILS_REFERENCE_SELECT 20 /* Reference Selection */ -#define BITP_ADISENSE_CORE_SENSOR_DETAILS_VBIAS 19 /* Controls ADC Vbias Output */ -#define BITP_ADISENSE_CORE_SENSOR_DETAILS_REFERENCE_BUFFER_DISABLE 18 /* Enable or Disable ADC Reference Buffer */ -#define BITP_ADISENSE_CORE_SENSOR_DETAILS_DO_NOT_PUBLISH 17 /* Do Not Publish Channel Result */ -#define BITP_ADISENSE_CORE_SENSOR_DETAILS_UNITY_LUT_SELECT 16 /* Selects Unity Transfer Function Instead of Sensor Default */ -#define BITP_ADISENSE_CORE_SENSOR_DETAILS_COMPENSATION_CHANNEL 4 /* Indicates Which Channel is Used to Compensate Sensor Result */ -#define BITP_ADISENSE_CORE_SENSOR_DETAILS_MEASUREMENT_UNITS 0 /* Units of Sensor Measurement */ -#define BITM_ADISENSE_CORE_SENSOR_DETAILS_COMPENSATION_DISABLE 0x80000000 /* Indicates Compensation Data Should Not Be Used */ -#define BITM_ADISENSE_CORE_SENSOR_DETAILS_AVERAGING 0x70000000 /* Number of ADC Results to Average */ -#define BITM_ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN 0x07000000 /* PGA Gain */ -#define BITM_ADISENSE_CORE_SENSOR_DETAILS_REFERENCE_SELECT 0x00F00000 /* Reference Selection */ -#define BITM_ADISENSE_CORE_SENSOR_DETAILS_VBIAS 0x00080000 /* Controls ADC Vbias Output */ -#define BITM_ADISENSE_CORE_SENSOR_DETAILS_REFERENCE_BUFFER_DISABLE 0x00040000 /* Enable or Disable ADC Reference Buffer */ -#define BITM_ADISENSE_CORE_SENSOR_DETAILS_DO_NOT_PUBLISH 0x00020000 /* Do Not Publish Channel Result */ -#define BITM_ADISENSE_CORE_SENSOR_DETAILS_UNITY_LUT_SELECT 0x00010000 /* Selects Unity Transfer Function Instead of Sensor Default */ -#define BITM_ADISENSE_CORE_SENSOR_DETAILS_COMPENSATION_CHANNEL 0x000000F0 /* Indicates Which Channel is Used to Compensate Sensor Result */ -#define BITM_ADISENSE_CORE_SENSOR_DETAILS_MEASUREMENT_UNITS 0x0000000F /* Units of Sensor Measurement */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_1 0x00000000 /* PGA_Gain: Gain of 1 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_2 0x01000000 /* PGA_Gain: Gain of 2 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_4 0x02000000 /* PGA_Gain: Gain of 4 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_8 0x03000000 /* PGA_Gain: Gain of 8 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_16 0x04000000 /* PGA_Gain: Gain of 16 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_32 0x05000000 /* PGA_Gain: Gain of 32 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_64 0x06000000 /* PGA_Gain: Gain of 64 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_128 0x07000000 /* PGA_Gain: Gain of 128 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_REF_INT 0x00000000 /* Reference_Select: Internal Reference */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_REF_AVDD 0x00100000 /* Reference_Select: AVDD */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_REF_VEXT1 0x00200000 /* Reference_Select: External Voltage on Refin1 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_REF_VEXT2 0x00300000 /* Reference_Select: External Voltage on Refin2 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_REF_RINT1 0x00400000 /* Reference_Select: Internal Resistor1 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_REF_RINT2 0x00500000 /* Reference_Select: Internal Resistor2 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_REF_REXT1 0x00600000 /* Reference_Select: External Resistor on Refin1 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_REF_REXT2 0x00700000 /* Reference_Select: External Resistor on Refin2 */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_REF_EXC 0x00800000 /* Reference_Select: Bridge Excitation Voltage */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_UNITS_UNSPECIFIED 0x00000000 /* Measurement_Units: Not Specified */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_UNITS_RESERVED 0x00000001 /* Measurement_Units: Reserved */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_UNITS_DEGC 0x00000002 /* Measurement_Units: Degrees C */ -#define ENUM_ADISENSE_CORE_SENSOR_DETAILS_UNITS_DEGF 0x00000003 /* Measurement_Units: Degrees F */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_CHANNEL_EXCITATION[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_CHANNEL_EXCITATION_IOUT_DONT_SWAP_3WIRE 7 /* Indicates 3-Wire Excitation Currents Should Not Be Swapped */ -#define BITP_ADISENSE_CORE_CHANNEL_EXCITATION_IOUT_DIODE_RATIO 5 /* Modify Current Ratios Used for Diode Sensor */ -#define BITP_ADISENSE_CORE_CHANNEL_EXCITATION_IOUT_EXCITATION_CURRENT 0 /* Current Source Value */ -#define BITM_ADISENSE_CORE_CHANNEL_EXCITATION_IOUT_DONT_SWAP_3WIRE 0x00000080 /* Indicates 3-Wire Excitation Currents Should Not Be Swapped */ -#define BITM_ADISENSE_CORE_CHANNEL_EXCITATION_IOUT_DIODE_RATIO 0x00000020 /* Modify Current Ratios Used for Diode Sensor */ -#define BITM_ADISENSE_CORE_CHANNEL_EXCITATION_IOUT_EXCITATION_CURRENT 0x00000007 /* Current Source Value */ -#define ENUM_ADISENSE_CORE_CHANNEL_EXCITATION_IOUT_DIODE_DEFAULT 0x00000000 /* IOUT_Diode_Ratio: Default Excitation Current Ratios */ -#define ENUM_ADISENSE_CORE_CHANNEL_EXCITATION_IOUT_DIODE_MAX 0x00000020 /* IOUT_Diode_Ratio: Higher Excitation Current Ratios */ -#define ENUM_ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_OFF 0x00000000 /* IOUT_Excitation_Current: Disabled */ -#define ENUM_ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_50UA 0x00000001 /* IOUT_Excitation_Current: 50 \mu;A */ -#define ENUM_ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_100UA 0x00000002 /* IOUT_Excitation_Current: 100 \mu;A */ -#define ENUM_ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_250UA 0x00000003 /* IOUT_Excitation_Current: 250 \mu;A */ -#define ENUM_ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_500UA 0x00000004 /* IOUT_Excitation_Current: 500 \mu;A */ -#define ENUM_ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_750UA 0x00000005 /* IOUT_Excitation_Current: 750 \mu;A */ -#define ENUM_ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_1000UA 0x00000006 /* IOUT_Excitation_Current: 1000 \mu;A */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_SETTLING_TIME[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_SETTLING_TIME_SETTLING_TIME_UNITS 14 /* Units for Settling Time */ -#define BITP_ADISENSE_CORE_SETTLING_TIME_SETTLING_TIME 0 /* Settling Time to Allow When Switching to Channel */ -#define BITM_ADISENSE_CORE_SETTLING_TIME_SETTLING_TIME_UNITS 0x0000C000 /* Units for Settling Time */ -#define BITM_ADISENSE_CORE_SETTLING_TIME_SETTLING_TIME 0x00003FFF /* Settling Time to Allow When Switching to Channel */ -#define ENUM_ADISENSE_CORE_SETTLING_TIME_MICROSECONDS 0x00000000 /* Settling_Time_Units: Micro-Seconds */ -#define ENUM_ADISENSE_CORE_SETTLING_TIME_MILLISECONDS 0x00004000 /* Settling_Time_Units: Milli-Seconds */ -#define ENUM_ADISENSE_CORE_SETTLING_TIME_SECONDS 0x00008000 /* Settling_Time_Units: Seconds */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_FILTER_SELECT[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_FILTER_SELECT_ADC_FILTER_TYPE 11 /* ADC Digital Filter Type */ -#define BITP_ADISENSE_CORE_FILTER_SELECT_ADC_FS 0 /* ADC Digital Filter Select */ -#define BITM_ADISENSE_CORE_FILTER_SELECT_ADC_FILTER_TYPE 0x0000F800 /* ADC Digital Filter Type */ -#define BITM_ADISENSE_CORE_FILTER_SELECT_ADC_FS 0x000007FF /* ADC Digital Filter Select */ -#define ENUM_ADISENSE_CORE_FILTER_SELECT_FILTER_FIR_25SPS 0x00000000 /* ADC_Filter_Type: FIR Filter 25 SPS */ -#define ENUM_ADISENSE_CORE_FILTER_SELECT_FILTER_FIR_20SPS 0x00000800 /* ADC_Filter_Type: FIR Filter 20 SPS */ -#define ENUM_ADISENSE_CORE_FILTER_SELECT_FILTER_SINC4 0x00001000 /* ADC_Filter_Type: Sinc4 Filter */ -#define ENUM_ADISENSE_CORE_FILTER_SELECT_FILTER_TBD 0x00001800 /* ADC_Filter_Type: TBD Filter */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_HIGH_THRESHOLD_LIMIT[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT_HIGH_THRESHOLD 0 /* Upper Limit for Sensor Alert Comparison */ -#define BITM_ADISENSE_CORE_HIGH_THRESHOLD_LIMIT_HIGH_THRESHOLD 0xFFFFFFFF /* Upper Limit for Sensor Alert Comparison */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_LOW_THRESHOLD_LIMIT[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_LOW_THRESHOLD_LIMIT_LOW_THRESHOLD 0 /* Lower Limit for Sensor Alert Comparison */ -#define BITM_ADISENSE_CORE_LOW_THRESHOLD_LIMIT_LOW_THRESHOLD 0xFFFFFFFF /* Lower Limit for Sensor Alert Comparison */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_SENSOR_OFFSET[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_SENSOR_OFFSET_SENSOR_OFFSET 0 /* Sensor Offset Adjustment */ -#define BITM_ADISENSE_CORE_SENSOR_OFFSET_SENSOR_OFFSET 0xFFFFFFFF /* Sensor Offset Adjustment */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_SENSOR_GAIN[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_SENSOR_GAIN_SENSOR_GAIN 0 /* Sensor Gain Adjustment */ -#define BITM_ADISENSE_CORE_SENSOR_GAIN_SENSOR_GAIN 0xFFFFFFFF /* Sensor Gain Adjustment */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_ALERT_CODE_CH[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_ALERT_CODE_CH_ALERT_CODE_CH 0 /* Per-Channel Code Indicating Type of Alert */ -#define BITM_ADISENSE_CORE_ALERT_CODE_CH_ALERT_CODE_CH 0x0000FFFF /* Per-Channel Code Indicating Type of Alert */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_CHANNEL_SKIP[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_CHANNEL_SKIP_CHANNEL_SKIP 0 /* Indicates If Channel Will Skip Some Measurement Cycles */ -#define BITM_ADISENSE_CORE_CHANNEL_SKIP_CHANNEL_SKIP 0x000000FF /* Indicates If Channel Will Skip Some Measurement Cycles */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_SENSOR_PARAMETER[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_SENSOR_PARAMETER_SENSOR_PARAMETER 0 /* Sensor Parameter Adjustment */ -#define BITM_ADISENSE_CORE_SENSOR_PARAMETER_SENSOR_PARAMETER 0xFFFFFFFF /* Sensor Parameter Adjustment */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_CALIBRATION_PARAMETER[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_CALIBRATION_PARAMETER_CALIBRATION_PARAMETER_ENABLE 24 /* Enables Use of Calibration_Parameter */ -#define BITP_ADISENSE_CORE_CALIBRATION_PARAMETER_CALIBRATION_PARAMETER 0 /* Calibration Parameter Value */ -#define BITM_ADISENSE_CORE_CALIBRATION_PARAMETER_CALIBRATION_PARAMETER_ENABLE 0x01000000 /* Enables Use of Calibration_Parameter */ -#define BITM_ADISENSE_CORE_CALIBRATION_PARAMETER_CALIBRATION_PARAMETER 0x00FFFFFF /* Calibration Parameter Value */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_CONFIG[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_DATA_BITS 11 /* Number of Relevant Data Bits */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_READ_BYTES 8 /* Number of Bytes to Read from the Sensor */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_BIT_OFFSET 4 /* Data Bit Offset, Relative to Alignment */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_LEFT_ALIGNED 3 /* Data Alignment Within the Data Frame */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_LITTLE_ENDIAN 2 /* Data Endianness of Sensor Result */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_CODING 0 /* Data Encoding of Sensor Result */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_DATA_BITS 0x0000F800 /* Number of Relevant Data Bits */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_READ_BYTES 0x00000700 /* Number of Bytes to Read from the Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_BIT_OFFSET 0x000000F0 /* Data Bit Offset, Relative to Alignment */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_LEFT_ALIGNED 0x00000008 /* Data Alignment Within the Data Frame */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_LITTLE_ENDIAN 0x00000004 /* Data Endianness of Sensor Result */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_CODING 0x00000003 /* Data Encoding of Sensor Result */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_NONE 0x00000000 /* Digital_Sensor_Coding: None/Invalid */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_UNIPOLAR 0x00000001 /* Digital_Sensor_Coding: Unipolar */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_TWOS_COMPL 0x00000002 /* Digital_Sensor_Coding: Twos Complement */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_OFFSET_BINARY 0x00000003 /* Digital_Sensor_Coding: Offset Binary */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS_DIGITAL_SENSOR_ADDRESS 0 /* I2C Address or Write Address Command for SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_ADDRESS_DIGITAL_SENSOR_ADDRESS 0x000000FF /* I2C Address or Write Address Command for SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_READ_CMDS 4 /* Number of Read Commands for Digital Sensor */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_CFG_CMDS 0 /* Number of Configuration Commands for Digital Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_READ_CMDS 0x00000070 /* Number of Read Commands for Digital Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_CFG_CMDS 0x00000007 /* Number of Configuration Commands for Digital Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_COMMS[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_MODE 12 /* Configuration for Sensor UART Protocol */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE 10 /* Configuration for Sensor SPI Protocol */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_BAUD 7 /* Controls Baud Rate for UART Sensors */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_CLOCK 5 /* Controls SCLK Frequency for I2C Sensors */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_CLOCK 1 /* Controls Clock Frequency for SPI Sensors */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_DIGITAL_SENSOR_COMMS_EN 0 /* Enable Digital Sensor Comms Register Parameters */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_MODE 0x0000F000 /* Configuration for Sensor UART Protocol */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE 0x00000C00 /* Configuration for Sensor SPI Protocol */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_BAUD 0x00000380 /* Controls Baud Rate for UART Sensors */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_CLOCK 0x00000060 /* Controls SCLK Frequency for I2C Sensors */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_CLOCK 0x0000001E /* Controls Clock Frequency for SPI Sensors */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_DIGITAL_SENSOR_COMMS_EN 0x00000001 /* Enable Digital Sensor Comms Register Parameters */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N1 0x00000000 /* Uart_Mode: 8 Data Bits No Parity 1 Stop Bit */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N2 0x00001000 /* Uart_Mode: 8 Data Bits No Parity 2 Stop Bits */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N3 0x00002000 /* Uart_Mode: 8 Data Bits No Parity 3 Stop Bits */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E1 0x00004000 /* Uart_Mode: 8 Data Bits Even Parity 1 Stop Bit */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E2 0x00005000 /* Uart_Mode: 8 Data Bits Even Parity 2 Stop Bits */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E3 0x00006000 /* Uart_Mode: 8 Data Bits Even Parity 3 Stop Bits */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O1 0x00008000 /* Uart_Mode: 8 Data Bits Odd Parity 1 Stop Bit */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O2 0x00009000 /* Uart_Mode: 8 Data Bits Odd Parity 2 Stop Bits */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O3 0x0000A000 /* Uart_Mode: 8 Data Bits Odd Parity 3 Stop Bits */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_0 0x00000000 /* SPI_Mode: Clock Polarity = 0 Clock Phase = 0 */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_1 0x00000400 /* SPI_Mode: Clock Polarity = 0 Clock Phase = 1 */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_2 0x00000800 /* SPI_Mode: Clock Polarity = 1 Clock Phase = 0 */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_3 0x00000C00 /* SPI_Mode: Clock Polarity = 1 Clock Phase = 1 */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_115200 0x00000000 /* Uart_Baud: 115200 bps */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_57600 0x00000080 /* Uart_Baud: 57600 bps */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_38400 0x00000100 /* Uart_Baud: 38400 bps */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_19200 0x00000180 /* Uart_Baud: 19200 bps */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_9600 0x00000200 /* Uart_Baud: 9600 bps */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_4800 0x00000280 /* Uart_Baud: 4800 bps */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_2400 0x00000300 /* Uart_Baud: 2400 bps */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_1200 0x00000380 /* Uart_Baud: 1200 bps */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_100K 0x00000000 /* I2C_Clock: 100kHz SCL */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_400K 0x00000020 /* I2C_Clock: 400kHz SCL */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_RESERVED1 0x00000040 /* I2C_Clock: Reserved */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_RESERVED2 0x00000060 /* I2C_Clock: Reserved */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_13MHZ 0x00000000 /* SPI_Clock: 13 MHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_6_5MHZ 0x00000002 /* SPI_Clock: 6.5 MHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_3_25MHZ 0x00000004 /* SPI_Clock: 3.25 MHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_1_625MHZ 0x00000006 /* SPI_Clock: 1.625 MHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_812KHZ 0x00000008 /* SPI_Clock: 812.5kHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_406KHZ 0x0000000A /* SPI_Clock: 406.2kHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_203KHZ 0x0000000C /* SPI_Clock: 203.1kHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_101KHZ 0x0000000E /* SPI_Clock: 101.5kHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_50KHZ 0x00000010 /* SPI_Clock: 50.8kHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_25KHZ 0x00000012 /* SPI_Clock: 25.4kHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_12KHZ 0x00000014 /* SPI_Clock: 12.7kHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_6KHZ 0x00000016 /* SPI_Clock: 6.3kHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_3KHZ 0x00000018 /* SPI_Clock: 3.2kHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_1_5KHZ 0x0000001A /* SPI_Clock: 1.58kHz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_793HZ 0x0000001C /* SPI_Clock: 793Hz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_396HZ 0x0000001E /* SPI_Clock: 396Hz */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_DIGITAL_COMMS_DEFAULT 0x00000000 /* Digital_Sensor_Comms_En: Default Parameters Used for Digital Sensor Communications */ -#define ENUM_ADISENSE_CORE_DIGITAL_SENSOR_COMMS_DIGITAL_COMMS_USER 0x00000001 /* Digital_Sensor_Comms_En: User Supplied Parameters Used for Digital Sensor Communications */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_COMMAND1[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND1_DIGITAL_SENSOR_COMMAND1 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND1_DIGITAL_SENSOR_COMMAND1 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_COMMAND2[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND2_DIGITAL_SENSOR_COMMAND2 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND2_DIGITAL_SENSOR_COMMAND2 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_COMMAND3[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND3_DIGITAL_SENSOR_COMMAND3 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND3_DIGITAL_SENSOR_COMMAND3 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_COMMAND4[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND4_DIGITAL_SENSOR_COMMAND4 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND4_DIGITAL_SENSOR_COMMAND4 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_COMMAND5[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND5_DIGITAL_SENSOR_COMMAND5 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND5_DIGITAL_SENSOR_COMMAND5 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_COMMAND6[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND6_DIGITAL_SENSOR_COMMAND6 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND6_DIGITAL_SENSOR_COMMAND6 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_COMMAND7[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND7_DIGITAL_SENSOR_COMMAND7 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_COMMAND7_DIGITAL_SENSOR_COMMAND7 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD1[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD1_DIGITAL_SENSOR_READ_CMD1 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD1_DIGITAL_SENSOR_READ_CMD1 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD2[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD2_DIGITAL_SENSOR_READ_CMD2 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD2_DIGITAL_SENSOR_READ_CMD2 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD3[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD3_DIGITAL_SENSOR_READ_CMD3 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD3_DIGITAL_SENSOR_READ_CMD3 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD4[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD4_DIGITAL_SENSOR_READ_CMD4 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD4_DIGITAL_SENSOR_READ_CMD4 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD5[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD5_DIGITAL_SENSOR_READ_CMD5 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD5_DIGITAL_SENSOR_READ_CMD5 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD6[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD6_DIGITAL_SENSOR_READ_CMD6 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD6_DIGITAL_SENSOR_READ_CMD6 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ - -/* ------------------------------------------------------------------------------------------------------------------------- - ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD7[n] Pos/Masks Description - ------------------------------------------------------------------------------------------------------------------------- */ -#define BITP_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD7_DIGITAL_SENSOR_READ_CMD7 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ -#define BITM_ADISENSE_CORE_DIGITAL_SENSOR_READ_CMD7_DIGITAL_SENSOR_READ_CMD7 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ - - -#endif /* end ifndef _DEF_ADISENSE1000_REGISTERS_H */ -
--- a/inc/adi_sense_1000/ADISENSE1000_REGISTERS_typedefs.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2363 +0,0 @@ -/* ================================================================================ - - Project : ADISENSE1000_REGISTERS - File : ADISENSE1000_REGISTERS_typedefs.h - Description : C Register Structures - - Date : Nov 5, 2018 - - Copyright (c) 2018 Analog Devices, Inc. All Rights Reserved. - This software is proprietary and confidential to Analog Devices, Inc. and - its licensors. - - This file was auto-generated. Do not make local changes to this file. - - ================================================================================ */ - -#ifndef _ADISENSE1000_REGISTERS_TYPEDEFS_H -#define _ADISENSE1000_REGISTERS_TYPEDEFS_H - -/* pickup integer types */ -#if defined(_LANGUAGE_C) || (defined(__GNUC__) && !defined(__ASSEMBLER__)) -#include <stdint.h> -#endif /* _LANGUAGE_C */ - -#if defined ( __CC_ARM ) -#pragma push -#pragma anon_unions -#endif - -/** @defgroup Interface_Config_A Interface Configuration A (Interface_Config_A) Register - * Interface Configuration A (Interface_Config_A) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_SPI_Interface_Config_A_Addr_Ascension - *! \brief Determines Sequential Addressing Behavior (Addr_Ascension) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_SPI_INTERFACE_CONFIG_A_DESCEND = 0, /**< Address accessed is decremented by one for each data byte when streaming */ - ADISENSE_SPI_INTERFACE_CONFIG_A_ASCEND = 1 /**< Address accessed is incremented by one for each data byte when streaming */ -} ADI_ADISENSE_SPI_Interface_Config_A_Addr_Ascension; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Interface_Config_A_Struct - *! \brief Interface Configuration A Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Interface_Config_A_t { - union { - struct { - uint8_t SW_ResetX : 1; /**< Second of Two of SW_RESET Bits. */ - uint8_t reserved1 : 3; - uint8_t SDO_Enable : 1; /**< SDO Pin Enable */ - uint8_t Addr_Ascension : 1; /**< Determines Sequential Addressing Behavior */ - uint8_t reserved6 : 1; - uint8_t SW_Reset : 1; /**< First of Two of SW_RESET Bits. */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Interface_Config_A_t; - -/*@}*/ - -/** @defgroup Interface_Config_B Interface Configuration B (Interface_Config_B) Register - * Interface Configuration B (Interface_Config_B) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_SPI_Interface_Config_B_Single_Inst - *! \brief Select Streaming or Single Instruction Mode (Single_Inst) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_SPI_INTERFACE_CONFIG_B_STREAMING_MODE = 0, /**< Streaming mode is enabled */ - ADISENSE_SPI_INTERFACE_CONFIG_B_SINGLE_INSTRUCTION_MODE = 1 /**< Single Instruction mode is enabled */ -} ADI_ADISENSE_SPI_Interface_Config_B_Single_Inst; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Interface_Config_B_Struct - *! \brief Interface Configuration B Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Interface_Config_B_t { - union { - struct { - uint8_t reserved0 : 7; - uint8_t Single_Inst : 1; /**< Select Streaming or Single Instruction Mode */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Interface_Config_B_t; - -/*@}*/ - -/** @defgroup Device_Config Device Configuration (Device_Config) Register - * Device Configuration (Device_Config) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_SPI_Device_Config_Operating_Modes - *! \brief Power Modes (Operating_Modes) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_SPI_DEVICE_CONFIG_NORMAL = 0, /**< Normal Operating Mode */ - ADISENSE_SPI_DEVICE_CONFIG_SLEEP = 3 /**< Low Power Mode */ -} ADI_ADISENSE_SPI_Device_Config_Operating_Modes; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Device_Config_Struct - *! \brief Device Configuration Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Device_Config_t { - union { - struct { - uint8_t Operating_Modes : 2; /**< Power Modes */ - uint8_t reserved2 : 6; - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Device_Config_t; - -/*@}*/ - -/** @defgroup Chip_Type Chip Type (Chip_Type) Register - * Chip Type (Chip_Type) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Chip_Type_Struct - *! \brief Chip Type Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Chip_Type_t { - union { - struct { - uint8_t Chip_Type : 4; /**< Precision ADC */ - uint8_t reserved4 : 4; - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Chip_Type_t; - -/*@}*/ - -/** @defgroup Product_ID_L Product ID Low (Product_ID_L) Register - * Product ID Low (Product_ID_L) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Product_ID_L_Struct - *! \brief Product ID Low Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Product_ID_L_t { - union { - struct { - uint8_t Product_ID : 8; /**< Product_ID[7:0] This is Device Chip Type/Family */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Product_ID_L_t; - -/*@}*/ - -/** @defgroup Product_ID_H Product ID High (Product_ID_H) Register - * Product ID High (Product_ID_H) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Product_ID_H_Struct - *! \brief Product ID High Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Product_ID_H_t { - union { - struct { - uint8_t Product_ID : 8; /**< Product_ID[15:8] This is Device Chip Type/Family */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Product_ID_H_t; - -/*@}*/ - -/** @defgroup Chip_Grade Chip Grade (Chip_Grade) Register - * Chip Grade (Chip_Grade) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Chip_Grade_Struct - *! \brief Chip Grade Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Chip_Grade_t { - union { - struct { - uint8_t Device_Revision : 4; /**< This is the Device Hardware Revision */ - uint8_t Grade : 4; /**< This is the Device Performance Grade */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Chip_Grade_t; - -/*@}*/ - -/** @defgroup Scratch_Pad Scratch Pad (Scratch_Pad) Register - * Scratch Pad (Scratch_Pad) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Scratch_Pad_Struct - *! \brief Scratch Pad Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Scratch_Pad_t { - union { - struct { - uint8_t Scratch_Value : 8; /**< Software Scratchpad */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Scratch_Pad_t; - -/*@}*/ - -/** @defgroup SPI_Revision SPI Revision (SPI_Revision) Register - * SPI Revision (SPI_Revision) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_SPI_SPI_Revision_Version - *! \brief SPI Version (Version) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_SPI_SPI_REVISION_REV1_0 = 2 /**< Revision 1.0 */ -} ADI_ADISENSE_SPI_SPI_Revision_Version; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_SPI_SPI_Revision_SPI_Type - *! \brief Always Reads as 0x2 (SPI_Type) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_SPI_SPI_REVISION_ADI_SPI = 0, /**< */ - ADISENSE_SPI_SPI_REVISION_LPT_SPI = 2 /**< */ -} ADI_ADISENSE_SPI_SPI_Revision_SPI_Type; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_SPI_Revision_Struct - *! \brief SPI Revision Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_SPI_Revision_t { - union { - struct { - uint8_t Version : 6; /**< SPI Version */ - uint8_t SPI_Type : 2; /**< Always Reads as 0x2 */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_SPI_Revision_t; - -/*@}*/ - -/** @defgroup Vendor_L Vendor ID Low (Vendor_L) Register - * Vendor ID Low (Vendor_L) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Vendor_L_Struct - *! \brief Vendor ID Low Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Vendor_L_t { - union { - struct { - uint8_t VID : 8; /**< VID[7:0] Analog Devices Vendor ID */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Vendor_L_t; - -/*@}*/ - -/** @defgroup Vendor_H Vendor ID High (Vendor_H) Register - * Vendor ID High (Vendor_H) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Vendor_H_Struct - *! \brief Vendor ID High Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Vendor_H_t { - union { - struct { - uint8_t VID : 8; /**< VID[15:8] Analog Devices Vendor ID */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Vendor_H_t; - -/*@}*/ - -/** @defgroup Stream_Mode Stream Mode (Stream_Mode) Register - * Stream Mode (Stream_Mode) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Stream_Mode_Struct - *! \brief Stream Mode Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Stream_Mode_t { - union { - struct { - uint8_t Loop_Count : 8; /**< Sets the Data Byte Count Before Looping to Start Address */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Stream_Mode_t; - -/*@}*/ - -/** @defgroup Transfer_Config Transfer Config (Transfer_Config) Register - * Transfer Config (Transfer_Config) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_SPI_Transfer_Config_Stream_Mode - *! \brief When Streaming, Controls Master-Slave Transfer (Stream_Mode) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_SPI_TRANSFER_CONFIG_UPDATE_ON_WRITE = 0, /**< Transfers after each byte/mulit-byte register */ - ADISENSE_SPI_TRANSFER_CONFIG_UPDATE_ON_ADDRESS_LOOP = 1 /**< Transfers when address loops */ -} ADI_ADISENSE_SPI_Transfer_Config_Stream_Mode; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Transfer_Config_Struct - *! \brief Transfer Config Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Transfer_Config_t { - union { - struct { - uint8_t reserved0 : 1; - uint8_t Stream_Mode : 1; /**< When Streaming, Controls Master-Slave Transfer */ - uint8_t reserved2 : 6; - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Transfer_Config_t; - -/*@}*/ - -/** @defgroup Interface_Config_C Interface Configuration C (Interface_Config_C) Register - * Interface Configuration C (Interface_Config_C) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_SPI_Interface_Config_C_Strict_Register_Access - *! \brief Multi-byte Registers Must Be Read/Written in Full (Strict_Register_Access) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_SPI_INTERFACE_CONFIG_C_NORMAL_ACCESS = 0, /**< Normal mode, no access restrictions */ - ADISENSE_SPI_INTERFACE_CONFIG_C_STRICT_ACCESS = 1 /**< Strict mode, multi-byte registers require all bytes read/written */ -} ADI_ADISENSE_SPI_Interface_Config_C_Strict_Register_Access; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_SPI_Interface_Config_C_CRC_Enable - *! \brief CRC Enable (CRC_Enable) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_SPI_INTERFACE_CONFIG_C_DISABLED = 0, /**< CRC Disabled */ - ADISENSE_SPI_INTERFACE_CONFIG_C_ENABLED = 1 /**< CRC Enabled */ -} ADI_ADISENSE_SPI_Interface_Config_C_CRC_Enable; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Interface_Config_C_Struct - *! \brief Interface Configuration C Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Interface_Config_C_t { - union { - struct { - uint8_t CRC_EnableB : 2; /**< Inverted CRC Enable */ - uint8_t reserved2 : 2; - uint8_t Send_Status : 1; /**< Enables Sending of Status in 4-wire Mode */ - uint8_t Strict_Register_Access : 1; /**< Multi-byte Registers Must Be Read/Written in Full */ - uint8_t CRC_Enable : 2; /**< CRC Enable */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Interface_Config_C_t; - -/*@}*/ - -/** @defgroup Interface_Status_A Interface Status A (Interface_Status_A) Register - * Interface Status A (Interface_Status_A) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_SPI_Interface_Status_A_Struct - *! \brief Interface Status A Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_SPI_Interface_Status_A_t { - union { - struct { - uint8_t Address_Invalid_Error : 1; /**< Attempt to Read/Write Non-existent Register Address */ - uint8_t Register_Partial_Access_Error : 1; /**< Set When Fewer Than Expected Number of Bytes Read/Written */ - uint8_t Wr_To_Rd_Only_Reg_Error : 1; /**< Write to Read-Only Register Attempted */ - uint8_t CRC_Error : 1; /**< Invalid/No CRC Received */ - uint8_t Clock_Count_Error : 1; /**< Incorrect Number of Clocks Detected in a Transaction */ - uint8_t reserved5 : 2; - uint8_t Not_Ready_Error : 1; /**< Device Not Ready for Transaction */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_SPI_Interface_Status_A_t; - -/*@}*/ - -/** @defgroup Command Special Command (Command) Register - * Special Command (Command) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Command_Special_Command - *! \brief Special Command (Special_Command) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_COMMAND_NOP = 0, /**< No Command */ - ADISENSE_CORE_COMMAND_CONVERT = 1, /**< Start ADC Conversions */ - ADISENSE_CORE_COMMAND_CONVERT_WITH_RAW = 2, /**< Start Conversions with Added RAW ADC Data */ - ADISENSE_CORE_COMMAND_RUN_DIAGNOSTICS = 3, /**< Initiate a Diagnostics Cycle */ - ADISENSE_CORE_COMMAND_SELF_CALIBRATION = 4, /**< Initiate a Self-Calibration Cycle */ - ADISENSE_CORE_COMMAND_LATCH_CONFIG = 7, /**< Latch Configuration. */ - ADISENSE_CORE_COMMAND_LOAD_LUT = 8, /**< Load LUT from FLASH */ - ADISENSE_CORE_COMMAND_SAVE_LUT = 9, /**< Save LUT to FLASH */ - ADISENSE_CORE_COMMAND_SYSTEM_CHECK = 10, /**< Full Suite of Measurement Diagnostics */ - ADISENSE_CORE_COMMAND_CONVERT_FFT = 11, /**< Perform FFTs on Selected Channel(s) */ - ADISENSE_CORE_COMMAND_ERASE_EXTERNAL_FLASH = 16, /**< Erase Contents of External Flash */ - ADISENSE_CORE_COMMAND_POWER_DOWN = 20, /**< Enter Low Power State */ - ADISENSE_CORE_COMMAND_LOAD_CONFIG_1 = 24, /**< Load Registers with Configuration#1 from FLASH */ - ADISENSE_CORE_COMMAND_SAVE_CONFIG_1 = 25, /**< Store Current Registers to FLASH Configuration#1 */ - ADISENSE_CORE_COMMAND_LOAD_CONFIG_2 = 26, /**< Load Registers with Configuration#2 from FLASH */ - ADISENSE_CORE_COMMAND_SAVE_CONFIG_2 = 27, /**< Store Current Registers to FLASH Configuration#2 */ - ADISENSE_CORE_COMMAND_LOAD_CONFIG_3 = 28, /**< Load Registers with Configuration#3 from FLASH */ - ADISENSE_CORE_COMMAND_SAVE_CONFIG_3 = 29, /**< Store Current Registers to FLASH Configuration#3 */ - ADISENSE_CORE_COMMAND_LOAD_CONFIG_4 = 30, /**< Load Registers with Configuration#4 from FLASH */ - ADISENSE_CORE_COMMAND_SAVE_CONFIG_4 = 31, /**< Store Current Registers to FLASH Configuration#4 */ - ADISENSE_CORE_COMMAND_CALIBRATE_DIGITAL = 32 /**< Performs a Calibration of Digital Sensor, if Supported & Enabled. */ -} ADI_ADISENSE_CORE_Command_Special_Command; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Command_Struct - *! \brief Special Command Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Command_t { - union { - struct { - uint8_t Special_Command : 8; /**< Special Command */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Command_t; - -/*@}*/ - -/** @defgroup Mode Operating Mode and DRDY Control (Mode) Register - * Operating Mode and DRDY Control (Mode) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Mode_Conversion_Mode - *! \brief Conversion Mode (Conversion_Mode) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_MODE_SINGLECYCLE = 0, /**< Single Cycle */ - ADISENSE_CORE_MODE_MULTICYCLE = 1, /**< Multi Cycle */ - ADISENSE_CORE_MODE_CONTINUOUS = 2 /**< Continuous Conversion */ -} ADI_ADISENSE_CORE_Mode_Conversion_Mode; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Mode_Drdy_Mode - *! \brief Indicates Behavior of DRDY with Respect to FIFO State (Drdy_Mode) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_MODE_DRDY_PER_CONVERSION = 0, /**< Data Ready Per Conversion */ - ADISENSE_CORE_MODE_DRDY_PER_CYCLE = 1, /**< Data Ready Per Cycle */ - ADISENSE_CORE_MODE_DRDY_PER_FIFO_FILL = 2 /**< Data Ready Per FIFO Fill / Multi-Cycle Burst */ -} ADI_ADISENSE_CORE_Mode_Drdy_Mode; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Mode_Calibration_Method - *! \brief Indicates If Calibration is Required on 'Latch' Command (Calibration_Method) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_MODE_NO_CAL = 0, /**< No Calibration Performed */ - ADISENSE_CORE_MODE_DO_CAL = 1 /**< Calibration Performed */ -} ADI_ADISENSE_CORE_Mode_Calibration_Method; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Mode_FFT_Mode - *! \brief Indicates Single or Multiple Sequence of FFTs (FFT_Mode) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_MODE_FFT_MODE_SINGLE = 0, /**< Perform Single Sequence of FFT(s) on Selected Channel(s) */ - ADISENSE_CORE_MODE_FFT_MODE_CONTINUOUS = 1 /**< Perform Continuous Sequence of FFTs on Selected Channel(s) */ -} ADI_ADISENSE_CORE_Mode_FFT_Mode; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Mode_Ext_Flash_Store - *! \brief Indicates If Measurement Data Should Be Stored in Flash (Ext_Flash_Store) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_MODE_EXT_FLASH_NOT_USED = 0, /**< Do Not Use External Flash */ - ADISENSE_CORE_MODE_EXT_FLASH_USED = 1 /**< Use External Flash */ -} ADI_ADISENSE_CORE_Mode_Ext_Flash_Store; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Mode_Struct - *! \brief Operating Mode and DRDY Control Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Mode_t { - union { - struct { - uint8_t Conversion_Mode : 2; /**< Conversion Mode */ - uint8_t Drdy_Mode : 2; /**< Indicates Behavior of DRDY with Respect to FIFO State */ - uint8_t Calibration_Method : 1; /**< Indicates If Calibration is Required on 'Latch' Command */ - uint8_t FFT_Mode : 1; /**< Indicates Single or Multiple Sequence of FFTs */ - uint8_t reserved6 : 1; - uint8_t Ext_Flash_Store : 1; /**< Indicates If Measurement Data Should Be Stored in Flash */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Mode_t; - -/*@}*/ - -/** @defgroup Power_Config General Configuration (Power_Config) Register - * General Configuration (Power_Config) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Power_Config_Power_Mode_ADC - *! \brief ADC Power Mode (Power_Mode_ADC) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_POWER_CONFIG_ADC_LOW_POWER = 0, /**< ADC Low Power Mode */ - ADISENSE_CORE_POWER_CONFIG_ADC_MID_POWER = 1, /**< ADC Mid Power Mode */ - ADISENSE_CORE_POWER_CONFIG_ADC_FULL_POWER = 2 /**< ADC Full Power Mode */ -} ADI_ADISENSE_CORE_Power_Config_Power_Mode_ADC; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Power_Config_Struct - *! \brief General Configuration Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Power_Config_t { - union { - struct { - uint8_t Power_Mode_ADC : 2; /**< ADC Power Mode */ - uint8_t reserved2 : 6; - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Power_Config_t; - -/*@}*/ - -/** @defgroup Cycle_Control Measurement Cycle (Cycle_Control) Register - * Measurement Cycle (Cycle_Control) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Cycle_Control_Cycle_Type - *! \brief Type of Measurement Cycle (Cycle_Type) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TYPE_SWITCH = 0, /**< Switch Channels After Every Conversion */ - ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TYPE_FULL = 1 /**< Perform Full Number Of Conversions On A Channel Consecutively */ -} ADI_ADISENSE_CORE_Cycle_Control_Cycle_Type; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Cycle_Control_Filter_Settling - *! \brief Determines ADC Filter Settling in a Multi-Channel Sequence (Filter_Settling) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_CYCLE_CONTROL_FILTER_SETTLING_SETTLED = 0, /**< ADC Result Fully Settles for Every Output */ - ADISENSE_CORE_CYCLE_CONTROL_FILTER_SETTLING_FAST = 1 /**< ADC Result Appears at Higher Update Rate for Consecutive Conversions */ -} ADI_ADISENSE_CORE_Cycle_Control_Filter_Settling; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Cycle_Control_Cycle_Time_Units - *! \brief Units for Cycle Time (Cycle_Time_Units) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_CYCLE_CONTROL_MICROSECONDS = 0, /**< Micro-Seconds */ - ADISENSE_CORE_CYCLE_CONTROL_MILLISECONDS = 1, /**< Milli-Seconds */ - ADISENSE_CORE_CYCLE_CONTROL_SECONDS = 2 /**< Seconds */ -} ADI_ADISENSE_CORE_Cycle_Control_Cycle_Time_Units; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Cycle_Control_Struct - *! \brief Measurement Cycle Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Cycle_Control_t { - union { - struct { - uint16_t Cycle_Time : 12; /**< Duration of a Full Measurement Cycle */ - uint16_t Cycle_Type : 1; /**< Type of Measurement Cycle */ - uint16_t Filter_Settling : 1; /**< Determines ADC Filter Settling in a Multi-Channel Sequence */ - uint16_t Cycle_Time_Units : 2; /**< Units for Cycle Time */ - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Cycle_Control_t; - -/*@}*/ - -/** @defgroup Fifo_Num_Cycles Number of Measurement Cycles to Store in FIFO (Fifo_Num_Cycles) Register - * Number of Measurement Cycles to Store in FIFO (Fifo_Num_Cycles) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Fifo_Num_Cycles_Struct - *! \brief Number of Measurement Cycles to Store in FIFO Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Fifo_Num_Cycles_t { - union { - struct { - uint8_t Fifo_Num_Cycles : 8; /**< How Many Cycles to Fill FIFO */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Fifo_Num_Cycles_t; - -/*@}*/ - -/** @defgroup Multi_Cycle_Repeat_Interval Time Between Repeats of Multi-Cycle Conversions.... (Multi_Cycle_Repeat_Interval) Register - * Time Between Repeats of Multi-Cycle Conversions.... (Multi_Cycle_Repeat_Interval) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Multi_Cycle_Repeat_Interval_Struct - *! \brief Time Between Repeats of Multi-Cycle Conversions.... Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Multi_Cycle_Repeat_Interval_t { - union { - struct { - uint32_t Multi_Cycle_Repeat_Interval : 24; /**< Defines Time Between Repetitions of Measurement Cycles. */ - uint32_t reserved24 : 8; - }; - uint32_t VALUE32; - }; -} ADI_ADISENSE_CORE_Multi_Cycle_Repeat_Interval_t; - -/*@}*/ - -/** @defgroup Status General Status (Status) Register - * General Status (Status) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Status_Struct - *! \brief General Status Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Status_t { - union { - struct { - uint8_t reserved0 : 1; - uint8_t Alert_Active : 1; /**< Indicates One or More Sensors Alerts are Active */ - uint8_t Error : 1; /**< Indicates an Error */ - uint8_t Drdy : 1; /**< Indicates a New Sensor Result is Available to Be Read */ - uint8_t Cmd_Running : 1; /**< Indicates a Special Command is Active */ - uint8_t FIFO_Error : 1; /**< Indicates Error with FIFO */ - uint8_t reserved6 : 2; - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Status_t; - -/*@}*/ - -/** @defgroup Diagnostics_Status Diagnostics Status (Diagnostics_Status) Register - * Diagnostics Status (Diagnostics_Status) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Diagnostics_Status_Struct - *! \brief Diagnostics Status Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Diagnostics_Status_t { - union { - struct { - uint16_t Diag_Checksum_Error : 1; /**< Indicates Error on Internal Checksum Calculations */ - uint16_t Diag_Comms_Error : 1; /**< Indicates Error on Internal Device Communications */ - uint16_t Diag_Supply_Monitor_Error : 1; /**< Indicates Low Voltage on Internal Supply Voltages */ - uint16_t Diag_Supply_Cap_Error : 1; /**< Indicates Fault on Internal Supply Regulator Capacitor */ - uint16_t reserved4 : 8; - uint16_t Diag_Conversion_Error : 1; /**< Indicates Error During Internal ADC Conversions */ - uint16_t Diag_Calibration_Error : 1; /**< Indicates Error During Internal Device Calibrations */ - uint16_t reserved14 : 2; - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Diagnostics_Status_t; - -/*@}*/ - -/** @defgroup Channel_Alert_Status Alert Status Summary (Channel_Alert_Status) Register - * Alert Status Summary (Channel_Alert_Status) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Channel_Alert_Status_Struct - *! \brief Alert Status Summary Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Channel_Alert_Status_t { - union { - struct { - uint16_t Alert_Ch0 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch1 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch2 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch3 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch4 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch5 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch6 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch7 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch8 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch9 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch10 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch11 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch12 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch13 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch14 : 1; /**< Indicates Channel Alert is Active */ - uint16_t Alert_Ch15 : 1; /**< Indicates Channel Alert is Active */ - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Channel_Alert_Status_t; - -/*@}*/ - -/** @defgroup Alert_Status_2 Additional Alert Status Information (Alert_Status_2) Register - * Additional Alert Status Information (Alert_Status_2) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Alert_Status_2_Struct - *! \brief Additional Alert Status Information Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Alert_Status_2_t { - union { - struct { - uint16_t reserved0 : 1; - uint16_t LUT_Error : 1; /**< Indicates Error with One or More Look-Up-Tables */ - uint16_t Configuration_Error : 1; /**< Indicates Error with Programmed Configuration */ - uint16_t Temperature_Alert_Hi : 1; /**< Indicates Device Temperature High Alert */ - uint16_t Temperature_Alert_Lo : 1; /**< Indicates Device Temperature Low Alert */ - uint16_t Temperature_Alarm_Hi : 1; /**< Indicates Device Temperature High Alarm */ - uint16_t Temperature_Alarm_Lo : 1; /**< Indicates Device Temperature Low Alarm */ - uint16_t Ext_Flash_Error : 1; /**< Indicates with External Flash Memory */ - uint16_t reserved8 : 8; - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Alert_Status_2_t; - -/*@}*/ - -/** @defgroup Alert_Detail_Ch Detailed Error Information (Alert_Detail_Ch) Register - * Detailed Error Information (Alert_Detail_Ch) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Alert_Detail_Ch_Struct - *! \brief Detailed Error Information Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Alert_Detail_Ch_t { - union { - struct { - uint16_t Time_Out : 1; /**< Indicates Time-Out Error from Digital Sensor */ - uint16_t Under_Range : 1; /**< Indicates Channel Under-Range */ - uint16_t Over_Range : 1; /**< Indicates Channel Over-Range */ - uint16_t Low_Limit : 1; /**< Indicates Sensor Result is Less Than Low Limit */ - uint16_t High_Limit : 1; /**< Indicates Sensor Result is Greater Than High Limit */ - uint16_t Sensor_Open : 1; /**< Indicates Sensor Input is Open Circuit */ - uint16_t Ref_Detect : 1; /**< Indicates Whether ADC Reference is Valid */ - uint16_t Calibration_Invalid : 1; /**< Indicates Problem During Calibration of Channel */ - uint16_t Config_Err : 1; /**< Indicates Configuration Error on Channel */ - uint16_t LUT_Error_Ch : 1; /**< Indicates Error with Channel Look-Up-Table */ - uint16_t Under_Voltage : 1; /**< Indicates Channel Under-Voltage */ - uint16_t Over_Voltage : 1; /**< Indicates Channel Over-Voltage */ - uint16_t Correction_UnderRange : 1; /**< Indicates Result Less Than LUT/Equation Range */ - uint16_t Correction_OverRange : 1; /**< Indicates Result Larger Than LUT/Equation Range */ - uint16_t Sensor_Not_Ready : 1; /**< Indicates Digital Sensor Not Ready When Read */ - uint16_t Comp_Not_Ready : 1; /**< Indicates Compensation Channel Not Ready When Required */ - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Alert_Detail_Ch_t; - -/*@}*/ - -/** @defgroup Error_Code Code Indicating Source of Error (Error_Code) Register - * Code Indicating Source of Error (Error_Code) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Error_Code_Struct - *! \brief Code Indicating Source of Error Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Error_Code_t { - union { - struct { - uint16_t Error_Code : 16; /**< Code Indicating Type of Error */ - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Error_Code_t; - -/*@}*/ - -/** @defgroup Alert_Code Code Indicating Source of Alert (Alert_Code) Register - * Code Indicating Source of Alert (Alert_Code) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Alert_Code_Struct - *! \brief Code Indicating Source of Alert Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Alert_Code_t { - union { - struct { - uint16_t Alert_Code : 16; /**< Code Indicating Type of Alert */ - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Alert_Code_t; - -/*@}*/ - -/** @defgroup External_Reference1 External Reference Information (External_Reference1) Register - * External Reference Information (External_Reference1) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_External_Reference1_Struct - *! \brief External Reference Information Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_External_Reference1_t { - union { - struct { - float Ext_Refin1_Value; /**< Refin1 Value */ - }; - float VALUE32; - }; -} ADI_ADISENSE_CORE_External_Reference1_t; - -/*@}*/ - -/** @defgroup External_Reference2 External Reference Information (External_Reference2) Register - * External Reference Information (External_Reference2) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_External_Reference2_Struct - *! \brief External Reference Information Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_External_Reference2_t { - union { - struct { - float Ext_Refin2_Value; /**< Refin2 Value */ - }; - float VALUE32; - }; -} ADI_ADISENSE_CORE_External_Reference2_t; - -/*@}*/ - -/** @defgroup Diagnostics_Control Diagnostic Control (Diagnostics_Control) Register - * Diagnostic Control (Diagnostics_Control) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Diagnostics_Control_Diag_OSD_Freq - *! \brief Diagnostics Open Sensor Detect Frequency (Diag_OSD_Freq) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_OFF = 0, /**< No Open-Circuit Detection During Measurement */ - ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_PER_1_CYCLE = 1, /**< Open-Circuit Detection Performed Once Per Measurement Cycle */ - ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_PER_100_CYCLES = 2, /**< Open-Circuit Detection Performed Once Per Hundred Measurement Cycles */ - ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_PER_1000_CYCLES = 3 /**< Open-Circuit Detection Performed Once Per Thousand Measurement Cycles */ -} ADI_ADISENSE_CORE_Diagnostics_Control_Diag_OSD_Freq; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Diagnostics_Control_Temperarure_Alarm_Action - *! \brief Determines Output in Response to Temperature Alarm (Temperarure_Alarm_Action) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_DIAGNOSTICS_CONTROL_TEMPERATURE_ALARM_NAN = 0, /**< Sensor Output Equals Not-A-Number in Response to Temperature Alarm */ - ADISENSE_CORE_DIAGNOSTICS_CONTROL_TEMPERATURE_ALARM_OUTPUT_ACTIVE = 1 /**< Sensor Output is not Clamped to Not-A-Number in Response to Temperature Alarm */ -} ADI_ADISENSE_CORE_Diagnostics_Control_Temperarure_Alarm_Action; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Diagnostics_Control_Struct - *! \brief Diagnostic Control Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Diagnostics_Control_t { - union { - struct { - uint16_t Diag_Global_En : 1; /**< Diagnostics Global Enable */ - uint16_t Diag_Meas_En : 1; /**< Diagnostics Measure Enable */ - uint16_t Diag_OSD_Freq : 2; /**< Diagnostics Open Sensor Detect Frequency */ - uint16_t Temperarure_Alarm_Action : 1; /**< Determines Output in Response to Temperature Alarm */ - uint16_t reserved5 : 11; - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Diagnostics_Control_t; - -/*@}*/ - -/** @defgroup Data_FIFO FIFO Buffer of Sensor Results (Data_FIFO) Register - * FIFO Buffer of Sensor Results (Data_FIFO) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Data_FIFO_Struct - *! \brief FIFO Buffer of Sensor Results Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Data_FIFO_t { - union { - struct { - uint8_t Data_Fifo : 8; /**< Fifo Buffer of Sensor Results */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Data_FIFO_t; - -/*@}*/ - -/** @defgroup Debug_Code Additional Information on Source of Alert or Errors (Debug_Code) Register - * Additional Information on Source of Alert or Errors (Debug_Code) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Debug_Code_Struct - *! \brief Additional Information on Source of Alert or Errors Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Debug_Code_t { - union { - struct { - uint32_t Debug_Code : 32; /**< Additional Information on Source of Alert or Errors */ - }; - uint32_t VALUE32; - }; -} ADI_ADISENSE_CORE_Debug_Code_t; - -/*@}*/ - -/** @defgroup FFT_Config FFT Configuration (FFT_Config) Register - * FFT Configuration (FFT_Config) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_FFT_Config_FFT_Num_Bins - *! \brief Indicates Number of Bins in FFT (FFT_Num_Bins) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_FFT_CONFIG_FFT_BINS_256 = 0, /**< FFT Size 256 */ - ADISENSE_CORE_FFT_CONFIG_FFT_BINS_512 = 1, /**< FFT Size 512 */ - ADISENSE_CORE_FFT_CONFIG_FFT_BINS_1024 = 2, /**< FFT Size 1024 */ - ADISENSE_CORE_FFT_CONFIG_FFT_BINS_2048 = 3 /**< FFT Size 2048 */ -} ADI_ADISENSE_CORE_FFT_Config_FFT_Num_Bins; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_FFT_Config_FFT_Window - *! \brief Indicates Window Type for FFT (FFT_Window) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW_NONE = 0, /**< No Window */ - ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW_HANN = 1, /**< Hann Window */ - ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW_BLACKMANN_HARRIS = 2, /**< Blackman-Harris-Nuttall Window */ - ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW_TBD = 3 /**< Reserved */ -} ADI_ADISENSE_CORE_FFT_Config_FFT_Window; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_FFT_Config_FFT_Output - *! \brief Indicates FFT Output Format (FFT_Output) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_FULL = 0, /**< N/2-Term Amplitude Response */ - ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_MAX16 = 1, /**< Bin-Number and Amplitude of 16 Highest Peaks of Amplitude Response */ - ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_FULL_WITH_RAW = 2 /**< N/2-Term Amplitude Response Plus N Raw ADC Samples */ -} ADI_ADISENSE_CORE_FFT_Config_FFT_Output; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_FFT_Config_FFT_Num_Channels - *! \brief Indicates Number of Channels for FFT (FFT_Num_Channels) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_FFT_CONFIG_FFT_CHANS_1 = 0, /**< One FFT Channel */ - ADISENSE_CORE_FFT_CONFIG_FFT_CHANS_2 = 1, /**< Two FFT Channels */ - ADISENSE_CORE_FFT_CONFIG_FFT_CHANS_3 = 2, /**< Three FFT Channels */ - ADISENSE_CORE_FFT_CONFIG_FFT_CHANS_4 = 3 /**< Four FFT Channels */ -} ADI_ADISENSE_CORE_FFT_Config_FFT_Num_Channels; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_FFT_Config_Struct - *! \brief FFT Configuration Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_FFT_Config_t { - union { - struct { - uint32_t FFT_Num_Bins : 2; /**< Indicates Number of Bins in FFT */ - uint32_t FFT_Window : 2; /**< Indicates Window Type for FFT */ - uint32_t FFT_Output : 2; /**< Indicates FFT Output Format */ - uint32_t FFT_Num_Channels : 2; /**< Indicates Number of Channels for FFT */ - uint32_t reserved8 : 24; - }; - uint32_t VALUE32; - }; -} ADI_ADISENSE_CORE_FFT_Config_t; - -/*@}*/ - -/** @defgroup Advanced_Sensor_Access Enables Access to Advanced Sensor Configuration (Advanced_Sensor_Access) Register - * Enables Access to Advanced Sensor Configuration (Advanced_Sensor_Access) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Advanced_Sensor_Access_Struct - *! \brief Enables Access to Advanced Sensor Configuration Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Advanced_Sensor_Access_t { - union { - struct { - uint16_t Advanced_Sensor_Access : 16; /**< Write Specific Key Value to Access Advanced Sensors */ - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Advanced_Sensor_Access_t; - -/*@}*/ - -/** @defgroup LUT_Select Read/Write Strobe (LUT_Select) Register - * Read/Write Strobe (LUT_Select) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_LUT_Select_LUT_RW - *! \brief Read or Write LUT Data (LUT_RW) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_LUT_SELECT_LUT_READ = 0, /**< Read Addressed LUT Data */ - ADISENSE_CORE_LUT_SELECT_LUT_WRITE = 1 /**< Write Addressed LUT Data */ -} ADI_ADISENSE_CORE_LUT_Select_LUT_RW; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_LUT_Select_Struct - *! \brief Read/Write Strobe Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_LUT_Select_t { - union { - struct { - uint8_t reserved0 : 7; - uint8_t LUT_RW : 1; /**< Read or Write LUT Data */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_LUT_Select_t; - -/*@}*/ - -/** @defgroup LUT_Offset Offset into Selected LUT (LUT_Offset) Register - * Offset into Selected LUT (LUT_Offset) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_LUT_Offset_Struct - *! \brief Offset into Selected LUT Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_LUT_Offset_t { - union { - struct { - uint16_t LUT_Offset : 14; /**< Offset into Look-Up-Table */ - uint16_t reserved14 : 2; - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_LUT_Offset_t; - -/*@}*/ - -/** @defgroup LUT_Data Data to Read/Write from Addressed LUT Entry (LUT_Data) Register - * Data to Read/Write from Addressed LUT Entry (LUT_Data) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_LUT_Data_Struct - *! \brief Data to Read/Write from Addressed LUT Entry Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_LUT_Data_t { - union { - struct { - uint8_t LUT_Data : 8; /**< Data Byte to Write to / Read from Look-Up-Table */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_LUT_Data_t; - -/*@}*/ - -/** @defgroup Ext_Flash_Index Start Position (Sample No.) for Retrieval of Ext. Flash Data (Ext_Flash_Index) Register - * Start Position (Sample No.) for Retrieval of Ext. Flash Data (Ext_Flash_Index) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Ext_Flash_Index_Struct - *! \brief Start Position (Sample No.) for Retrieval of Ext. Flash Data Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Ext_Flash_Index_t { - union { - struct { - uint32_t Ext_Flash_Index : 32; /**< Start Position (Sample No.) for Retrieval of Ext. Flash Data */ - }; - uint32_t VALUE32; - }; -} ADI_ADISENSE_CORE_Ext_Flash_Index_t; - -/*@}*/ - -/** @defgroup Ext_Flash_Sample_Count Indicates How Many Samples Stored in External Flash (Ext_Flash_Sample_Count) Register - * Indicates How Many Samples Stored in External Flash (Ext_Flash_Sample_Count) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Ext_Flash_Sample_Count_Struct - *! \brief Indicates How Many Samples Stored in External Flash Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Ext_Flash_Sample_Count_t { - union { - struct { - uint32_t Ext_Flash_Sample_Count : 32; /**< Indicates How Many Samples Stored in External Flash */ - }; - uint32_t VALUE32; - }; -} ADI_ADISENSE_CORE_Ext_Flash_Sample_Count_t; - -/*@}*/ - -/** @defgroup Ext_Flash_Data Data Read Back from External Flash (Ext_Flash_Data) Register - * Data Read Back from External Flash (Ext_Flash_Data) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Ext_Flash_Data_Struct - *! \brief Data Read Back from External Flash Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Ext_Flash_Data_t { - union { - struct { - uint8_t Ext_Flash_Data : 8; /**< Data Read Back from External Flash */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Ext_Flash_Data_t; - -/*@}*/ - -/** @defgroup Revision Hardware, Firmware Revision (Revision) Register - * Hardware, Firmware Revision (Revision) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Revision_Struct - *! \brief Hardware, Firmware Revision Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Revision_t { - union { - struct { - uint32_t Rev_Patch : 16; /**< Patch Revision Information */ - uint32_t Rev_Minor : 8; /**< Minor Revision Information */ - uint32_t Rev_Major : 8; /**< Major Revision Information */ - }; - uint32_t VALUE32; - }; -} ADI_ADISENSE_CORE_Revision_t; - -/*@}*/ - -/** @defgroup Channel_Count Number of Channel Occurrences per Measurement Cycle (Channel_Count) Register - * Number of Channel Occurrences per Measurement Cycle (Channel_Count) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Channel_Count_Struct - *! \brief Number of Channel Occurrences per Measurement Cycle Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Channel_Count_t { - union { - struct { - uint8_t Channel_Count : 7; /**< How Many Times Channel Should Appear in One Cycle */ - uint8_t Channel_Enable : 1; /**< Enable Channel in Measurement Cycle */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Channel_Count_t; - -/*@}*/ - -/** @defgroup Channel_Options Position of Channel Within Sequence and Enable for FFT (Channel_Options) Register - * Position of Channel Within Sequence and Enable for FFT (Channel_Options) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Channel_Options_FFT_Enable_Ch - *! \brief Indicates Channel to Be Used for FFT (FFT_Enable_Ch) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_CHANNEL_OPTIONS_NO_FFT = 0, /**< FFT Will not be Performed on This Channel */ - ADISENSE_CORE_CHANNEL_OPTIONS_DO_FFT = 1 /**< FFT Will be Performed on This Channel */ -} ADI_ADISENSE_CORE_Channel_Options_FFT_Enable_Ch; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Channel_Options_Struct - *! \brief Position of Channel Within Sequence and Enable for FFT Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Channel_Options_t { - union { - struct { - uint8_t Channel_Priority : 4; /**< Indicates Priority or Position of This Channel in Sequence */ - uint8_t reserved4 : 3; - uint8_t FFT_Enable_Ch : 1; /**< Indicates Channel to Be Used for FFT */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Channel_Options_t; - -/*@}*/ - -/** @defgroup Sensor_Type Sensor Select (Sensor_Type) Register - * Sensor Select (Sensor_Type) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Sensor_Type_Sensor_Type - *! \brief Sensor Type (Sensor_Type) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_T_DEF_L1 = 0, /**< Thermocouple T-Type Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_J_DEF_L1 = 1, /**< Thermocouple J-Type Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_K_DEF_L1 = 2, /**< Thermocouple K-Type Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_1_DEF_L2 = 8, /**< Thermocouple Sensor 1 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_2_DEF_L2 = 9, /**< Thermocouple Sensor 2 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_3_DEF_L2 = 10, /**< Thermocouple Sensor 3 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_4_DEF_L2 = 11, /**< Thermocouple Sensor 4 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_T_ADV_L1 = 16, /**< Thermocouple T-Type Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_J_ADV_L1 = 17, /**< Thermocouple J-Type Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_K_ADV_L1 = 18, /**< Thermocouple K-Type Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_1_ADV_L2 = 24, /**< Thermocouple Sensor 1 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_2_ADV_L2 = 25, /**< Thermocouple Sensor 2 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_3_ADV_L2 = 26, /**< Thermocouple Sensor 3 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_4_ADV_L2 = 27, /**< Thermocouple Sensor 4 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT100_DEF_L1 = 32, /**< RTD 2 Wire PT100 Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT1000_DEF_L1 = 33, /**< RTD 2 Wire PT1000 Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_1_DEF_L2 = 40, /**< RTD 2 Wire Sensor 1 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_2_DEF_L2 = 41, /**< RTD 2 Wire Sensor 2 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_3_DEF_L2 = 42, /**< RTD 2 Wire Sensor 3 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_4_DEF_L2 = 43, /**< RTD 2 Wire Sensor 4 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT100_ADV_L1 = 48, /**< RTD 2 Wire PT100 Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT1000_ADV_L1 = 49, /**< RTD 2 Wire PT1000 Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_1_ADV_L2 = 56, /**< RTD 2 Wire Sensor 1 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_2_ADV_L2 = 57, /**< RTD 2 Wire Sensor 2 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_3_ADV_L2 = 58, /**< RTD 2 Wire Sensor 3 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_2W_4_ADV_L2 = 59, /**< RTD 2 Wire Sensor 4 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT100_DEF_L1 = 64, /**< RTD 3 Wire PT100 Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT1000_DEF_L1 = 65, /**< RTD 3 Wire PT1000 Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_1_DEF_L2 = 72, /**< RTD 3 Wire Sensor 1 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_2_DEF_L2 = 73, /**< RTD 3 Wire Sensor 2 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_3_DEF_L2 = 74, /**< RTD 3 Wire Sensor 3 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_4_DEF_L2 = 75, /**< RTD 3 Wire Sensor 4 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT100_ADV_L1 = 80, /**< RTD 3 Wire PT100 Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT1000_ADV_L1 = 81, /**< RTD 3 Wire PT1000 Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_1_ADV_L2 = 88, /**< RTD 3 Wire Sensor 1 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_2_ADV_L2 = 89, /**< RTD 3 Wire Sensor 2 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_3_ADV_L2 = 90, /**< RTD 3 Wire Sensor 3 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_3W_4_ADV_L2 = 91, /**< RTD 3 Wire Sensor 4 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT100_DEF_L1 = 96, /**< RTD 4 Wire PT100 Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT1000_DEF_L1 = 97, /**< RTD 4 Wire PT1000 Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_1_DEF_L2 = 104, /**< RTD 4 Wire Sensor 1 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_2_DEF_L2 = 105, /**< RTD 4 Wire Sensor 2 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_3_DEF_L2 = 106, /**< RTD 4 Wire Sensor 3 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_4_DEF_L2 = 107, /**< RTD 4 Wire Sensor 4 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT100_ADV_L1 = 112, /**< RTD 4 Wire PT100 Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT1000_ADV_L1 = 113, /**< RTD 4 Wire PT1000 Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_1_ADV_L2 = 120, /**< RTD 4 Wire Sensor 1 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_2_ADV_L2 = 121, /**< RTD 4 Wire Sensor 2 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_3_ADV_L2 = 122, /**< RTD 4 Wire Sensor 3 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_RTD_4W_4_ADV_L2 = 123, /**< RTD 4 Wire Sensor 4 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_A_10K_DEF_L1 = 128, /**< Thermistor Type A 10kOhm Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_B_10K_DEF_L1 = 129, /**< Thermistor Type B 10kOhm Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_1_DEF_L2 = 136, /**< Thermistor Sensor 1 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_2_DEF_L2 = 137, /**< Thermistor Sensor 2 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_3_DEF_L2 = 138, /**< Thermistor Sensor 3 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_4_DEF_L2 = 139, /**< Thermistor Sensor 4 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_A_10K_ADV_L1 = 144, /**< Thermistor Type A 10kOhm Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_B_10K_ADV_L1 = 145, /**< Thermistor Type B 10kOhm Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_1_ADV_L2 = 152, /**< Thermistor Sensor 1 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_2_ADV_L2 = 153, /**< Thermistor Sensor 2 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_3_ADV_L2 = 154, /**< Thermistor Sensor 3 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_4_ADV_L2 = 155, /**< Thermistor Sensor 4 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_1_DEF_L2 = 168, /**< Bridge 4 Wire Sensor 1 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_2_DEF_L2 = 169, /**< Bridge 4 Wire Sensor 2 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_3_DEF_L2 = 170, /**< Bridge 4 Wire Sensor 3 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_4_DEF_L2 = 171, /**< Bridge 4 Wire Sensor 4 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_1_ADV_L2 = 184, /**< Bridge 4 Wire Sensor 1 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_2_ADV_L2 = 185, /**< Bridge 4 Wire Sensor 2 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_3_ADV_L2 = 186, /**< Bridge 4 Wire Sensor 2 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_4_ADV_L2 = 187, /**< Bridge 4 Wire Sensor 2 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_1_DEF_L2 = 200, /**< Bridge 6 Wire Sensor 1 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_2_DEF_L2 = 201, /**< Bridge 6 Wire Sensor 2 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_3_DEF_L2 = 202, /**< Bridge 6 Wire Sensor 3 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_4_DEF_L2 = 203, /**< Bridge 6 Wire Sensor 4 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_1_ADV_L2 = 216, /**< Bridge 6 Wire Sensor 1 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_2_ADV_L2 = 217, /**< Bridge 6 Wire Sensor 2 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_3_ADV_L2 = 218, /**< Bridge 6 Wire Sensor 3 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_4_ADV_L2 = 219, /**< Bridge 6 Wire Sensor 4 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_TYPEA_DEF_L1 = 224, /**< Diode 2 Current Type A Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_TYPEA_DEF_L1 = 225, /**< Diode 3 Current Type A Sensor Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_1_DEF_L2 = 232, /**< Diode 2 Current Sensor 1 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_1_DEF_L2 = 233, /**< Diode 3 Current Sensor 1 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_TYPEA_ADV_L1 = 240, /**< Diode 2 Current Type A Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_TYPEA_ADV_L1 = 241, /**< Diode 3 Current Type A Sensor Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_1_ADV_L2 = 248, /**< Diode 2 Current Sensor 1 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_1_ADV_L2 = 249, /**< Diode 3 Current Sensor 1 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_A_DEF_L1 = 256, /**< Microphone With No External Amplifier Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_B_DEF_L1 = 257, /**< Microphone With External Amplifier Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_1_DEF_L2 = 264, /**< Microphone With No External Amplifier Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_2_DEF_L2 = 265, /**< Microphone With External Amplifier Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_A_ADV_L1 = 272, /**< Microphone With No External Amplifier Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_B_ADV_L1 = 273, /**< Microphone With External Amplifier Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_1_ADV_L2 = 278, /**< Microphone With No External Amplifier Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_2_ADV_L2 = 279, /**< Microphone With External Amplifier Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE = 512, /**< Voltage Input */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1 = 544, /**< Voltage Output Pressure Sensor A Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_B_DEF_L1 = 545, /**< Voltage Output Pressure Sensor B Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_1_DEF_L2 = 552, /**< Voltage Output Pressure Sensor 1 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_2_DEF_L2 = 553, /**< Voltage Output Pressure Sensor 2 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_A_ADV_L1 = 560, /**< Voltage Output Pressure Sensor A Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_B_ADV_L1 = 561, /**< Voltage Output Pressure Sensor B Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_1_ADV_L2 = 568, /**< Voltage Output Pressure Sensor 1 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_2_ADV_L2 = 569, /**< Voltage Output Pressure Sensor 2 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT = 768, /**< Current Input */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_A_DEF_L1 = 800, /**< Current Output Pressure Sensor A Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_1_DEF_L2 = 808, /**< Current Output Pressure Sensor 1 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_2_DEF_L2 = 809, /**< Current Output Pressure Sensor 2 Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_A_ADV_L1 = 816, /**< Current Output Pressure Sensor A Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_1_ADV_L2 = 824, /**< Current Output Pressure Sensor 1 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_2_ADV_L2 = 825, /**< Current Output Pressure Sensor 2 Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_DEF_L1 = 2048, /**< I2C Pressure Sensor A Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_DEF_L1 = 2049, /**< I2C Pressure Sensor B Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_DEF_L2 = 2056, /**< I2C Pressure Sensor A Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_DEF_L2 = 2057, /**< I2C Pressure Sensor B Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_ADV_L1 = 2064, /**< I2C Pressure Sensor A Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_ADV_L1 = 2065, /**< I2C Pressure Sensor B Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_ADV_L2 = 2072, /**< I2C Pressure Sensor A Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_ADV_L2 = 2073, /**< I2C Pressure Sensor B Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_DEF_L1 = 2112, /**< I2C Humidity Sensor A Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_DEF_L1 = 2113, /**< I2C Humidity Sensor B Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_DEF_L2 = 2120, /**< I2C Humidity Sensor A Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_DEF_L2 = 2121, /**< I2C Humidity Sensor B Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_ADV_L1 = 2128, /**< I2C Humidity Sensor A Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_ADV_L1 = 2129, /**< I2C Humidity Sensor B Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_ADV_L2 = 2136, /**< I2C Humidity Sensor A Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_ADV_L2 = 2137, /**< I2C Humidity Sensor B Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_DEF_L1 = 2176, /**< I2C Ambient Light Sensor A Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_DEF_L2 = 2184, /**< I2C Ambient Light Sensor A Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_ADV_L1 = 2192, /**< I2C Ambient Light Sensor A Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_ADV_L2 = 2200, /**< I2C Ambient Light Sensor A Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_DEF_L1 = 3072, /**< SPI Pressure Sensor A Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_DEF_L2 = 3080, /**< SPI Pressure Sensor A Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_ADV_L1 = 3088, /**< SPI Pressure Sensor A Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_ADV_L2 = 3096, /**< SPI Pressure Sensor A Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_DEF_L1 = 3136, /**< SPI Humidity Sensor A Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_DEF_L1 = 3137, /**< SPI Humidity Sensor B Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_DEF_L2 = 3144, /**< SPI Humidity Sensor A Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_DEF_L2 = 3145, /**< SPI Humidity Sensor B Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_ADV_L1 = 3152, /**< SPI Humidity Sensor A Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_ADV_L1 = 3153, /**< SPI Humidity Sensor B Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_ADV_L2 = 3160, /**< SPI Humidity Sensor A Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_ADV_L2 = 3161, /**< SPI Humidity Sensor B Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_DEF_L1 = 3200, /**< SPI Accelerometer Sensor A 3-Axis Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_DEF_L1 = 3201, /**< SPI Accelerometer Sensor B 3-Axis Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_DEF_L2 = 3208, /**< SPI Accelerometer Sensor A 3-Axis Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_DEF_L2 = 3209, /**< SPI Accelerometer Sensor B 3-Axis Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_ADV_L1 = 3216, /**< SPI Accelerometer Sensor A 3-Axis Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_ADV_L1 = 3217, /**< SPI Accelerometer Sensor B 3-Axis Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_ADV_L2 = 3224, /**< SPI Accelerometer Sensor A 3-Axis Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_ADV_L2 = 3225, /**< SPI Accelerometer Sensor B 3-Axis Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_DEF_L1 = 3584, /**< UART CO2 Sensor A Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_DEF_L1 = 3585, /**< UART CO2 Sensor B Defined Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_DEF_L2 = 3592, /**< UART CO2 Sensor A Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_DEF_L2 = 3593, /**< UART CO2 Sensor B Defined Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_ADV_L1 = 3600, /**< UART CO2 Sensor A Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_ADV_L1 = 3601, /**< UART CO2 Sensor B Advanced Level 1 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_ADV_L2 = 3608, /**< UART CO2 Sensor A Advanced Level 2 */ - ADISENSE_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_ADV_L2 = 3609 /**< UART CO2 Sensor B Advanced Level 2 */ -} ADI_ADISENSE_CORE_Sensor_Type_Sensor_Type; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Sensor_Type_Struct - *! \brief Sensor Select Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Sensor_Type_t { - union { - struct { - uint16_t Sensor_Type : 12; /**< Sensor Type */ - uint16_t reserved12 : 4; - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Sensor_Type_t; - -/*@}*/ - -/** @defgroup Sensor_Details Sensor Details (Sensor_Details) Register - * Sensor Details (Sensor_Details) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Sensor_Details_Measurement_Units - *! \brief Units of Sensor Measurement (Measurement_Units) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_SENSOR_DETAILS_UNITS_UNSPECIFIED = 0, /**< Not Specified */ - ADISENSE_CORE_SENSOR_DETAILS_UNITS_RESERVED = 1, /**< Reserved */ - ADISENSE_CORE_SENSOR_DETAILS_UNITS_DEGC = 2, /**< Degrees C */ - ADISENSE_CORE_SENSOR_DETAILS_UNITS_DEGF = 3 /**< Degrees F */ -} ADI_ADISENSE_CORE_Sensor_Details_Measurement_Units; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Sensor_Details_Reference_Select - *! \brief Reference Selection (Reference_Select) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_SENSOR_DETAILS_REF_INT = 0, /**< Internal Reference */ - ADISENSE_CORE_SENSOR_DETAILS_REF_AVDD = 1, /**< AVDD */ - ADISENSE_CORE_SENSOR_DETAILS_REF_VEXT1 = 2, /**< External Voltage on Refin1 */ - ADISENSE_CORE_SENSOR_DETAILS_REF_VEXT2 = 3, /**< External Voltage on Refin2 */ - ADISENSE_CORE_SENSOR_DETAILS_REF_RINT1 = 4, /**< Internal Resistor1 */ - ADISENSE_CORE_SENSOR_DETAILS_REF_RINT2 = 5, /**< Internal Resistor2 */ - ADISENSE_CORE_SENSOR_DETAILS_REF_REXT1 = 6, /**< External Resistor on Refin1 */ - ADISENSE_CORE_SENSOR_DETAILS_REF_REXT2 = 7, /**< External Resistor on Refin2 */ - ADISENSE_CORE_SENSOR_DETAILS_REF_EXC = 8 /**< Bridge Excitation Voltage */ -} ADI_ADISENSE_CORE_Sensor_Details_Reference_Select; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Sensor_Details_PGA_Gain - *! \brief PGA Gain (PGA_Gain) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_1 = 0, /**< Gain of 1 */ - ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_2 = 1, /**< Gain of 2 */ - ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_4 = 2, /**< Gain of 4 */ - ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_8 = 3, /**< Gain of 8 */ - ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_16 = 4, /**< Gain of 16 */ - ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_32 = 5, /**< Gain of 32 */ - ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_64 = 6, /**< Gain of 64 */ - ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_128 = 7 /**< Gain of 128 */ -} ADI_ADISENSE_CORE_Sensor_Details_PGA_Gain; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Sensor_Details_Struct - *! \brief Sensor Details Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Sensor_Details_t { - union { - struct { - uint32_t Measurement_Units : 4; /**< Units of Sensor Measurement */ - uint32_t Compensation_Channel : 4; /**< Indicates Which Channel is Used to Compensate Sensor Result */ - uint32_t reserved8 : 8; - uint32_t Unity_LUT_Select : 1; /**< Selects Unity Transfer Function Instead of Sensor Default */ - uint32_t Do_Not_Publish : 1; /**< Do Not Publish Channel Result */ - uint32_t Reference_Buffer_Disable : 1; /**< Enable or Disable ADC Reference Buffer */ - uint32_t Vbias : 1; /**< Controls ADC Vbias Output */ - uint32_t Reference_Select : 4; /**< Reference Selection */ - uint32_t PGA_Gain : 3; /**< PGA Gain */ - uint32_t reserved27 : 1; - uint32_t Averaging : 3; /**< Number of ADC Results to Average */ - uint32_t Compensation_Disable : 1; /**< Indicates Compensation Data Should Not Be Used */ - }; - uint32_t VALUE32; - }; -} ADI_ADISENSE_CORE_Sensor_Details_t; - -/*@}*/ - -/** @defgroup Channel_Excitation Excitation Current (Channel_Excitation) Register - * Excitation Current (Channel_Excitation) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Channel_Excitation_IOUT_Excitation_Current - *! \brief Current Source Value (IOUT_Excitation_Current) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_OFF = 0, /**< Disabled */ - ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_50UA = 1, /**< 50 \mu;A */ - ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_100UA = 2, /**< 100 \mu;A */ - ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_250UA = 3, /**< 250 \mu;A */ - ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_500UA = 4, /**< 500 \mu;A */ - ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_750UA = 5, /**< 750 \mu;A */ - ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_1000UA = 6 /**< 1000 \mu;A */ -} ADI_ADISENSE_CORE_Channel_Excitation_IOUT_Excitation_Current; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Channel_Excitation_IOUT_Diode_Ratio - *! \brief Modify Current Ratios Used for Diode Sensor (IOUT_Diode_Ratio) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_CHANNEL_EXCITATION_IOUT_DIODE_DEFAULT = 0, /**< Default Excitation Current Ratios */ - ADISENSE_CORE_CHANNEL_EXCITATION_IOUT_DIODE_MAX = 1 /**< Higher Excitation Current Ratios */ -} ADI_ADISENSE_CORE_Channel_Excitation_IOUT_Diode_Ratio; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Channel_Excitation_Struct - *! \brief Excitation Current Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Channel_Excitation_t { - union { - struct { - uint8_t IOUT_Excitation_Current : 3; /**< Current Source Value */ - uint8_t reserved3 : 2; - uint8_t IOUT_Diode_Ratio : 1; /**< Modify Current Ratios Used for Diode Sensor */ - uint8_t reserved6 : 1; - uint8_t IOUT_Dont_Swap_3Wire : 1; /**< Indicates 3-Wire Excitation Currents Should Not Be Swapped */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Channel_Excitation_t; - -/*@}*/ - -/** @defgroup Settling_Time Settling Time (Settling_Time) Register - * Settling Time (Settling_Time) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Settling_Time_Settling_Time_Units - *! \brief Units for Settling Time (Settling_Time_Units) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_SETTLING_TIME_MICROSECONDS = 0, /**< Micro-Seconds */ - ADISENSE_CORE_SETTLING_TIME_MILLISECONDS = 1, /**< Milli-Seconds */ - ADISENSE_CORE_SETTLING_TIME_SECONDS = 2 /**< Seconds */ -} ADI_ADISENSE_CORE_Settling_Time_Settling_Time_Units; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Settling_Time_Struct - *! \brief Settling Time Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Settling_Time_t { - union { - struct { - uint16_t Settling_Time : 14; /**< Settling Time to Allow When Switching to Channel */ - uint16_t Settling_Time_Units : 2; /**< Units for Settling Time */ - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Settling_Time_t; - -/*@}*/ - -/** @defgroup Filter_Select ADC Digital Filter Selection (Filter_Select) Register - * ADC Digital Filter Selection (Filter_Select) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Filter_Select_ADC_Filter_Type - *! \brief ADC Digital Filter Type (ADC_Filter_Type) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_FILTER_SELECT_FILTER_FIR_25SPS = 0, /**< FIR Filter 25 SPS */ - ADISENSE_CORE_FILTER_SELECT_FILTER_FIR_20SPS = 1, /**< FIR Filter 20 SPS */ - ADISENSE_CORE_FILTER_SELECT_FILTER_SINC4 = 2, /**< Sinc4 Filter */ - ADISENSE_CORE_FILTER_SELECT_FILTER_TBD = 3 /**< TBD Filter */ -} ADI_ADISENSE_CORE_Filter_Select_ADC_Filter_Type; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Filter_Select_Struct - *! \brief ADC Digital Filter Selection Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Filter_Select_t { - union { - struct { - uint32_t ADC_FS : 11; /**< ADC Digital Filter Select */ - uint32_t ADC_Filter_Type : 5; /**< ADC Digital Filter Type */ - uint32_t reserved16 : 16; - }; - uint32_t VALUE32; - }; -} ADI_ADISENSE_CORE_Filter_Select_t; - -/*@}*/ - -/** @defgroup High_Threshold_Limit High Threshold (High_Threshold_Limit) Register - * High Threshold (High_Threshold_Limit) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_High_Threshold_Limit_Struct - *! \brief High Threshold Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_High_Threshold_Limit_t { - union { - struct { - float High_Threshold; /**< Upper Limit for Sensor Alert Comparison */ - }; - float VALUE32; - }; -} ADI_ADISENSE_CORE_High_Threshold_Limit_t; - -/*@}*/ - -/** @defgroup Low_Threshold_Limit Low Threshold (Low_Threshold_Limit) Register - * Low Threshold (Low_Threshold_Limit) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Low_Threshold_Limit_Struct - *! \brief Low Threshold Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Low_Threshold_Limit_t { - union { - struct { - float Low_Threshold; /**< Lower Limit for Sensor Alert Comparison */ - }; - float VALUE32; - }; -} ADI_ADISENSE_CORE_Low_Threshold_Limit_t; - -/*@}*/ - -/** @defgroup Sensor_Offset Sensor Offset Adjustment (Sensor_Offset) Register - * Sensor Offset Adjustment (Sensor_Offset) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Sensor_Offset_Struct - *! \brief Sensor Offset Adjustment Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Sensor_Offset_t { - union { - struct { - float Sensor_Offset; /**< Sensor Offset Adjustment */ - }; - float VALUE32; - }; -} ADI_ADISENSE_CORE_Sensor_Offset_t; - -/*@}*/ - -/** @defgroup Sensor_Gain Sensor Gain Adjustment (Sensor_Gain) Register - * Sensor Gain Adjustment (Sensor_Gain) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Sensor_Gain_Struct - *! \brief Sensor Gain Adjustment Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Sensor_Gain_t { - union { - struct { - float Sensor_Gain; /**< Sensor Gain Adjustment */ - }; - float VALUE32; - }; -} ADI_ADISENSE_CORE_Sensor_Gain_t; - -/*@}*/ - -/** @defgroup Alert_Code_Ch Per-Channel Detailed Alert-Code Information (Alert_Code_Ch) Register - * Per-Channel Detailed Alert-Code Information (Alert_Code_Ch) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Alert_Code_Ch_Struct - *! \brief Per-Channel Detailed Alert-Code Information Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Alert_Code_Ch_t { - union { - struct { - uint16_t Alert_Code_Ch : 16; /**< Per-Channel Code Indicating Type of Alert */ - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Alert_Code_Ch_t; - -/*@}*/ - -/** @defgroup Channel_Skip Indicates If Channel Will Skip Some Measurement Cycles (Channel_Skip) Register - * Indicates If Channel Will Skip Some Measurement Cycles (Channel_Skip) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Channel_Skip_Struct - *! \brief Indicates If Channel Will Skip Some Measurement Cycles Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Channel_Skip_t { - union { - struct { - uint16_t Channel_Skip : 8; /**< Indicates If Channel Will Skip Some Measurement Cycles */ - uint16_t reserved8 : 8; - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Channel_Skip_t; - -/*@}*/ - -/** @defgroup Sensor_Parameter Sensor Parameter Adjustment (Sensor_Parameter) Register - * Sensor Parameter Adjustment (Sensor_Parameter) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Sensor_Parameter_Struct - *! \brief Sensor Parameter Adjustment Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Sensor_Parameter_t { - union { - struct { - float Sensor_Parameter; /**< Sensor Parameter Adjustment */ - }; - float VALUE32; - }; -} ADI_ADISENSE_CORE_Sensor_Parameter_t; - -/*@}*/ - -/** @defgroup Calibration_Parameter Calibration Parameter Value (Calibration_Parameter) Register - * Calibration Parameter Value (Calibration_Parameter) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Calibration_Parameter_Struct - *! \brief Calibration Parameter Value Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Calibration_Parameter_t { - union { - struct { - uint32_t Calibration_Parameter : 24; /**< Calibration Parameter Value */ - uint32_t Calibration_Parameter_Enable : 1; /**< Enables Use of Calibration_Parameter */ - uint32_t reserved25 : 7; - }; - uint32_t VALUE32; - }; -} ADI_ADISENSE_CORE_Calibration_Parameter_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Config Digital Sensor Data Coding (Digital_Sensor_Config) Register - * Digital Sensor Data Coding (Digital_Sensor_Config) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Digital_Sensor_Config_Digital_Sensor_Coding - *! \brief Data Encoding of Sensor Result (Digital_Sensor_Coding) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_NONE = 0, /**< None/Invalid */ - ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_UNIPOLAR = 1, /**< Unipolar */ - ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_TWOS_COMPL = 2, /**< Twos Complement */ - ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_OFFSET_BINARY = 3 /**< Offset Binary */ -} ADI_ADISENSE_CORE_Digital_Sensor_Config_Digital_Sensor_Coding; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Config_Struct - *! \brief Digital Sensor Data Coding Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Config_t { - union { - struct { - uint16_t Digital_Sensor_Coding : 2; /**< Data Encoding of Sensor Result */ - uint16_t Digital_Sensor_Little_Endian : 1; /**< Data Endianness of Sensor Result */ - uint16_t Digital_Sensor_Left_Aligned : 1; /**< Data Alignment Within the Data Frame */ - uint16_t Digital_Sensor_Bit_Offset : 4; /**< Data Bit Offset, Relative to Alignment */ - uint16_t Digital_Sensor_Read_Bytes : 3; /**< Number of Bytes to Read from the Sensor */ - uint16_t Digital_Sensor_Data_Bits : 5; /**< Number of Relevant Data Bits */ - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Config_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Address Sensor Address (Digital_Sensor_Address) Register - * Sensor Address (Digital_Sensor_Address) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Address_Struct - *! \brief Sensor Address Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Address_t { - union { - struct { - uint8_t Digital_Sensor_Address : 8; /**< I2C Address or Write Address Command for SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Address_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Num_Cmds Number of Configuration, Read Commands for Digital Sensors (Digital_Sensor_Num_Cmds) Register - * Number of Configuration, Read Commands for Digital Sensors (Digital_Sensor_Num_Cmds) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Num_Cmds_Struct - *! \brief Number of Configuration, Read Commands for Digital Sensors Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Num_Cmds_t { - union { - struct { - uint8_t Digital_Sensor_Num_Cfg_Cmds : 3; /**< Number of Configuration Commands for Digital Sensor */ - uint8_t reserved3 : 1; - uint8_t Digital_Sensor_Num_Read_Cmds : 3; /**< Number of Read Commands for Digital Sensor */ - uint8_t reserved7 : 1; - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Num_Cmds_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Comms Digital Sensor Communication Clock Configuration (Digital_Sensor_Comms) Register - * Digital Sensor Communication Clock Configuration (Digital_Sensor_Comms) Register. - * @{ - */ - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Digital_Sensor_Comms_Digital_Sensor_Comms_En - *! \brief Enable Digital Sensor Comms Register Parameters (Digital_Sensor_Comms_En) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_DIGITAL_COMMS_DEFAULT = 0, /**< Default Parameters Used for Digital Sensor Communications */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_DIGITAL_COMMS_USER = 1 /**< User Supplied Parameters Used for Digital Sensor Communications */ -} ADI_ADISENSE_CORE_Digital_Sensor_Comms_Digital_Sensor_Comms_En; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Digital_Sensor_Comms_SPI_Clock - *! \brief Controls Clock Frequency for SPI Sensors (SPI_Clock) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_13MHZ = 0, /**< 13 MHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_6_5MHZ = 1, /**< 6.5 MHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_3_25MHZ = 2, /**< 3.25 MHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_1_625MHZ = 3, /**< 1.625 MHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_812KHZ = 4, /**< 812.5kHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_406KHZ = 5, /**< 406.2kHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_203KHZ = 6, /**< 203.1kHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_101KHZ = 7, /**< 101.5kHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_50KHZ = 8, /**< 50.8kHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_25KHZ = 9, /**< 25.4kHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_12KHZ = 10, /**< 12.7kHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_6KHZ = 11, /**< 6.3kHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_3KHZ = 12, /**< 3.2kHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_1_5KHZ = 13, /**< 1.58kHz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_793HZ = 14, /**< 793Hz */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_396HZ = 15 /**< 396Hz */ -} ADI_ADISENSE_CORE_Digital_Sensor_Comms_SPI_Clock; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Digital_Sensor_Comms_I2C_Clock - *! \brief Controls SCLK Frequency for I2C Sensors (I2C_Clock) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_100K = 0, /**< 100kHz SCL */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_400K = 1, /**< 400kHz SCL */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_RESERVED1 = 2, /**< Reserved */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_RESERVED2 = 3 /**< Reserved */ -} ADI_ADISENSE_CORE_Digital_Sensor_Comms_I2C_Clock; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Digital_Sensor_Comms_Uart_Baud - *! \brief Controls Baud Rate for UART Sensors (Uart_Baud) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_115200 = 0, /**< 115200 bps */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_57600 = 1, /**< 57600 bps */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_38400 = 2, /**< 38400 bps */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_19200 = 3, /**< 19200 bps */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_9600 = 4, /**< 9600 bps */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_4800 = 5, /**< 4800 bps */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_2400 = 6, /**< 2400 bps */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_1200 = 7 /**< 1200 bps */ -} ADI_ADISENSE_CORE_Digital_Sensor_Comms_Uart_Baud; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Digital_Sensor_Comms_SPI_Mode - *! \brief Configuration for Sensor SPI Protocol (SPI_Mode) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_0 = 0, /**< Clock Polarity = 0 Clock Phase = 0 */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_1 = 1, /**< Clock Polarity = 0 Clock Phase = 1 */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_2 = 2, /**< Clock Polarity = 1 Clock Phase = 0 */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_3 = 3 /**< Clock Polarity = 1 Clock Phase = 1 */ -} ADI_ADISENSE_CORE_Digital_Sensor_Comms_SPI_Mode; - - -/* ========================================================================= - *! \enum ADI_ADISENSE_CORE_Digital_Sensor_Comms_Uart_Mode - *! \brief Configuration for Sensor UART Protocol (Uart_Mode) Enumerations - * ========================================================================= */ -typedef enum -{ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N1 = 0, /**< 8 Data Bits No Parity 1 Stop Bit */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N2 = 1, /**< 8 Data Bits No Parity 2 Stop Bits */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N3 = 2, /**< 8 Data Bits No Parity 3 Stop Bits */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E1 = 4, /**< 8 Data Bits Even Parity 1 Stop Bit */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E2 = 5, /**< 8 Data Bits Even Parity 2 Stop Bits */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E3 = 6, /**< 8 Data Bits Even Parity 3 Stop Bits */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O1 = 8, /**< 8 Data Bits Odd Parity 1 Stop Bit */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O2 = 9, /**< 8 Data Bits Odd Parity 2 Stop Bits */ - ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O3 = 10 /**< 8 Data Bits Odd Parity 3 Stop Bits */ -} ADI_ADISENSE_CORE_Digital_Sensor_Comms_Uart_Mode; - - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Comms_Struct - *! \brief Digital Sensor Communication Clock Configuration Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Comms_t { - union { - struct { - uint16_t Digital_Sensor_Comms_En : 1; /**< Enable Digital Sensor Comms Register Parameters */ - uint16_t SPI_Clock : 4; /**< Controls Clock Frequency for SPI Sensors */ - uint16_t I2C_Clock : 2; /**< Controls SCLK Frequency for I2C Sensors */ - uint16_t Uart_Baud : 3; /**< Controls Baud Rate for UART Sensors */ - uint16_t SPI_Mode : 2; /**< Configuration for Sensor SPI Protocol */ - uint16_t Uart_Mode : 4; /**< Configuration for Sensor UART Protocol */ - }; - uint16_t VALUE16; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Comms_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Command1 Sensor Configuration Command1 (Digital_Sensor_Command1) Register - * Sensor Configuration Command1 (Digital_Sensor_Command1) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Command1_Struct - *! \brief Sensor Configuration Command1 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Command1_t { - union { - struct { - uint8_t Digital_Sensor_Command1 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Command1_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Command2 Sensor Configuration Command2 (Digital_Sensor_Command2) Register - * Sensor Configuration Command2 (Digital_Sensor_Command2) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Command2_Struct - *! \brief Sensor Configuration Command2 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Command2_t { - union { - struct { - uint8_t Digital_Sensor_Command2 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Command2_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Command3 Sensor Configuration Command3 (Digital_Sensor_Command3) Register - * Sensor Configuration Command3 (Digital_Sensor_Command3) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Command3_Struct - *! \brief Sensor Configuration Command3 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Command3_t { - union { - struct { - uint8_t Digital_Sensor_Command3 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Command3_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Command4 Sensor Configuration Command4 (Digital_Sensor_Command4) Register - * Sensor Configuration Command4 (Digital_Sensor_Command4) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Command4_Struct - *! \brief Sensor Configuration Command4 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Command4_t { - union { - struct { - uint8_t Digital_Sensor_Command4 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Command4_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Command5 Sensor Configuration Command5 (Digital_Sensor_Command5) Register - * Sensor Configuration Command5 (Digital_Sensor_Command5) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Command5_Struct - *! \brief Sensor Configuration Command5 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Command5_t { - union { - struct { - uint8_t Digital_Sensor_Command5 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Command5_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Command6 Sensor Configuration Command6 (Digital_Sensor_Command6) Register - * Sensor Configuration Command6 (Digital_Sensor_Command6) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Command6_Struct - *! \brief Sensor Configuration Command6 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Command6_t { - union { - struct { - uint8_t Digital_Sensor_Command6 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Command6_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Command7 Sensor Configuration Command7 (Digital_Sensor_Command7) Register - * Sensor Configuration Command7 (Digital_Sensor_Command7) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Command7_Struct - *! \brief Sensor Configuration Command7 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Command7_t { - union { - struct { - uint8_t Digital_Sensor_Command7 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Command7_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Read_Cmd1 Sensor Read Command1 (Digital_Sensor_Read_Cmd1) Register - * Sensor Read Command1 (Digital_Sensor_Read_Cmd1) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd1_Struct - *! \brief Sensor Read Command1 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd1_t { - union { - struct { - uint8_t Digital_Sensor_Read_Cmd1 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd1_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Read_Cmd2 Sensor Read Command2 (Digital_Sensor_Read_Cmd2) Register - * Sensor Read Command2 (Digital_Sensor_Read_Cmd2) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd2_Struct - *! \brief Sensor Read Command2 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd2_t { - union { - struct { - uint8_t Digital_Sensor_Read_Cmd2 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd2_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Read_Cmd3 Sensor Read Command3 (Digital_Sensor_Read_Cmd3) Register - * Sensor Read Command3 (Digital_Sensor_Read_Cmd3) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd3_Struct - *! \brief Sensor Read Command3 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd3_t { - union { - struct { - uint8_t Digital_Sensor_Read_Cmd3 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd3_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Read_Cmd4 Sensor Read Command4 (Digital_Sensor_Read_Cmd4) Register - * Sensor Read Command4 (Digital_Sensor_Read_Cmd4) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd4_Struct - *! \brief Sensor Read Command4 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd4_t { - union { - struct { - uint8_t Digital_Sensor_Read_Cmd4 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd4_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Read_Cmd5 Sensor Read Command5 (Digital_Sensor_Read_Cmd5) Register - * Sensor Read Command5 (Digital_Sensor_Read_Cmd5) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd5_Struct - *! \brief Sensor Read Command5 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd5_t { - union { - struct { - uint8_t Digital_Sensor_Read_Cmd5 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd5_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Read_Cmd6 Sensor Read Command6 (Digital_Sensor_Read_Cmd6) Register - * Sensor Read Command6 (Digital_Sensor_Read_Cmd6) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd6_Struct - *! \brief Sensor Read Command6 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd6_t { - union { - struct { - uint8_t Digital_Sensor_Read_Cmd6 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd6_t; - -/*@}*/ - -/** @defgroup Digital_Sensor_Read_Cmd7 Sensor Read Command7 (Digital_Sensor_Read_Cmd7) Register - * Sensor Read Command7 (Digital_Sensor_Read_Cmd7) Register. - * @{ - */ - -/* ========================================================================== - *! \struct ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd7_Struct - *! \brief Sensor Read Command7 Register bit field structure - * ========================================================================== */ -typedef struct _ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd7_t { - union { - struct { - uint8_t Digital_Sensor_Read_Cmd7 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ - }; - uint8_t VALUE8; - }; -} ADI_ADISENSE_CORE_Digital_Sensor_Read_Cmd7_t; - -/*@}*/ - - -#if defined (__CC_ARM) -#pragma pop -#endif - -#endif -
--- a/inc/adi_sense_1000/adi_sense_1000_api.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,473 +0,0 @@ -/* -Copyright 2018 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: adi_sense_api.h - * @brief: ADSNS1000 Host Library Application Programming Interface (API) - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_1000_API_H__ -#define __ADI_SENSE_1000_API_H__ - -#include "inc/adi_sense_types.h" -#include "inc/adi_sense_config_types.h" -#include "inc/adi_sense_platform.h" -#include "adi_sense_1000_config.h" -#include "adi_sense_1000_lut_data.h" - -/*! @ingroup ADISENSE_Api */ - -/*! @defgroup ADSNS1000_Api ADSNS1000 Host Library API - * ADSNS1000 device-specific API function prototypes. - * These are supplementary to the common ADISENSE Host Library API. - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/*! - * @brief Read one or more device registers at the specified register address. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] nAddress Register map address to read from - * @param[out] pData Pointer to return the register map data - * @param[in] nLength Number of bytes of data to read from the register map - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Provides direct byte-level read access to the device register map. - * The size and format of the register(s) must be known. - * - * @note Reads from special "keyhole" or "FIFO" registers will be handled - * according to documentation for those registers. - */ -ADI_SENSE_RESULT adi_sense_1000_ReadRegister( - ADI_SENSE_DEVICE_HANDLE const hDevice, - uint16_t const nAddress, - void * const pData, - unsigned const nLength); - -/*! - * @brief Write one or more device registers at the specified register address. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] nAddress Register map address to read from - * @param[out] pData Pointer to return the register map data - * @param[in] nLength Number of bytes of data to read from the register map - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Provides direct byte-level write access to the device register map. - * The size and format of the register(s) must be known. - * - * @note Writes to read-only registers will be ignored by the device. - * @note Writes to special "keyhole" registers will be handled according to - * documentation for those registers. - */ -ADI_SENSE_RESULT adi_sense_1000_WriteRegister( - ADI_SENSE_DEVICE_HANDLE const hDevice, - uint16_t const nAddress, - void * const pData, - unsigned const nLength); - -/*! - * @brief Update power configuration settings on the device. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] pPowerConfig Power configuration details - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Translates configuration details provided into device-specific - * register settings and updates device configuration registers. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetPowerConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_POWER_CONFIG *pPowerConfig); - -/*! - * @brief Update measurement configuration settings on the device. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] pMeasurementConfig Measurement configuration details - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Translates configuration details provided into device-specific - * register settings and updates device configuration registers. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetMeasurementConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_MEASUREMENT_CONFIG *pMeasurementConfig); - -/*! - * @brief Update diagnostics configuration settings on the device. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] pDiagnosticsConfig Diagnostics configuration details - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Translates configuration details provided into device-specific - * register settings and updates device configuration registers. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetDiagnosticsConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_DIAGNOSTICS_CONFIG *pDiagnosticsConfig); - -/*! - * @brief Update channel configuration settings for a specific channel. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] eChannelId Selects the channel to be updated - * @param[in] pChannelConfig Channel configuration details - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Translates configuration details provided into device-specific - * register settings and updates device configuration registers. - * Allows individual channel configuration details to be dynamically - * adjusted without rewriting the full device configuration. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetChannelConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_CHANNEL_CONFIG *pChannelConfig); - -/*! - * @brief Update number of measurements-per-cycle for a specific channel. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] eChannelId Selects the channel to be updated - * @param[in] nMeasurementsPerCycle Specifies the number of measurements to be - * obtained from this channel in each - * measurement cycle. Set as 0 to disable the - * channel (omit from measurement cycle). - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Translates configuration details provided into device-specific - * register settings and updates device configuration registers. - * Allows individual channels to be dynamically enabled/disabled, and - * measurements-per-cycle to be adjusted. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetChannelCount( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - uint32_t nMeasurementsPerCycle); - -/*! - * @brief Update priority level for a specific channel. - * - * @param[in] hDevice ADI Sense device context handle - * @param[in] eChannelId Selects the channel to be updated - * @param[in] ePriority Specifies the channel priority level - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Translates configuration details provided into device-specific - * register settings and updates device configuration registers. - * Allows individual channels to be dynamically re-prioritised. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetChannelPriority( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_CHANNEL_PRIORITY ePriority); - -/*! - * @brief Update the measurement threshold limits for a specified channel. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] eChannelId Selects the channel to be updated - * @param[in] fHighThresholdLimit Optional maximum threshold value for each - * processed sample, to be checked prior to - * publishing. A channel ALERT condition is - * raised if the processed value is higher than - * this threshold. Set to NaN if not required. - * @param[in] fLowThresholdLimit Optional minimum threshold value for each - * processed sample, to be checked prior to - * publishing. A channel ALERT condition is - * raised if the processed value is lower than - * this threshold. Set to NaN if not required. - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Translates configuration details provided into device-specific - * register settings and updates device configuration registers. - * Allows individual channel thresholds to be dynamically adjusted. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetChannelThresholdLimits( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - float32_t fHighThresholdLimit, - float32_t fLowThresholdLimit); - - -/*! - * @brief Set a sensor specific parameter for a specified channel. - * - * @param[in] hDevice ADI Sense device context handle - * @param[in] eChannelId Selects the channel to be updated - * @param[in] fSensorParam Sensor specific parameter - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Translates configuration details provided into device-specific - * register settings and updates device configuration registers. - * Allows optional sensor-specific parameter to be specified - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetSensorParameter( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - float32_t fSensorParam); -/*! - * @brief Update the extra settling time for a specified channel. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] eChannelId Selects the channel to be updated - * @param[in] nSettlingTime A minimum settling time is applied internally for - * each channel, based on the sensor type. However, - * additional settling time (microseconds) can - * optionally be specified here. Set to 0 if not - * required. - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Translates configuration details provided into device-specific - * register settings and updates device configuration registers. - * Allows individual channel settling times to be dynamically adjusted. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetChannelSettlingTime( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - uint32_t nSettlingTime); - -#ifdef __V2_3_CFG_FMT__ -/*! - * @brief Enable access to advanced sensor configuration options. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] key Key to unlock advanced access - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details When the correct access key is provided, access to advanced sensor - * configuration options and use of advanced sensor types is enabled. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetAdvancedAccess( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_1000_ADVANCED_ACCESS_KEY key); -#endif - -/*! - * @brief Assemble a list of separate Look-Up Tables into a single buffer - * - * @param[out] pLutBuffer Pointer to the Look-Up Table data buffer where - * the assembled Look-Up Table data will be placed - * @param[in] nLutBufferSize Allocated size, in bytes, of the output data buffer - * @param[in] nNumTables Number of tables to add to the Look-Up Table buffer - * @param[in] ppDesc Array of pointers to the table descriptors to be added - * @param[in] ppData Array of pointers to the table data to be added - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details This utiliity function fills the Look-up Table header fields; then - * walks through the array of individual table descriptor and data - * pointers provided, appending (copying) each one to the Look-Up Table - * data buffer. The length and crc16 fields of each table descriptor - * will be calculated and filled by this function, but other fields in - * the descriptor structure must be filled by the caller beforehand. - * - * @note The assembled LUT data buffer filled by this function can then be - * written to the device memory using @ref adi_sense_1000_SetLutData. - */ -ADI_SENSE_RESULT adi_sense_1000_AssembleLutData( - ADI_SENSE_1000_LUT * pLutBuffer, - unsigned nLutBufferSize, - unsigned const nNumTables, - ADI_SENSE_1000_LUT_DESCRIPTOR * const ppDesc[], - ADI_SENSE_1000_LUT_TABLE_DATA * const ppData[]); - -/*! - * @brief Write Look-Up Table data to the device memory - * - * @param[in] hDevice ADISENSE device context handle - * @param[out] pLutData Pointer to the Look-Up Table data structure - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Validates the Look-Up Table data format and loads it into - * device memory via dedicated keyhole registers. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetLutData( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_1000_LUT * const pLutData); - -/*! - * @brief Write Look-Up Table raw data to the device memory - * - * @param[in] hDevice ADISENSE device context handle - * @param[out] pLutData Pointer to the Look-Up Table raw data structure - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details This can be used instead of @ref adi_sense_1000_SetLutData for - * loading LUT data from the alternative raw data format. See - * @ref adi_sense_1000_SetLutData for more information. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_1000_SetLutDataRaw( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_1000_LUT_RAW * const pLutData); - -/*! - * @brief Get the number of samples available when DATAREADY status is asserted. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] eMeasurementMode Must be set to the same value used for @ref - * adi_sense_StartMeasurement(). - * @param[out] peOperatingMode Pointer to return the configured operating mode - * @param[out] peDataReadyMode Pointer to return the configured data publishing mode - * @param[out] pnSamplesPerDataready Pointer to return the calculated number of samples - * available when DATAREADY is asserted - * @param[out] pnSamplesPerCycle Pointer to return the calculated number of samples - * produced per measurement cycle - * @param[out] pnBytesPerSample Pointer to return the size, in bytes, of each sample - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Examines the current configuration settings in the device registers - * to calculate the number of samples available whenever the DATAREADY - * signal is asserted, along with other related information. This may - * be used to allocate buffers to store samples and to determine how - * many samples to retrieve whenever the DATAREADY status is asserted. - */ -ADI_SENSE_RESULT adi_sense_1000_GetDataReadyModeInfo( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_MEASUREMENT_MODE const eMeasurementMode, - ADI_SENSE_1000_OPERATING_MODE * const peOperatingMode, - ADI_SENSE_1000_DATAREADY_MODE * const peDataReadyMode, - uint32_t * const pnSamplesPerDataready, - uint32_t * const pnSamplesPerCycle, - uint8_t * const pnBytesPerSample); - -#ifdef __cplusplus -} -#endif - -/*! - * @} - */ - -#endif /* __ADI_SENSE_1000_API_H__ */ -
--- a/inc/adi_sense_1000/adi_sense_1000_config.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,980 +0,0 @@ -/* -Copyright 2018 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -Copyright (c) 2017 Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - Modified versions of the software must be conspicuously marked as such. - - This software is licensed solely and exclusively for use with processors - manufactured by or for Analog Devices, Inc. - - This software may not be combined or merged with other code in any manner - that would cause the software to become subject to terms and conditions - which differ from those listed here. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights of one - or more patent holders. This license does not release you from the - requirement that you obtain separate licenses from these patent holders - to use this software. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL -PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: adi_sense_1000_config.h - * @brief: Configuration type definitions for ADSNS1000. - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_1000_CONFIG_H__ -#define __ADI_SENSE_1000_CONFIG_H__ - -#include "adi_sense_platform.h" -#include "adi_sense_1000_sensor_types.h" - -/* Undefine for versions prior to V2.3. */ -#undef __V2_3_CFG_FMT__ - - -/*! @addtogroup ADSNS1000_Api - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/*! Maximum length allowed for a digital sensor command */ -#define ADI_SENSE_1000_SENSOR_COMMAND_MAX_LENGTH 7 - -/*! ADSNS1000 channel priority options */ -typedef enum { - ADI_SENSE_1000_CHANNEL_PRIORITY_0 = 0, - ADI_SENSE_1000_CHANNEL_PRIORITY_1, - ADI_SENSE_1000_CHANNEL_PRIORITY_2, - ADI_SENSE_1000_CHANNEL_PRIORITY_3, - ADI_SENSE_1000_CHANNEL_PRIORITY_4, - ADI_SENSE_1000_CHANNEL_PRIORITY_5, - ADI_SENSE_1000_CHANNEL_PRIORITY_6, - ADI_SENSE_1000_CHANNEL_PRIORITY_7, - ADI_SENSE_1000_CHANNEL_PRIORITY_8, - ADI_SENSE_1000_CHANNEL_PRIORITY_9, - ADI_SENSE_1000_CHANNEL_PRIORITY_10, - ADI_SENSE_1000_CHANNEL_PRIORITY_11, - ADI_SENSE_1000_CHANNEL_PRIORITY_12, - ADI_SENSE_1000_CHANNEL_PRIORITY_13, - ADI_SENSE_1000_CHANNEL_PRIORITY_14, - ADI_SENSE_1000_CHANNEL_PRIORITY_15, - - ADI_SENSE_1000_CHANNEL_PRIORITY_HIGHEST = ADI_SENSE_1000_CHANNEL_PRIORITY_0, - ADI_SENSE_1000_CHANNEL_PRIORITY_LOWEST = ADI_SENSE_1000_CHANNEL_PRIORITY_15, -} ADI_SENSE_1000_CHANNEL_PRIORITY; - -/*! ADSNS1000 operating mode options */ -typedef enum { - ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE = 1, - /*!< Executes a single measurement cycle and stops */ - ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS, - /*!< Continuously executes measurement cycles */ - ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE, - /*!< Executes a burst of measurement cycles, repeated at defined intervals */ -} ADI_SENSE_1000_OPERATING_MODE; - -/*! ADSNS1000 data ready mode options */ -typedef enum { - ADI_SENSE_1000_DATAREADY_PER_CONVERSION = 1, - /*!< The DATAREADY signal is asserted after completion of each conversion - * - a single data sample only from the latest completed conversion is - * stored in this mode - */ - ADI_SENSE_1000_DATAREADY_PER_CYCLE, - /*!< The DATAREADY signal is asserted after completion of each measurement - * cycle - * - data samples only from the lastest completed measurement cycle are - * stored in this mode - */ - ADI_SENSE_1000_DATAREADY_PER_MULTICYCLE_BURST, - /*!< The DATAREADY signal is asserted after completion of each burst of - * measurement cycles - * - applicable only when @ref ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE - * is also selected - * - data samples only from the lastest completed burst of measurement - * cycles are stored in this mode - */ -} ADI_SENSE_1000_DATAREADY_MODE; - -/*! ADSNS1000 calibration mode options */ -typedef enum { - ADI_SENSE_1000_NO_CALIBRATION = 0, - /*!< No full scale ADC calibration is performed after a latch command is sent. - */ - ADI_SENSE_1000_DO_CALIBRATION, - /*!< Full scale ADC Calibration is performed after a latch command is sent. - */ -} ADI_SENSE_1000_CALIBRATION_MODE; - -/*! ADSNS1000 power mode options */ -typedef enum { - ADI_SENSE_1000_POWER_MODE_LOW = 1, - /*!< Lowest ADC power consumption mode, with lowest conversion rate */ - ADI_SENSE_1000_POWER_MODE_MID, - /*!< Medium ADC power consumption mode, with medium conversion rate */ - ADI_SENSE_1000_POWER_MODE_FULL, - /*!< Highest ADC power consumption mode, with highest conversion rate */ -} ADI_SENSE_1000_POWER_MODE; - -/*! ADSNS1000 measurement cycle types */ -typedef enum -{ - ADI_SENSE_1000_CYCLE_TYPE_SWITCH = 0, - /*!< Switch channels after every conversion */ - ADI_SENSE_1000_CYCLE_TYPE_FULL = 1 - /*!< Perform full number of requested conversions on a channel - * consecutively before switching to the next channel */ -} ADI_SENSE_1000_CYCLE_TYPE; - -#ifdef __V2_3_CFG_FMT__ -/*! ADSNS1000 measurement analog filter settling options */ -typedef enum -{ - ADI_SENSE_1000_FILTER_SETTLING_ALWAYS = 0, - /*!< Allow full settling time to elapse between every measurement from an analog sensor */ - ADI_SENSE_1000_FILTER_SETTLING_FAST = 1 - /*!< Skip settling time between consecutive measurements from an analog sensor */ -} ADI_SENSE_1000_FILTER_SETTLING; -#endif - -/*! ADSNS1000 measurement unit options - * - * Optionally select a measurement unit for final conversion results. - * Currently applicable only to specific temperature sensor types. - */ -typedef enum { - ADI_SENSE_1000_MEASUREMENT_UNIT_UNSPECIFIED = 0, - /*!< No measurement unit specified */ - ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, - /*!< Celsius temperature unit - applicable to temperature sensors only */ - ADI_SENSE_1000_MEASUREMENT_UNIT_FAHRENHEIT, - /*!< Fahrenheit temperature unit - applicable to temperature sensors only */ -} ADI_SENSE_1000_MEASUREMENT_UNIT; - -/*! ADSNS1000 Open-Sensor Diagnostics frequency - * - * Select the per-cycle frequency at which open-sensor diagnostic - * checks should be performed. Open-sensor diagnostic checks typically require - * specific or time-consuming processing which cannot be executed while a - * measurement cycle is running. - * - * @note Open-sensor diagnostic checks, when performed, will add a delay to the - * start of the next measurement cycle. - */ -typedef enum { - ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_DISABLED = 0, - /*!< No Open-Sensor Detection is performed */ - ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_PER_CYCLE, - /*!< No Open-Sensor Detection is performed prior to each cycle */ - ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_PER_100_CYCLES, - /*!< No Open-Sensor Detection is performed at intervals of 100 cycles */ - ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_PER_1000_CYCLES, - /*!< No Open-Sensor Detection is performed at intervals of 1000 cycles */ -} ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS; - -/*! ADSNS1000 analog input signal amplification gain options - * - * @note applicable only to ADC analog sensor channels - */ -typedef enum { - ADI_SENSE_1000_ADC_GAIN_1X = 0, - /*!< no amplification gain */ - ADI_SENSE_1000_ADC_GAIN_2X, - /*!< x2 amplification gain */ - ADI_SENSE_1000_ADC_GAIN_4X, - /*!< x4 amplification gain */ - ADI_SENSE_1000_ADC_GAIN_8X, - /*!< x8 amplification gain */ - ADI_SENSE_1000_ADC_GAIN_16X, - /*!< x16 amplification gain */ - ADI_SENSE_1000_ADC_GAIN_32X, - /*!< x32 amplification gain */ - ADI_SENSE_1000_ADC_GAIN_64X, - /*!< x64 amplification gain */ - ADI_SENSE_1000_ADC_GAIN_128X, - /*!< x128 amplification gain */ -} ADI_SENSE_1000_ADC_GAIN; - -/*! ADSNS1000 analog sensor excitation current output level options - * - * @note applicable only to ADC analog sensor channels, and - * specific sensor types - */ -typedef enum { - ADI_SENSE_1000_ADC_EXC_CURRENT_NONE = 0, - /*!< Excitation current disabled */ - ADI_SENSE_1000_ADC_EXC_CURRENT_50uA, - /*!< 50uA excitation current enabled */ - ADI_SENSE_1000_ADC_EXC_CURRENT_100uA, - /*!< 100uA excitation current */ - ADI_SENSE_1000_ADC_EXC_CURRENT_250uA, - /*!< 250uA excitation current enabled */ - ADI_SENSE_1000_ADC_EXC_CURRENT_500uA, - /*!< 500uA excitation current enabled */ - ADI_SENSE_1000_ADC_EXC_CURRENT_750uA, - /*!< 750uA excitation current enabled */ - ADI_SENSE_1000_ADC_EXC_CURRENT_1000uA, - /*!< 1mA excitation current enabled */ -} ADI_SENSE_1000_ADC_EXC_CURRENT; - -/*! ADSNS1000 analog sensor excitation current ratios used for diode sensor - * - * @note applicable only to a diode sensor - */ -typedef enum { - ADI_SENSE_1000_ADC_EXC_CURRENT_IOUT_DIODE_DEFAULT = 0, - ADI_SENSE_1000_ADC_EXC_CURRENT_IOUT_DIODE_MAX, -} ADI_SENSE_1000_ADC_EXC_CURRENT_DIODE_RATIO; - -/*! ADSNS1000 analog reference selection options - * - * @note applicable only to ADC analog sensor channels, and - * specific sensor types - */ -typedef enum { - ADI_SENSE_1000_ADC_REFERENCE_NONE = 0, - /*!< No reference is selected */ - - ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, - /*!< Internal reference resistor #1 (4320 ohms) is selected */ - ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_2, - /*!< Internal reference resistor #2 (10000 ohms) is selected */ - ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, - /*!< Internal ADC voltage reference (2.5V) is selected */ - ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_AVDD, - /*!< Analag Supply Voltage AVDD reference (typically 3.3V) is selected */ - - ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_EXTERNAL_1, - /*!< External user-supplied reference resistor #1 is selected - * - * @note reference resistor value externalRef1Value must be specified - * (see @ref ADI_SENSE_1000_MEASUREMENT_CONFIG) */ - ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_EXTERNAL_2, - /*!< External user-supplied reference resistor #2 is selected - * - * @note reference resistor value externalRef2Value must be specified - * (see @ref ADI_SENSE_1000_MEASUREMENT_CONFIG) */ - ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_EXTERNAL_1, - /*!< External user-supplied reference voltage #1 is selected - * - * @note reference voltage value externalRef1Value must be specified - * (see @ref ADI_SENSE_1000_MEASUREMENT_CONFIG) */ - ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_EXTERNAL_2, - /*!< External user-supplied reference voltage #2 is selected - * - * @note reference voltage value externalRef2Value must be specified - * (see @ref ADI_SENSE_1000_MEASUREMENT_CONFIG) */ - ADI_SENSE_1000_ADC_REFERENCE_BRIDGE_EXCITATION, - /*!< Bridge Excition Voltage is selected as reference - * - * @note this reference MUST be selected for 4/6-wire bridge sensor types - * (see @ref ADI_SENSE_1000_ADC_SENSOR_TYPE) */ -} ADI_SENSE_1000_ADC_REFERENCE_TYPE; - -/*! ADSNS1000 analog filter selection options - * - * @note applicable only to ADC analog sensor channels - */ -typedef enum { - ADI_SENSE_1000_ADC_FILTER_SINC4 = 1, - /*!< SINC4 filter - * - * @note The number of input samples to be averaged by the filter - * must be specified by fs (see @ref ADI_SENSE_1000_ADC_FILTER_CONFIG). - * The fs value affects the output sample rate and settling times - * of the ADC */ - ADI_SENSE_1000_ADC_FILTER_FIR_20SPS, - /*!< FIR post filter, producing a 20sps output sample rate */ - ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, - /*!< FIR post filter, producing a 25sps output sample rate */ -} ADI_SENSE_1000_ADC_FILTER_TYPE; - -/*! ADSNS1000 FFT sequence mode options - * - * @note applicable only for FFT measurement modes - */ -typedef enum { - ADI_SENSE_1000_FFT_MODE_SINGLE = 0, - /*!< Performs a single sequence of FFTs on selected channels and stops */ - ADI_SENSE_1000_FFT_MODE_CONTINUOUS, - /*!< Performs continuous sequences of FFTs on selected channels */ -} ADI_SENSE_1000_FFT_MODE; - -/*! ADSNS1000 FFT size options (number of bins) - * - * @note applicable only for FFT measurement modes - */ -typedef enum { - ADI_SENSE_1000_FFT_SIZE_256 = 0, - /*!< 256 bins */ - ADI_SENSE_1000_FFT_SIZE_512, - /*!< 512 bins */ - ADI_SENSE_1000_FFT_SIZE_1024, - /*!< 1024 bins */ - ADI_SENSE_1000_FFT_SIZE_2048, - /*!< 2048 bins */ -} ADI_SENSE_1000_FFT_SIZE; - -/*! ADSNS1000 FFT window type options - * - * @note applicable only for FFT measurement modes - */ -typedef enum { - ADI_SENSE_1000_FFT_WINDOW_NONE = 0, - /*!< No Window */ - ADI_SENSE_1000_FFT_WINDOW_HANN, - /*!< Hann Window */ - ADI_SENSE_1000_FFT_WINDOW_BLACKMAN_HARRIS, - /*!< Blackman-Harris Window */ -} ADI_SENSE_1000_FFT_WINDOW; - -/*! ADSNS1000 FFT output format options - * - * @note applicable only for FFT measurement modes - */ -typedef enum { - ADI_SENSE_1000_FFT_OUTPUT_FULL = 0, - /*!< N/2-Term Amplitude Response */ - ADI_SENSE_1000_FFT_OUTPUT_FULL_WITH_RAW, - /**< N/2-Term Amplitude Response Plus N Raw ADC Samples */ - ADI_SENSE_1000_FFT_OUTPUT_MAX16, - /*!< Bin-Number and Amplitude of 16 Highest Peaks of Amplitude Response */ -} ADI_SENSE_1000_FFT_OUTPUT; - -/*! ADSNS1000 I2C clock speed options - * - * @note applicable only for I2C sensors - */ -typedef enum -{ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K = 0, - /*!< 100kHz I2C clock speed */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_400K, - /*!< 400kHz I2C clock speed */ -} ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED; - -/*! ADSNS1000 UART baud rate options - * - * @note applicable only for UART sensors - */ -typedef enum -{ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_115200 = 0, - /*!< 115200 UART baud rate */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_57600, - /*!< 57600 UART baud rate */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_38400, - /*!< 38400 UART baud rate */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_19200, - /*!< 19200 UART baud rate */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_9600, - /*!< 9600 UART baud rate */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_4800, - /*!< 4800 UART baud rate */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_2400, - /*!< 2400 UART baud rate */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_1200, - /*!< 1200 UART baud rate */ -} ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE; - -/*! ADSNS1000 UART line config options - * - * @note applicable only for UART sensors - */ -typedef enum -{ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N1 = 0, - /*!< UART line control 8 data bits / no parity / 1 stop bit */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N2, - /*!< UART line control 8 data bits / no parity / 2 stop bits */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N3, - /*!< UART line control 8 data bits / no parity / 3 stop bits */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E1, - /*!< UART line control 8 data bits / even parity / 1 stop bit */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E2, - /*!< UART line control 8 data bits / even parity / 2 stop bits */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E3, - /*!< UART line control 8 data bits / even parity / 3 stop bits */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O1, - /*!< UART line control 8 data bits / odd parity / 1 stop bit */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O2, - /*!< UART line control 8 data bits / odd parity / 2 stop bits */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O3, - /*!< UART line control 8 data bits / odd parity / 3 stop bits */ -} ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG; - -/*! ADSNS1000 SPI mode options - * - * @note applicable only for SPI sensors - */ -typedef enum -{ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_0 = 0, - /*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 0 */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_1, - /*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 1 */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_2, - /*!< SPI mode 0 Clock Polarity = 1 Clock Phase = 0 */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_3, - /*!< SPI mode 0 Clock Polarity = 1 Clock Phase = 1 */ -} ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE; - -/*! ADSNS1000 SPI clock speed options - * - * @note applicable only for SPI sensors - */ -typedef enum -{ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_13MHZ = 0, - /*!< SPI Clock Speed configured to 13MHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6_5MHZ, - /*!< SPI Clock Speed configured to 6.5MHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3_25MHZ, - /*!< SPI Clock Speed configured to 3.25MHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_625MHZ, - /*!< SPI Clock Speed configured to 1.625MHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_812KHZ, - /*!< SPI Clock Speed configured to 812kHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_406KHZ, - /*!< SPI Clock Speed configured to 406kHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_203KHZ, - /*!< SPI Clock Speed configured to 203kHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_101KHZ, - /*!< SPI Clock Speed configured to 101kHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_50KHZ, - /*!< SPI Clock Speed configured to 50kHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_25KHZ, - /*!< SPI Clock Speed configured to 25kHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_12KHZ, - /*!< SPI Clock Speed configured to 12kHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6KHZ, - /*!< SPI Clock Speed configured to 6kHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3KHZ, - /*!< SPI Clock Speed configured to 3kHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_5KHZ, - /*!< SPI Clock Speed configured to 1.5kHz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_793HZ, - /*!< SPI Clock Speed configured to 793hz */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_396HZ, - /*!< SPI Clock Speed configured to 396hz */ -} ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK; - -/*! ADSNS1000 Power Configuration options */ -typedef struct { - ADI_SENSE_1000_POWER_MODE powerMode; - /*!< Power mode selection */ -} ADI_SENSE_1000_POWER_CONFIG; - -/*! ADSNS1000 Multi-Cycle Configuration options - * - * @note required only when ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE is selected - * as the operatingMode (@ref ADI_SENSE_1000_MEASUREMENT_CONFIG) - */ -typedef struct { - uint32_t cyclesPerBurst; - /*!< Number of cycles to complete for a single burst */ - uint32_t burstInterval; - /*!< Interval, in seconds, between each successive burst of cycles */ -} ADI_SENSE_1000_MULTICYCLE_CONFIG; - -/*! ADSNS1000 Measurement Configuration options */ -typedef struct { - ADI_SENSE_1000_OPERATING_MODE operatingMode; - /*!< Operating mode - specifies how measurement cycles are scheduled */ - ADI_SENSE_1000_DATAREADY_MODE dataReadyMode; - /*!< Data read mode - specifies how output samples are stored for reading */ - ADI_SENSE_1000_CALIBRATION_MODE calibrationMode; - /*!< Calibration mode - specifies if adc calibration is performed after a latch command */ - ADI_SENSE_1000_MULTICYCLE_CONFIG multiCycleConfig; - /*!< Multi-Cycle configuration - specifies how bursts of measurement cycles - * are scheduled. Applicable only when operatingMode is - * ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE - */ - uint32_t cycleInterval; - /*!< Cycle interval - specifies the time interval between the start of each - * successive measurement cycle. Applicable only when operatingMode is - * not ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE - */ - ADI_SENSE_1000_CYCLE_TYPE cycleType; - /*!< Cycle type - specifies how the channel list is traversed with each - * conversion during the cycle. - */ -#ifdef __V2_3_CFG_FMT__ - ADI_SENSE_1000_FILTER_SETTLING filterSettling; - /*!< Analog filter settling - specifies the policy for settling time - * between consecutive measurements from an analog channel in a multi- - * channel configuration. Note that, in single analog channel - * configurations, settling time is always skipped between consecutive - * measurements in a measurement cycle. - */ -#endif - float32_t externalRef1Value; - /*!< Resistance/voltage value connected to external reference input #1. - * Applicable only if the selected reference type is - * ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_EXTERNAL_1 or - * ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_EXTERNAL_1 - * (see @ref ADI_SENSE_1000_ADC_REFERENCE_TYPE) - */ - float32_t externalRef2Value; - /*!< Resistance/voltage value connected to external reference input #2. - * Applicable only if the selected reference type is - * ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_EXTERNAL_2 or - * ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_EXTERNAL_2 - * (see @ref ADI_SENSE_1000_ADC_REFERENCE_TYPE) - */ - bool enableExternalFlash; - /*!< Enable the use of external flash memory for storage of samples. - */ -} ADI_SENSE_1000_MEASUREMENT_CONFIG; - -/*! ADSNS1000 ADC Excitation Current output configuration - * - * @note applicable only to ADC analog sensor channels, and - * specific sensor types - */ -typedef struct { - ADI_SENSE_1000_ADC_EXC_CURRENT outputLevel; - /*!< Excitation current output level */ - ADI_SENSE_1000_ADC_EXC_CURRENT_DIODE_RATIO diodeRatio; - /*!< Excitation current output diode ratio */ -} ADI_SENSE_1000_ADC_EXC_CURRENT_CONFIG; - -/*! ADSNS1000 ADC Filter configuration - * - * @note applicable only to ADC analog sensor channels - */ -typedef struct { - ADI_SENSE_1000_ADC_FILTER_TYPE type; - /*!< Filter type selection */ - uint32_t fs; - /*!< Number of input samples to accumulate and average in the filter. - * Applicable only when type is ADI_SENSE_1000_ADC_FILTER_SINC4 */ -} ADI_SENSE_1000_ADC_FILTER_CONFIG; - -/*! ADSNS1000 ADC Referemce configuration - * - * @note applicable only to ADC analog sensor channels - */ -typedef struct { - ADI_SENSE_1000_ADC_REFERENCE_TYPE type; - /*!< Filter type selection */ - bool disableBuffer; - /*!< Option to disable internal ADC reference buffer */ -} ADI_SENSE_1000_ADC_REFERENCE_CONFIG; - -/*! ADSNS1000 ADC analog channel configuration details - * - * @note applicable only to ADC analog sensor channels - */ -typedef struct { - ADI_SENSE_1000_ADC_SENSOR_TYPE sensor; - /*!< Sensor type selection */ - ADI_SENSE_1000_ADC_GAIN gain; - /*!< ADC Gain selection */ - ADI_SENSE_1000_ADC_EXC_CURRENT_CONFIG current; - /*!< ADC Excitation Current configuration */ - ADI_SENSE_1000_ADC_FILTER_CONFIG filter; - /*!< ADC Filter configuration */ - ADI_SENSE_1000_ADC_REFERENCE_CONFIG reference; - /*!< ADC Reference configuration */ - bool enableVbias; - /*!< Option to enable internal ADC voltage bias */ -} ADI_SENSE_1000_ADC_CHANNEL_CONFIG; - -/*! ADSNS1000 digital sensor data encoding - * - * @note applicable only to SPI and I2C digital sensor channels - */ -typedef enum -{ - ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_NONE, - /**< None/Invalid - data format is ignored if coding is set to this value */ - ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_UNIPOLAR, - /**< Unipolar - unsigned integer values */ - ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_TWOS_COMPLEMENT, - /**< Twos-complement - signed integer values */ - ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_OFFSET_BINARY, - /**< Offset Binary - used to represent signed values with unsigned integers, - * with the mid-range value representing 0 */ -} ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING; - -/*! ADSNS1000 digital sensor data format configuration - * - * @note applicable only to SPI and I2C digital sensor channels - */ -typedef struct { - ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING coding; - /**< Data Encoding of Sensor Result */ - bool littleEndian; - /**< Set as true if data format is little-endian, false otherwise */ - bool leftJustified; - /**< Set as true if data is left-justified in the data frame, false otherwise */ - uint8_t frameLength; - /**< Data frame length (number of bytes to read from the sensor) */ - uint8_t numDataBits; - /**< Number of relevant data bits to extract from the data frame */ - uint8_t bitOffset; - /**< Data bit offset, relative to data alignment within the data frame */ -} ADI_SENSE_1000_DIGITAL_SENSOR_DATA_FORMAT; - -/*! ADSNS1000 digital sensor command - * - * @note applicable only to SPI and I2C digital sensor channels - */ -typedef struct { - uint8_t command[ADI_SENSE_1000_SENSOR_COMMAND_MAX_LENGTH]; - /*!< Optional command bytes to send to the device */ - uint8_t commandLength; - /*!< Number of valid command bytes. Set to 0 if unused */ -} ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND; - -/*! ADSNS1000 digital sensor calibration param - * - * @note applicable only to digital sensor channels - */ -typedef struct { - uint32_t calibrationParam; - /*!< Independently established environmental variable used during calibration - * of a digital sensor. Used only if the sensor supports calibration - * and expects an environmental parameter - */ - bool enableCalibrationParam; - /*!< Allow Calibration_Parameter to be used during calibration of any digital sensor */ -} ADI_SENSE_1000_DIGITAL_CALIBRATION_COMMAND; - -/*! ADSNS1000 digital sensor communication config - * - * @note applicable only to digital sensor channels - */ -typedef struct { - bool useCustomCommsConfig; - /*!< Optional parameter to enable user digital communication settings */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED i2cClockSpeed; - /*!< Optional parameter to configure specific i2c speed for i2c sensor */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE spiMode; - /*!< Optional parameter to configure specific spi mode for spi sensor */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK spiClock; - /*!< Optional parameter to configure specific spi clock for spi sensor */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE uartBaudRate; - /*!< Optional parameter to configure specific uart baud rate for uart sensor */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG uartLineConfig; - /*!< Optional parameter to configure specific uart line control for uart sensor */ -} ADI_SENSE_1000_DIGITAL_SENSOR_COMMS; - -/*! ADSNS1000 I2C digital channel configuration details - * - * @note applicable only to I2C digital sensor channels - */ -typedef struct { - ADI_SENSE_1000_I2C_SENSOR_TYPE sensor; - /*!< Sensor type selection */ - uint32_t deviceAddress; - /*!< I2C device address (7-bit) */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND configurationCommand; - /*!< Optional configuration command to send to the device at start-up. - * A default configuration command will be used if this is not specified. - * Applicable only to specific I2C sensor types. - */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND dataRequestCommand; - /*!< Optional data request command to send to the device for each sample. - * A default data request command will be used if this is not specified. - * Applicable only to specific I2C sensor types. - */ - ADI_SENSE_1000_DIGITAL_SENSOR_DATA_FORMAT dataFormat; - /*!< Optional data format configuration to parse/extract data from the device. - * A default data format will be used if this is not specified. - * Applicable only to specific I2C sensor types - */ - ADI_SENSE_1000_DIGITAL_CALIBRATION_COMMAND digitalCalibrationParam; - /*!< This is used to supply an independently established environmental variable - * that must be used during calibration of a [digital] sensor which a) - * supports calibration and b) expects an environmental parameter. - * An example is a CO2 sensor, which may require the CO2 concentration level - * when performing a calibration - */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS configureComms; - /*!< Optional configuration to setup a user communication config. - * A default configuration will be used if this is not specified. - * Applicable only to specific I2C sensor types. - */ -} ADI_SENSE_1000_I2C_CHANNEL_CONFIG; - -/*! ADSNS1000 SPI digital channel configuration details - * - * @note applicable only to SPI digital sensor channels - */ -typedef struct { - ADI_SENSE_1000_SPI_SENSOR_TYPE sensor; - /*!< Sensor type selection */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND configurationCommand; - /*!< Optional configuration command to send to the device at start-up. - * A default configuration command will be used if this is not specified. - * Applicable only to specific SPI sensor types. - */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND dataRequestCommand; - /*!< Optional data request command to send to the device for each sample. - * A default data request command will be used if this is not specified. - * Applicable only to specific SPI sensor types. - */ - ADI_SENSE_1000_DIGITAL_SENSOR_DATA_FORMAT dataFormat; - /*!< Optional data format configuration to parse/extract data from the device. - * A default data format will be used if this is not specified. - * Applicable only to specific SPI sensor types - */ - ADI_SENSE_1000_DIGITAL_CALIBRATION_COMMAND digitalCalibrationParam; - /*!< This is used to supply an independently established environmental variable - * that must be used during calibration of a [digital] sensor which a) - * supports calibration and b) expects an environmental parameter. - * An example is a CO2 sensor, which may require the CO2 concentration level - * when performing a calibration - */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS configureComms; - /*!< Optional configuration to setup a user communication config. - * A default configuration will be used if this is not specified. - * Applicable only to specific SPI sensor types. - */ -} ADI_SENSE_1000_SPI_CHANNEL_CONFIG; - -/*! ADSNS1000 UART digital channel configuration details - * - * @note applicable only to UART digital sensor channels - */ -typedef struct { - ADI_SENSE_1000_UART_SENSOR_TYPE sensor; - /*!< Sensor type selection */ - ADI_SENSE_1000_DIGITAL_CALIBRATION_COMMAND digitalCalibrationParam; - /*!< This is used to supply an independently established environmental variable - * that must be used during calibration of a [digital] sensor which a) - * supports calibration and b) expects an environmental parameter. - * An example is a CO2 sensor, which may require the CO2 concentration level - * when performing a calibration - */ - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS configureComms; - /*!< Optional configuration to setup a user communication config. - * A default configuration will be used if this is not specified. - * Applicable only to specific UART sensor types. - */ -} ADI_SENSE_1000_UART_CHANNEL_CONFIG; - -/*! ADSNS1000 Measurement Channel configuration details */ -typedef struct { - bool enableChannel; - /*!< Option to include this channel in normal measurement cycles */ - bool enableFFT; - /*!< Option to include this channel in FFT measurement cycles */ - bool disablePublishing; - /*!< Option to disable publishing of data samples from this channel. The - * channel may still be included in measurement cycles, but data samples - * obtained from this channel will not be published. This is typically - * used for channels which are required only as a compensation reference - * for another channel (e.g. Cold-Junction Compensation channels). - */ - ADI_SENSE_1000_CHANNEL_ID compensationChannel; - /*!< Optional compensation channel. Set to ADI_SENSE_1000_CHANNEL_ID_NONE if not - * required. Typically used for thermocouple sensors that require a - * separate measurement of the "cold-junction" temperature, which can be - * be provided by an RTD temperature sensor connected on a separate - * "compensation channel" */ - bool enableUnityLut; - /*!< Option to choose the LUT for calculations, this implies that the - * fundamental measurement for the sensor (typically mV or Ohms) - * would be returned as the measurement result. - */ - ADI_SENSE_1000_MEASUREMENT_UNIT measurementUnit; - /*!< Optional measurement unit selection for conversion results. Applicable - * only for certain sensor types. Set to - * ADI_SENSE_1000_MEASUREMENT_UNIT_DEFAULT if not applicable. - */ - float32_t lowThreshold; - /*!< Optional minimum threshold value for each processed sample, to be - * checked prior to publishing. A channel ALERT condition is raised - * if the processed value is lower than this threshold. Set to NaN - * if not required. - */ - float32_t highThreshold; - /*!< Optional maximum threshold value for each processed sample, to be - * checked prior to publishing. A channel ALERT condition is raised - * if the processed value is higher than this threshold. Set to NaN - * if not required. - */ - float32_t offsetAdjustment; - /*!< Optional offset adjustment value applied to each processed sample. - * Set to NaN or 0.0 if not required. - */ - float32_t gainAdjustment; - /*!< Optional gain adjustment value applied to each processed sample. - * Set to NaN or 1.0 if not required. - */ - float32_t sensorParameter; - /*!< Optional sensor parameter adjustment. - * Set to NaN or 0 if not required. - */ - uint32_t measurementsPerCycle; - /*!< The number of measurements to obtain from this channel within each - * cycle. Each enabled channel is measured in turn, until the number of - * measurements requested for the channel has been reached. A different - * number of measurements-per-cycle may be specified for each channel. - */ - uint32_t cycleSkipCount; - /*!< Optional number of cycles to skip, such that this channel is included - * in the sequence in only one of every (cycleSkipCount + 1) cycles that - * occur. If set to 0 (default), this channel is included in every cycle; - * if set to 1, this channel is included in every 2nd cycle; if set to 2, - * this channel is included in every 3rd cycle, and so on. - */ - uint32_t extraSettlingTime; - /*!< A minimum settling time is applied internally for each channel, based - * on the sensor type. However, additional settling time (microseconds) - * can optionally be specified. Set to 0 if not required. - */ - ADI_SENSE_1000_CHANNEL_PRIORITY priority; - /*!< By default, channels are arranged in the measurement sequence based on - * ascending order of channel ID. However, a priority-level may be - * specified per channel to force a different ordering of the channels, - * with higher-priority channels appearing before lower-priority channels. - * Channels with equal priority are ordered by ascending order of channel - * ID. Lower numbers indicate higher priority, with 0 being the highest. - * Set to 0 if not required. - */ - union { - ADI_SENSE_1000_ADC_CHANNEL_CONFIG adcChannelConfig; - /*!< ADC channel configuration - applicable only to ADC channels */ - ADI_SENSE_1000_I2C_CHANNEL_CONFIG i2cChannelConfig; - /*!< I2C channel configuration - applicable only to I2C channels */ - ADI_SENSE_1000_SPI_CHANNEL_CONFIG spiChannelConfig; - /*!< SPI channel configuration - applicable only to SPI channels */ - ADI_SENSE_1000_UART_CHANNEL_CONFIG uartChannelConfig; - /*!< UART channel configuration - applicable only to UART channels */ - }; - /*!< Only one of adcChannelConfig, i2cChannelConfig, spiChannelConfig or - * uartChannelConfig is required, depending on the channel designation - * (analog, I2C, SPI or UART) - */ -} ADI_SENSE_1000_CHANNEL_CONFIG; - -/*! ADSNS1000 Diagnostics configuration details */ -typedef struct { - bool disableGlobalDiag; - /*!< Option to disable the following diagnostic checks on the ADC: - * - Reference Detection errors - * - Input under-/over-voltage errors - * - Calibration, Conversion and Saturation errors - */ - bool disableMeasurementDiag; - /*!< Option to disable additional checks per measurement channel: - * - High/low threshold limit violation - */ -#ifdef __V2_3_CFG_FMT__ - bool disableCriticalTempAbort; - /*!< Option to disable abort of measurement cycle if the operating - * temperature of the ADSNS1000 has exceeded critical limits - */ -#endif - ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS osdFrequency; - /*!< Option to enable Open-Circuit Detection at a selected cycle interval */ -} ADI_SENSE_1000_DIAGNOSTICS_CONFIG; - -/*! ADSNS1000 FFT Measurement Mode configuration options */ -typedef struct { - ADI_SENSE_1000_FFT_MODE mode; - /*!< FFT sequence mode */ - ADI_SENSE_1000_FFT_SIZE size; - /*!< FFT size selection */ - ADI_SENSE_1000_FFT_WINDOW window; - /*!< FFT window type selection */ - ADI_SENSE_1000_FFT_OUTPUT output; - /*!< FFT output type selection */ -} ADI_SENSE_1000_FFT_CONFIG; - -#ifdef __V2_3_CFG_FMT__ -typedef uint16_t ADI_SENSE_1000_ADVANCED_ACCESS_KEY; -#endif - -/*! ADSNS1000 Device configuration details */ -typedef struct { - ADI_SENSE_1000_POWER_CONFIG power; - /*!< Power configuration details */ - ADI_SENSE_1000_MEASUREMENT_CONFIG measurement; - /*!< Measurement configuration details */ - ADI_SENSE_1000_DIAGNOSTICS_CONFIG diagnostics; - /*!< Diagnostics configuration details */ - ADI_SENSE_1000_FFT_CONFIG fft; - /*!< FFT configuration details */ - ADI_SENSE_1000_CHANNEL_CONFIG channels[ADI_SENSE_1000_MAX_CHANNELS]; - /*!< Channel-specific configuration details */ -#ifdef __V2_3_CFG_FMT__ - ADI_SENSE_1000_ADVANCED_ACCESS_KEY advancedAccessKey; -#endif - /*!< Key to enable access to advanced sensor configuration options */ -} ADI_SENSE_1000_CONFIG; - -#ifdef __cplusplus -} -#endif - -/*! - * @} - */ - -#endif /* __ADI_SENSE_1000_CONFIG_H__ */ -
--- a/inc/adi_sense_1000/adi_sense_1000_host_comms.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* -Copyright (c) 2018 by ADI. This model is the confidential and -proprietary property of ADI and the possession or use of this -file requires a written license. -*/ - -#ifndef __ADI_SENSE_1000_HOST_COMMS_H__ -#define __ADI_SENSE_1000_HOST_COMMS_H__ - -#include "adi_sense_types.h" - -/* - * The host is expected to transfer a 16-bit command, followed by data bytes, in 2 - * separate transfers delineated by the CS signal and a short delay in between. - * - * The 16-bit command contains a right-justified 11-bit register address (offset), - * and the remaining upper 5 bits are reserved as command bits assigned as follows: - * [15:11] 10000b = write command, 01000b = read command, anything else is invalid - * [10:0] register address (0-2047) - */ - -/* Register address space is limited to 2048 bytes (11 bit address) */ -#define ADI_SENSE_1000_HOST_COMMS_CMD_MASK 0xF800 -#define ADI_SENSE_1000_HOST_COMMS_ADR_MASK 0x07FF - -/* - * The following commands are currently supported, anything else is treated - * as an error - */ -#define ADI_SENSE_1000_HOST_COMMS_WRITE_CMD 0x8000 -#define ADI_SENSE_1000_HOST_COMMS_READ_CMD 0x4000 - -/* - * The following bytes are sent back to the host when a command is recieved, - * to be used by the host to verify that we were ready to receive the command. - */ -#define ADI_SENSE_1000_HOST_COMMS_CMD_RESP_0 0xF0 -#define ADI_SENSE_1000_HOST_COMMS_CMD_RESP_1 0xE1 - -/* - * The following minimum delay, in microseconds, must be inserted after each SPI - * transfer to allow time for it to be processed by the device - */ -#define ADI_SENSE_1000_HOST_COMMS_XFER_DELAY (60) - -/*! ADSNS1000 Sensor Result bit field structure */ -typedef struct _ADI_SENSE_1000_Sensor_Result_t { - union { - struct { - float32_t Sensor_Result; /**< Linearized and compensated sensor result */ - uint32_t Channel_ID : 4; /**< Indicates which channel this result corresponds to */ - uint32_t Ch_Error : 1; /**< Indicates Error on channel */ - uint32_t Ch_Alert : 1; /**< Indicates Alert on channel */ - uint32_t Ch_Raw : 1; /**< Indicates if Raw sensor data field is valid */ - uint32_t Ch_Valid : 1; /**< Indicates if this Result structure is valid */ - uint32_t Raw_Sample : 24; /**< Raw sensor data value */ - }; - uint64_t VALUE64; - }; -} ADI_SENSE_1000_Sensor_Result_t; - -#endif /* __ADI_SENSE_1000_HOST_COMMS_H__ */ -
--- a/inc/adi_sense_1000/adi_sense_1000_lut_data.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,362 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: - * @brief: Look-Up Table data-type definitions for ADSNS1000 API. - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_1000_LUT_DATA_H__ -#define __ADI_SENSE_1000_LUT_DATA_H__ - -#include "adi_sense_types.h" -#include "adi_sense_1000_sensor_types.h" - -//lint --e{38} suppress "offset of symbol" - -/*! @addtogroup ADSNS1000_Api - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/*! LUT data validation signature */ -#define ADI_SENSE_LUT_SIGNATURE 0x4C555473 - -/*! LUT data CRC-16-CCITT seed value */ -#define ADI_SENSE_LUT_CRC_SEED 0x4153 - -/*! LUT maximum allowed size */ -#define ADI_SENSE_LUT_MAX_SIZE 10240U - -/*! Linearisation look-up table / co-efficient list geometry */ -typedef enum { - ADI_SENSE_1000_LUT_GEOMETRY_RESERVED = 0x00, - /**< reserved - for internal use only */ - ADI_SENSE_1000_LUT_GEOMETRY_COEFFS = 0x01, - /**< 1D/2D equation coefficient list */ - ADI_SENSE_1000_LUT_GEOMETRY_NES_1D = 0x02, - /**< 1-dimensional not-equally-spaced look-up table */ - ADI_SENSE_1000_LUT_GEOMETRY_NES_2D = 0x03, - /**< 2-dimensional not-equally-spaced look-up table */ - ADI_SENSE_1000_LUT_GEOMETRY_ES_1D = 0x04, - /**< 1-dimensional equally-spaced look-up table */ - ADI_SENSE_1000_LUT_GEOMETRY_ES_2D = 0x05, - /**< 2-dimensional equally-spaced look-up table */ -} ADI_SENSE_1000_LUT_GEOMETRY; - -/*! Linearisation equation type */ -typedef enum { - ADI_SENSE_1000_LUT_EQUATION_POLYN, - /**< Polynomial equation, typically used for Thermocouple and RTD - * linearisation */ - ADI_SENSE_1000_LUT_EQUATION_POLYNEXP, - /**< Polynomial + exponential equation, typically used for Thermocouple - * inverse linearisation */ - ADI_SENSE_1000_LUT_EQUATION_QUADRATIC, - /**< Quadratic linearisation equation, typically used for RTD - * linearisation */ - ADI_SENSE_1000_LUT_EQUATION_STEINHART, - /**< Steinhart-Hart equation, typically used for Thermistor - * linearisation */ - ADI_SENSE_1000_LUT_EQUATION_LOGARITHMIC, - /**< Beta-based logarithmic equation, typically used for Thermistor - * linearisation */ - ADI_SENSE_1000_LUT_EQUATION_BIVARIATE_POLYN, - /**< Bi-variate polynomial equation, typically used for bridge pressure - * sensor linearisation - * @note 2nd-degree is the maximum currently supported - */ - ADI_SENSE_1000_LUT_EQUATION_COUNT, - /**< Enum count value - for internal use only */ - ADI_SENSE_1000_LUT_EQUATION_LUT, - /**< Hard-coded Look-Up Table - for internal use only */ -} ADI_SENSE_1000_LUT_EQUATION; - -typedef enum { - ADI_SENSE_1000_LUT_TC_DIRECTION_FORWARD, - /**< Thermocouple forward (mV to Celsius) linearisation - * Use this value by default for non-thermocouple sensors */ - ADI_SENSE_1000_LUT_TC_DIRECTION_BACKWARD, - /**< Thermocouple inverse (Celsius to mV) linearisation */ - ADI_SENSE_1000_LUT_TC_DIRECTION_COUNT, - /**< Enum count value - for internal use only */ -} ADI_SENSE_1000_LUT_TC_DIRECTION; - -/*! Linearisation data vector format */ -typedef enum { - ADI_SENSE_1000_LUT_DATA_TYPE_RESERVED = 0, - /**< Reserved - for internal use only */ - ADI_SENSE_1000_LUT_DATA_TYPE_FLOAT32 = 1, - /**< Single-precision 32-bit floating-point */ - ADI_SENSE_1000_LUT_DATA_TYPE_FLOAT64 = 2, - /**< Double-precision 64-bit floating-point */ -} ADI_SENSE_1000_LUT_DATA_TYPE; - -/*! Struct for a list of coefficients to be used in an equation */ -typedef struct __attribute__((packed, aligned(4))){ - uint32_t nCoeffs; - /**< number of coefficients */ - float32_t rangeMin; - /**< look-up table range - minimum */ - float32_t rangeMax; - /**< look-up table range - maximum */ - float64_t coeffs[]; - /**< C99 flexible array: sorted by ascending exponent in polynomials */ -} ADI_SENSE_1000_LUT_COEFF_LIST; - -/*! Struct for a 1-dimensional equally-spaced look-up table */ -typedef struct __attribute__((packed, aligned(4))){ - uint32_t nElements; - /**< number of elements. */ - float32_t initInputValue; - /**< initial input value, corresponding to first table element */ - float32_t inputValueIncrement; - /**< interval between successive input values */ - float32_t lut[]; - /**< C99 flexible array */ -} ADI_SENSE_1000_LUT_1D_ES; - -/*! Struct for a 1-dimensional not-equally-spaced look-up table */ -typedef struct __attribute__((packed, aligned(4))){ - uint32_t nElements; - /**< number of elements of each array. */ - float32_t lut[]; - /**< C99 flexible array, first X's array then Y's array*/ -} ADI_SENSE_1000_LUT_1D_NES; - -/*! Struct for a 2-dimensional equally-spaced look-up table */ -typedef struct __attribute__((packed, aligned(4))){ - uint16_t nElementsX; - /**< number of elements for input X. */ - uint16_t nElementsY; - /**< number of elements for input Y. */ - float32_t initInputValueX; - /**< initial X input value */ - float32_t inputValueIncrementX; - /**< interval between successive X input values */ - float32_t initInputValueY; - /**< initial Y input value */ - float32_t inputValueIncrementY; - /**< interval between successive Y input values */ - float32_t lut[]; - /**< C99 flexible array, Z matrix[y][x] */ -} ADI_SENSE_1000_LUT_2D_ES; - -/*! Struct for a 2-dimensional not-equally-spaced look-up table */ -typedef struct __attribute__((packed, aligned(4))){ - uint16_t nElementsX; - /**< number of elements in array X. */ - uint16_t nElementsY; - /**< number of elements in array Y. */ - float32_t lut[]; - /**< C99 flexible array, Order: X's array, Y's array, Z matrix[y][x] */ -} ADI_SENSE_1000_LUT_2D_NES; - -/*! Struct for a 2-dimensional list of coefficients to be used in a - * bi-variate polynomial equation */ -typedef struct __attribute__((packed, aligned(4))){ - uint32_t maxDegree; - /**< number of coefficients */ - float32_t rangeMinX; - /**< look-up table range - minimum X input value */ - float32_t rangeMaxX; - /**< look-up table range - maximum X input value */ - float32_t rangeMinY; - /**< look-up table range - minimum Y input value */ - float32_t rangeMaxY; - /**< look-up table range - maximum Y input value */ - float64_t coeffs[]; - /**< C99 flexible array: sorted by ascending X degree then sorted by - * ascending Y exponent */ -} ADI_SENSE_1000_LUT_2D_POLYN_COEFF_LIST; - -/*! Macro to calculate the number of elements in - * a @ref ADI_SENSE_1000_LUT_COEFF_LIST table */ -#define ADI_SENSE_1000_LUT_COEFF_LIST_NELEMENTS(_t) \ - ((_t).nCoeffs) - -/*! Macro to calculate the number of elements in - * a @ref ADI_SENSE_1000_LUT_1D_ES table */ -#define ADI_SENSE_1000_LUT_1D_ES_NELEMENTS(_t) \ - ((_t).nElements) - -/*! Macro to calculate the number of elements in - * a @ref ADI_SENSE_1000_LUT_1D_NES table */ -#define ADI_SENSE_1000_LUT_1D_NES_NELEMENTS(_t) \ - ((_t).nElements * 2) - -/*! Macro to calculate the number of elements in - * a @ref ADI_SENSE_1000_LUT_2D_ES table */ -#define ADI_SENSE_1000_LUT_2D_ES_NELEMENTS(_t) \ - ((_t).nElementsX * (_t).nElementsX) - -/*! Macro to calculate the number of elements in - * a @ref ADI_SENSE_1000_LUT_2D_NES table */ -#define ADI_SENSE_1000_LUT_2D_NES_NELEMENTS(_t) \ - ((_t).nElementsX + (_t).nElementsY + ((_t).nElementsX * (_t).nElementsY)) - -/*! Macro to calculate the number of elements in - * a @ref ADI_SENSE_1000_LUT_2D_POLYN_COEFF_LIST table */ -#define ADI_SENSE_1000_LUT_2D_POLYN_COEFF_LIST_NELEMENTS(_t) \ - (((_t).maxDegree + 1) * ((_t).maxDegree + 2) / 2) - -/*! Macro to calculate the storage size in bytes of - * a @ref ADI_SENSE_1000_LUT_COEFF_LIST table */ -#define ADI_SENSE_1000_LUT_COEFF_LIST_SIZE(_t) \ - (sizeof(_t) + (sizeof(float64_t) * ADI_SENSE_1000_LUT_COEFF_LIST_NELEMENTS(_t))) - -/*! Macro to calculate the storage size in bytes of - * a @ref ADI_SENSE_1000_LUT_1D_ES table */ -#define ADI_SENSE_1000_LUT_1D_ES_SIZE(_t) \ - (sizeof(_t) + (sizeof(float32_t) * ADI_SENSE_1000_LUT_1D_ES_NELEMENTS(_t))) - -/*! Macro to calculate the storage size in bytes of - * a @ref ADI_SENSE_1000_LUT_1D_NES table */ -#define ADI_SENSE_1000_LUT_1D_NES_SIZE(_t) \ - (sizeof(_t) + (sizeof(float32_t) * ADI_SENSE_1000_LUT_1D_NES_NELEMENTS(_t))) - -/*! Macro to calculate the storage size in bytes of - * a @ref ADI_SENSE_1000_LUT_2D_ES table */ -#define ADI_SENSE_1000_LUT_2D_ES_SIZE(_t) \ - (sizeof(_t) + (sizeof(float32_t) * ADI_SENSE_1000_LUT_2D_ES_NELEMENTS(_t))) - -/*! Macro to calculate the storage size in bytes of - * a @ref ADI_SENSE_1000_LUT_2D_NES table */ -#define ADI_SENSE_1000_LUT_2D_NES_SIZE(_t) \ - (sizeof(_t) + (sizeof(float32_t) * ADI_SENSE_1000_LUT_2D_NES_NELEMENTS(_t))) - -/*! Macro to calculate the storage size in bytes of - * a @ref ADI_SENSE_1000_LUT_2D_POLYN_COEFF_LIST table */ -#define ADI_SENSE_1000_LUT_2D_POLYN_COEFF_LIST_SIZE(_t) \ - (sizeof(_t) + (sizeof(float64_t) * ADI_SENSE_1000_LUT_2D_POLYN_COEFF_LIST_NELEMENTS(_t))) - -/*! Look-Up Table descriptor */ -typedef union __attribute__((packed, aligned(4))) { - struct { - uint16_t geometry : 6; /**< ADI_SENSE_1000_LUT_GEOMETRY */ - uint16_t equation : 6; /**< ADI_SENSE_1000_LUT_EQUATION */ - uint16_t dir : 4; /**< ADI_SENSE_1000_LUT_TC_DIRECTION */ - uint16_t sensor : 12; /**< ADI_SENSE_1000_ADC_SENSOR_TYPE */ - uint16_t dataType : 4; /**< ADI_SENSE_1000_LUT_DATA_TYPE */ - uint16_t length; /**< Length (bytes) of table data section - (excl. this header) */ - uint16_t crc16; /**< CRC-16-CCITT of the data */ - }; - uint64_t value64; -} ADI_SENSE_1000_LUT_DESCRIPTOR; - -/*! Look-Up Table geometry-specific data structures */ -typedef union { - ADI_SENSE_1000_LUT_COEFF_LIST coeffList; - /**< Data format for tables with ADI_SENSE_1000_LUT_GEOMETRY_COEFFS geometry - * except where equation is ADI_SENSE_1000_LUT_EQUATION_BIVARIATE_POLYN */ - ADI_SENSE_1000_LUT_1D_ES lut1dEs; - /**< Data format for tables with ADI_SENSE_1000_LUT_GEOMETRY_ES_1D geometry */ - ADI_SENSE_1000_LUT_1D_NES lut1dNes; - /**< Data format for tables with ADI_SENSE_1000_LUT_GEOMETRY_NES_1D geometry */ - ADI_SENSE_1000_LUT_2D_ES lut2dEs; - /**< Data format for tables with ADI_SENSE_1000_LUT_GEOMETRY_ES_2D geometry */ - ADI_SENSE_1000_LUT_2D_NES lut2dNes; - /**< Data format for tables with ADI_SENSE_1000_LUT_GEOMETRY_NES_2D geometry */ - ADI_SENSE_1000_LUT_2D_POLYN_COEFF_LIST coeffList2d; - /**< Data format for tables with ADI_SENSE_1000_LUT_GEOMETRY_COEFFS geometry - * and ADI_SENSE_1000_LUT_EQUATION_BIVARIATE_POLYN equation */ -} ADI_SENSE_1000_LUT_TABLE_DATA; - -/*! Look-Up Table structure */ -typedef struct __attribute__((packed, aligned(4))) { - ADI_SENSE_1000_LUT_DESCRIPTOR descriptor; - /**< Look-Up Table descriptor */ - ADI_SENSE_1000_LUT_TABLE_DATA data; - /**< Look-Up Table data */ -} ADI_SENSE_1000_LUT_TABLE; - -/*! LUT data format versions */ -typedef struct __attribute__((packed, aligned(4))) { - uint8_t major; /*!< Major version number */ - uint8_t minor; /*!< Minor version number */ -} ADI_SENSE_1000_LUT_VERSION; - -/*! LUT data header structure */ -typedef struct __attribute__((packed, aligned(4))) { - uint32_t signature; - /**< Hard-coded signature value (@ref ADI_SENSE_LUT_SIGNATURE) */ - ADI_SENSE_1000_LUT_VERSION version; - /**< LUT data format version (@ref ADI_SENSE_LUT_VERSION) */ - uint16_t numTables; - /**< Total number of tables */ - uint32_t totalLength; - /**< Total length (in bytes) of all table descriptors and data - * (excluding this header) - * This, plus the header length, must not exceed ADI_SENSE_LUT_MAX_SIZE - */ -} ADI_SENSE_1000_LUT_HEADER; - -/*! LUT data top-level structure */ -typedef struct __attribute__((packed, aligned(4))) { - ADI_SENSE_1000_LUT_HEADER header; - /*!< LUT data top-level header structure */ - ADI_SENSE_1000_LUT_TABLE tables[]; - /*!< Variable-length array of one-or-more look-up table structures */ -} ADI_SENSE_1000_LUT; - -/*! Alternative top-level structure for raw LUT data representation - * - * @note This is intended to be used for encapsulating the storage of static - * LUT data declarations in C files. The rawTableData can be cast - * to the ADI_SENSE_LUT type for further parsing/processing. - */ -typedef struct __attribute__((packed, aligned(4))) { - ADI_SENSE_1000_LUT_HEADER header; - /*!< LUT data top-level header structure */ - uint8_t rawTableData[]; - /*!< Variable-length byte array of look-up tables in raw binary format */ -} ADI_SENSE_1000_LUT_RAW; - -#ifdef __cplusplus -} -#endif - -/*! - * @} - */ - -#endif /* __ADI_SENSE_1000_LUT_DATA_H__ */ -
--- a/inc/adi_sense_1000/adi_sense_1000_sensor_types.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1057 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: - * @brief: Sensor type definitions for ADSNS1000. - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_1000_SENSOR_TYPES_H__ -#define __ADI_SENSE_1000_SENSOR_TYPES_H__ - -/*! @addtogroup ADSNS1000_Api - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/*! ADSNS1000 measurement channel identifiers */ -typedef enum { - ADI_SENSE_1000_CHANNEL_ID_NONE = -1, - /*!< Used to indicate when no channel is selected (e.g. compensation channel) */ - - ADI_SENSE_1000_CHANNEL_ID_CJC_0 = 0, - /*!< Cold-Juction Compensation channel #0 */ - ADI_SENSE_1000_CHANNEL_ID_CJC_1, - /*!< Cold-Juction Compensation channel #1 */ - ADI_SENSE_1000_CHANNEL_ID_SENSOR_0, - /*!< Analog Sensor channel #0 */ - ADI_SENSE_1000_CHANNEL_ID_SENSOR_1, - /*!< Analog Sensor channel #1 */ - ADI_SENSE_1000_CHANNEL_ID_SENSOR_2, - /*!< Analog Sensor channel #2 */ - ADI_SENSE_1000_CHANNEL_ID_SENSOR_3, - /*!< Analog Sensor channel #3 */ - ADI_SENSE_1000_CHANNEL_ID_VOLTAGE_0, - /*!< Analog 0-10V Voltage Sensor channel #0 */ - ADI_SENSE_1000_CHANNEL_ID_CURRENT_0, - /*!< Analog 4-20mA Current Sensor channel #0 */ - ADI_SENSE_1000_CHANNEL_ID_I2C_0, - /*!< Digital I2C Sensor channel #0 */ - ADI_SENSE_1000_CHANNEL_ID_I2C_1, - /*!< Digital I2C Sensor channel #1 */ - ADI_SENSE_1000_CHANNEL_ID_SPI_0, - /*!< Digital SPI Sensor channel #0 */ - ADI_SENSE_1000_CHANNEL_ID_SPI_1, - /*!< Digital SPI Sensor channel #1 */ - ADI_SENSE_1000_CHANNEL_ID_SPI_2, - /*!< Digital SPI Sensor channel #2 */ - ADI_SENSE_1000_CHANNEL_ID_UART, - /*!< Digital UART Sensor channel #0 */ - - ADI_SENSE_1000_MAX_CHANNELS, - /*!< Maximum number of measurement channels on ADSNS1000 */ -} ADI_SENSE_1000_CHANNEL_ID; - -/*! ADSNS1000 analog sensor type options - * - * Select the sensor type that is connected to an ADC analog measurement - * channel. - * - * @note Some channels may only support a subset of the available sensor types - * below. - * - * @note The sensor type name may include a classification suffix: - * - _DEF_L1: pre-defined sensor using built-in linearisation data - * - _DEF_L2: pre-defined sensor using user-supplied linearisation data - * Where the suffix is absent, assume the _DEF_L1 classification above. - */ -typedef enum { - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1 = 0, - /*!< Standard T-type Thermocouple temperature sensor with default - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1 = 1, - /*!< Standard J-type Thermocouple temperature sensor with default - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1 = 2, - /*!< Standard K-type Thermocouple temperature sensor with default - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_1_DEF_L2 = 8, - /*!< Standard thermocouple temperature sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_2_DEF_L2 = 9, - /*!< Standard thermocouple temperature sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_3_DEF_L2 = 10, - /*!< Standard thermocouple temperature sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_4_DEF_L2 = 11, - /*!< Standard thermocouple temperature sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_T_ADV_L1 = 16, - /*!< T-type thermocouple temperature sensor with default linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_J_ADV_L1 = 17, - /*!< T-type thermocouple temperature sensor with default linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_K_ADV_L1 = 18, - /*!< T-type thermocouple temperature sensor with default linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_1_ADV_L2 = 24, - /*!< Thermocouple temperature sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_2_ADV_L2 = 25, - /*!< Thermocouple temperature sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_3_ADV_L2 = 26, - /*!< Thermocouple temperature sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_4_ADV_L2 = 27, - /*!< Thermocouple temperature sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1 = 32, - /*!< Standard 2-wire PT100 RTD temperature sensor with default - * linearisation and default configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT1000_DEF_L1 = 33, - /*!< Standard 2-wire PT1000 RTD temperature sensor with default - * linearisation and default configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_1_DEF_L2 = 40, - /*!< 2-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_2_DEF_L2 = 41, - /*!< 2-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_3_DEF_L2 = 42, - /*!< 2-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_4_DEF_L2 = 43, - /*!< 2-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_ADV_L1 = 48, - /*!< Standard 2-wire PT100 RTD temperature sensor with default - * linearisation and advanced configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT1000_ADV_L1 = 49, - /*!< Standard 2-wire PT1000 RTD temperature sensor with default - * linearisation and advanced configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_1_ADV_L2 = 56, - /*!< 2-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_2_ADV_L2 = 57, - /*!< 2-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_3_ADV_L2 = 58, - /*!< 2-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_4_ADV_L2 = 59, - /*!< 2-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Cold-Juction Compensation and Analog Sensor channels - * only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_PT100_DEF_L1 = 64, - /*!< Standard 3-wire PT100 RTD temperature sensor with default - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_PT1000_DEF_L1 = 65, - /*!< Standard 3-wire PT1000 RTD temperature sensor with default - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_1_DEF_L2 = 72, - /*!< 3-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_2_DEF_L2 = 73, - /*!< 3-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_3_DEF_L2 = 74, - /*!< 3-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_4_DEF_L2 = 75, - /*!< 3-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_PT100_ADV_L1 = 80, - /*!< Standard 3-wire PT100 RTD temperature sensor with default - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_PT1000_ADV_L1 = 81, - /*!< Standard 3-wire PT1000 RTD temperature sensor with default - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_1_ADV_L2 = 88, - /*!< 3-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_2_ADV_L2 = 89, - /*!< 3-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_3_ADV_L2 = 90, - /*!< 3-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_4_ADV_L2 = 91, - /*!< 3-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_PT100_DEF_L1 = 96, - /*!< Standard 4-wire PT100 RTD temperature sensor with default - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_PT1000_DEF_L1 = 97, - /*!< Standard 4-wire PT1000 RTD temperature sensor with default - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_1_DEF_L2 = 104, - /*!< 4-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_2_DEF_L2 = 105, - /*!< 4-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_3_DEF_L2 = 106, - /*!< 4-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_4_DEF_L2 = 107, - /*!< 4-wire RTD temperature sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_PT100_ADV_L1 = 112, - /*!< Standard 4-wire PT100 RTD temperature sensor with default - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_PT1000_ADV_L1 = 113, - /*!< Standard 4-wire PT1000 RTD temperature sensor with default - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_1_ADV_L2 = 120, - /*!< 4-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_2_ADV_L2 = 121, - /*!< 4-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_3_ADV_L2 = 122, - /*!< 4-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_4_ADV_L2 = 123, - /*!< 4-wire RTD temperature sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_A_10K_DEF_L1 = 128, - /*!< Standard 10kOhm NTC Thermistor temperature sensor with Steinhart–Hart - * linearisation equation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_B_10K_DEF_L1 = 129, - /*!< Standard 10kOhm NTC Thermistor temperature sensor with Beta - * linearisation equation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_1_DEF_L2 = 136, - /*!< Thermistor sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_2_DEF_L2 = 137, - /*!< Thermistor sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_3_DEF_L2 = 138, - /*!< Thermistor sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_4_DEF_L2 = 139, - /*!< Thermistor sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_A_10K_ADV_L1 = 144, - /*!< 10kOhm NTC Thermistor temperature sensor with Steinhart–Hart - * linearisation equation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_B_10K_ADV_L1 = 145, - /*!< 10kOhm NTC Thermistor temperature sensor with Beta - * linearisation equation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_1_ADV_L2 = 152, - /*!< Thermistor sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_2_ADV_L2 = 153, - /*!< Thermistor sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_3_ADV_L2 = 154, - /*!< Thermistor sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_4_ADV_L2 = 155, - /*!< Thermistor sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_1_DEF_L2 = 168, - /*!< Standard 4-wire Bridge Transducer sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_2_DEF_L2 = 169, - /*!< Standard 4-wire Bridge Transducer sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_3_DEF_L2 = 170, - /*!< Standard 4-wire Bridge Transducer sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_4_DEF_L2 = 171, - /*!< Standard 4-wire Bridge Transducer sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_1_ADV_L2 = 184, - /*!< Standard 4-wire Bridge Transducer sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_2_ADV_L2 = 185, - /*!< Standard 4-wire Bridge Transducer sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_3_ADV_L2 = 186, - /*!< Standard 4-wire Bridge Transducer sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_4_ADV_L2 = 187, - /*!< Standard 4-wire Bridge Transducer sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_1_DEF_L2 = 200, - /*!< Standard 6-wire Bridge Transducer sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_2_DEF_L2 = 201, - /*!< Standard 6-wire Bridge Transducer sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_3_DEF_L2 = 202, - /*!< Standard 6-wire Bridge Transducer sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_4_DEF_L2 = 203, - /*!< Standard 6-wire Bridge Transducer sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_1_ADV_L2 = 216, - /*!< Standard 6-wire Bridge Transducer sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_2_ADV_L2 = 217, - /*!< Standard 6-wire Bridge Transducer sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_3_ADV_L2 = 218, - /*!< Standard 6-wire Bridge Transducer sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_4_ADV_L2 = 219, - /*!< Standard 6-wire Bridge Transducer sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - * @note Bridge Excition Voltage must be selected as reference - */ - ADI_SENSE_1000_ADC_SENSOR_DIODE_2C_TYPEA_DEF_L1 = 224, - /*!< Standard Diode two current temperature sensor with default - * linearisation equation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_DIODE_3C_TYPEA_DEF_L1 = 225, - /*!< Standard Diode three current temperature sensor with default - * linearisation equation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_DIODE_2C_1_DEF_L2 = 232, - /*!< Standard Diode two current sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_DIODE_3C_1_DEF_L2 = 233, - /*!< Standard Diode three current sensor with user-defined linearisation and - * default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_DIODE_2C_TYPEA_ADV_L1 = 240, - /*!< Standard Diode two current temperature sensor with default - * linearisation equation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_DIODE_3C_TYPEA_ADV_L1 = 241, - /*!< Standard Diode three current sensor with default linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_DIODE_2C_1_ADV_L2 = 248, - /*!< Standard Diode two current sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_DIODE_3C_1_ADV_L2 = 249, - /*!< Standard Diode three current sensor with user-defined linearisation and - * advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_MICROPHONE_A_DEF_L1 = 256, - /*!< Generic microphone sensor without external amplifier, and with - * default linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_MICROPHONE_B_DEF_L1 = 257, - /*!< Generic microphone sensor with external amplifier and bias, and with - * default linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_MICROPHONE_1_DEF_L2 = 264, - /*!< Generic microphone sensor without external amplifier, and with - * user-defined linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_MICROPHONE_2_DEF_L2 = 265, - /*!< Generic microphone sensor with external amplifier and bias, and with - * user-defined linearisation and default configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_MICROPHONE_A_ADV_L1 = 272, - /*!< Generic microphone sensor without external amplifier, and with - * default linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_MICROPHONE_B_ADV_L1 = 273, - /*!< Generic microphone sensor with external amplifier and bias, and with - * default linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_MICROPHONE_1_ADV_L2 = 278, - /*!< Generic microphone sensor without external amplifier, and with - * user-defined linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_MICROPHONE_2_ADV_L2 = 279, - /*!< Generic microphone sensor with external amplifier and bias, and with - * user-defined linearisation and advanced configuration options - * - * @note For use with Analog Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_VOLTAGE = 512, - /*!< Generic voltage sensor with no linearisation applied - * - * @note For use with Analog 0-10V Voltage Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1 = 544, - /*!< Honeywell Pressure voltage sensor (HSCMRNN1.6BAAA3) with default - * linearisation and default configuration options - * - * @note For use with Analog 0-10V Voltage Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_B_DEF_L1 = 545, - /*!< Amphenol Pressure voltage sensor (NPA-300B-015A) with default - * linearisation and default configuration options - * - * @note For use with Analog 0-10V Voltage Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_1_DEF_L2 = 552, - /*!< Generic pressure voltage sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog 0-10V Voltage Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_2_DEF_L2 = 553, - /*!< Generic pressure voltage sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog 0-10V Voltage Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_A_ADV_L1 = 560, - /*!< Honeywell Pressure voltage sensor (HSCMRNN1.6BAAA3) with default - * linearisation and advanced configuration options - * - * @note For use with Analog 0-10V Voltage Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_B_ADV_L1 = 561, - /*!< Amphenol Pressure voltage sensor (NPA-300B-015A) with default - * linearisation and advanced configuration options - * - * @note For use with Analog 0-10V Voltage Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_1_ADV_L2 = 568, - /*!< Generic pressure voltage sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog 0-10V Voltage Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_2_ADV_L2 = 569, - /*!< Generic pressure voltage sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog 0-10V Voltage Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_CURRENT = 768, - /*!< Generic current sensor with no linearisation applied - * - * @note For use with Analog 4-20mA Current Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1 = 800, - /*!< Honeywell Pressure current sensor (PX2CN2XX100PACH) with default - * linearisation and default configuration options - * - * @note For use with Analog 4-20mA Current Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_1_DEF_L2 = 808, - /*!< Generic pressure current sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog 4-20mA Current Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_2_DEF_L2 = 809, - /*!< Generic pressure current sensor with user-defined - * linearisation and default configuration options - * - * @note For use with Analog 4-20mA Current Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_A_ADV_L1 = 816, - /*!< Honeywell Pressure current sensor (PX2CN2XX100PACH) with default - * linearisation and advanced configuration options - * - * @note For use with Analog 4-20mA Current Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_1_ADV_L2 = 824, - /*!< Generic pressure current sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog 4-20mA Current Sensor channels only - */ - ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_2_ADV_L2 = 825, - /*!< Generic pressure current sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with Analog 4-20mA Current Sensor channels only - */ -} ADI_SENSE_1000_ADC_SENSOR_TYPE; - -/*! ADSNS1000 I2C digital sensor type options - * - * Select the sensor type that is connected to an I2C digital measurement - * channel. - * - * @note These are pre-defined sensors using built-in linearisation data - */ -typedef enum { - ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_DEF_L1 = 2112, - /*!< Honeywell HiH9000-series humidity sensor with default linearisation - * and default configuration options - * - * @note For use with I2C Digital Sensor channels only - */ - ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_B_DEF_L1 = 2113, - /*!< Sensirion SHT35-DIS-B humidity sensor with default linearisation - * and default configuration options - * - * @note For use with I2C Digital Sensor channels only - */ - ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_DEF_L2 = 2120, - /*!< Honeywell HiH9000-series humidity sensor with user-defined linearisation - * and default configuration options - * - * @note For use with I2C Digital Sensor channels only - */ - ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_B_DEF_L2 = 2121, - /*!< Sensirion SHT35-DIS-B humidity sensor with user-defined linearisation - * and default configuration options - * - * @note For use with I2C Digital Sensor channels only - */ - ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_ADV_L1 = 2128, - /*!< Honeywell HiH9000-series humidity sensor with default linearisation - * and advanced configuration options - * - * @note For use with I2C Digital Sensor channels only - */ - ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_B_ADV_L1 = 2129, - /*!< Sensirion SHT35-DIS-B humidity sensor with default linearisation - * and advanced configuration options - * - * @note For use with I2C Digital Sensor channels only - */ - ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_ADV_L2 = 2136, - /*!< Honeywell HiH9000-series humidity sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with I2C Digital Sensor channels only - */ - ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_B_ADV_L2 = 2137, - /*!< Sensirion SHT35-DIS-B humidity sensor with user-defined linearisation - * and advanced configuration options - * - * @note For use with I2C Digital Sensor channels only - */ - ADI_SENSE_1000_I2C_SENSOR_AMBIENTLIGHT_A_DEF_L1 = 2176, - /*!< ON-Semiconductor NOA1305 ambient light sensor with default - * linearisation and default configuration options - * - * @note For use with I2C Digital Sensor channels only - */ - ADI_SENSE_1000_I2C_SENSOR_AMBIENTLIGHT_A_DEF_L2 = 2184, - /*!< ON-Semiconductor NOA1305 ambient light sensor with user-defined - * linearisation and default configuration options - * - * @note For use with I2C Digital Sensor channels only - */ - ADI_SENSE_1000_I2C_SENSOR_AMBIENTLIGHT_A_ADV_L1 = 2192, - /*!< ON-Semiconductor NOA1305 ambient light sensor with default - * linearisation and advanced configuration options - * - * @note For use with I2C Digital Sensor channels only - */ - ADI_SENSE_1000_I2C_SENSOR_AMBIENTLIGHT_A_ADV_L2 = 2200, - /*!< ON-Semiconductor NOA1305 ambient light sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with I2C Digital Sensor channels only - */ -} ADI_SENSE_1000_I2C_SENSOR_TYPE; - -/*! ADSNS1000 SPI digital sensor type options - * - * Select the sensor type that is connected to an SPI digital measurement - * channel. - * - * @note These are pre-defined sensors using built-in linearisation data - */ -typedef enum { - ADI_SENSE_1000_SPI_SENSOR_PRESSURE_A_DEF_L1 = 3072, - /*!< Honeywell HSCDRNN1.6BASA3 pressure sensor with default linearisation - * and default configuration options - * - * @note For use with SPI Digital Sensor channels only - */ - ADI_SENSE_1000_SPI_SENSOR_PRESSURE_A_DEF_L2 = 3080, - /*!< Honeywell HSCDRNN1.6BASA3 pressure sensor with user-defined - * linearisation and default configuration options - * - * @note For use with SPI Digital Sensor channels only - */ - ADI_SENSE_1000_SPI_SENSOR_PRESSURE_A_ADV_L1 = 3088, - /*!< Honeywell HSCDRNN1.6BASA3 pressure sensor with default linearisation - * and advanced configuration options - * - * @note For use with SPI Digital Sensor channels only - */ - ADI_SENSE_1000_SPI_SENSOR_PRESSURE_A_ADV_L2 = 3096, - /*!< Honeywell HSCDRNN1.6BASA3 pressure sensor with user-defined - * linearisation and advanced configuration options - * - * @note For use with SPI Digital Sensor channels only - */ - ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_DEF_L1 = 3200, - /*!< Analog Devices ADxL362 3-axis accelerometer sensor with default - * linearisation and default configuration options(*) - * - * @note For use with SPI Digital Sensor channels only - * - * @note This sensor requires the use of 3 SPI Digital Sensor channels, with - * the sensor measurements from the X/Y/Z axes each output on a - * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) - */ - ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_B_DEF_L1 = 3201, - /*!< Analog Devices ADxL355 3-axis accelerometer sensor with default - * linearisation and default configuration options(*) - * - * @note For use with SPI Digital Sensor channels only - * - * @note This sensor requires the use of 3 SPI Digital Sensor channels, with - * the sensor measurements from the X/Y/Z axes each output on a - * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) - */ - ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_DEF_L2 = 3208, - /*!< Analog Devices ADxL362 3-axis accelerometer sensor with user-defined - * linearisation and default configuration options(*) - * - * @note For use with SPI Digital Sensor channels only - * - * @note This sensor requires the use of 3 SPI Digital Sensor channels, with - * the sensor measurements from the X/Y/Z axes each output on a - * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) - */ - ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_B_DEF_L2 = 3209, - /*!< Analog Devices ADxL355 3-axis accelerometer sensor with user-defined - * linearisation and default configuration options(*) - * - * @note For use with SPI Digital Sensor channels only - * - * @note This sensor requires the use of 3 SPI Digital Sensor channels, with - * the sensor measurements from the X/Y/Z axes each output on a - * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) - */ - ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_ADV_L1 = 3216, - /*!< Analog Devices ADxL362 3-axis accelerometer sensor with default - * linearisation and advanced configuration options(*) - * - * @note For use with SPI Digital Sensor channels only - * - * @note This sensor requires the use of 3 SPI Digital Sensor channels, with - * the sensor measurements from the X/Y/Z axes each output on a - * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) - */ - ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_B_ADV_L1 = 3217, - /*!< Analog Devices ADxL355 3-axis accelerometer sensor with default - * linearisation and advanced configuration options(*) - * - * @note For use with SPI Digital Sensor channels only - * - * @note This sensor requires the use of 3 SPI Digital Sensor channels, with - * the sensor measurements from the X/Y/Z axes each output on a - * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) - */ - ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_ADV_L2 = 3224, - /*!< Analog Devices ADxL362 3-axis accelerometer sensor with user-defined - * linearisation and advanced configuration options(*) - * - * @note For use with SPI Digital Sensor channels only - * - * @note This sensor requires the use of 3 SPI Digital Sensor channels, with - * the sensor measurements from the X/Y/Z axes each output on a - * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) - */ - ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_B_ADV_L2 = 3225, - /*!< Analog Devices ADxL355 3-axis accelerometer sensor with user-defined - * linearisation and advanced configuration options(*) - * - * @note For use with SPI Digital Sensor channels only - * - * @note This sensor requires the use of 3 SPI Digital Sensor channels, with - * the sensor measurements from the X/Y/Z axes each output on a - * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) - */ -} ADI_SENSE_1000_SPI_SENSOR_TYPE; - -/*! ADSNS1000 UART digital sensor type options - * - * Select the sensor type that is connected to an UART digital measurement - * channel. - * - * @note These are pre-defined sensors using built-in linearisation data - */ -typedef enum { - ADI_SENSE_1000_UART_SENSOR_UART_CO2_A_DEF_L1 = 3584, - /*!< COZIR AMB 2,000 ppm CO2 Sensor with default linearisation - * and default configuration options - * - * @note For use with UART Digital Sensor channels only - */ - ADI_SENSE_1000_UART_SENSOR_UART_CO2_B_DEF_L1 = 3585, - /*!< COZIR LP Miniature 5,000ppm CO2 Sensor with default linearisation - * and default configuration options - * - * @note For use with UART Digital Sensor channels only - */ - ADI_SENSE_1000_UART_SENSOR_UART_CO2_A_DEF_L2 = 3592, - /*!< COZIR AMB 2,000 ppm CO2 Sensor with user-defined linearisation - * and default configuration options - * - * @note For use with UART Digital Sensor channels only - */ - ADI_SENSE_1000_UART_SENSOR_UART_CO2_B_DEF_L2 = 3593, - /*!< COZIR LP Miniature 5,000ppm CO2 Sensor with user-defined linearisation - * and default configuration options - * - * @note For use with UART Digital Sensor channels only - */ - ADI_SENSE_1000_UART_SENSOR_UART_CO2_A_ADV_L1 = 3600, - /*!< COZIR AMB 2,000 ppm CO2 Sensor with default linearisation - * and advanced configuration options - * - * @note For use with UART Digital Sensor channels only - */ - ADI_SENSE_1000_UART_SENSOR_UART_CO2_B_ADV_L1 = 3601, - /*!< COZIR LP Miniature 5,000ppm CO2 Sensor with default linearisation - * and advanced configuration options - * - * @note For use with UART Digital Sensor channels only - */ - ADI_SENSE_1000_UART_SENSOR_UART_CO2_A_ADV_L2 = 3608, - /*!< COZIR AMB 2,000 ppm CO2 Sensor with user-defined linearisation - * and advanced configuration options - * - * @note For use with UART Digital Sensor channels only - */ - ADI_SENSE_1000_UART_SENSOR_UART_CO2_B_ADV_L2 = 3609, - /*!< COZIR LP Miniature 5,000ppm CO2 Sensor with user-defined linearisation - * and advanced configuration options - * - * @note For use with UART Digital Sensor channels only - */ -} ADI_SENSE_1000_UART_SENSOR_TYPE; - -#ifdef __cplusplus -} -#endif - -/*! - * @} - */ - -#endif /* __ADI_SENSE_1000_SENSOR_TYPES_H__ */ -
--- a/inc/adi_sense_api.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,701 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: adi_sense_api.h - * @brief: ADISENSE Host Library Application Programming Interface (API) - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_API_H__ -#define __ADI_SENSE_API_H__ - -#include "inc/adi_sense_types.h" -#include "inc/adi_sense_config_types.h" -#include "inc/adi_sense_platform.h" -#include "inc/adi_sense_gpio.h" -#include "inc/adi_sense_spi.h" -#include "inc/adi_sense_log.h" -#include "inc/adi_sense_time.h" - -/*! @defgroup ADISENSE_Api ADISENSE Host Library API - * Host library API common to the ADISENSE product family. - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/*! The maximum number of channels supported by this API - * @note Specific ADISENSE products may implement a lower number of channels */ -#define ADI_SENSE_MAX_CHANNELS 16 - -/*! A handle used in all API functions to identify the ADISENSE device. */ -typedef void* ADI_SENSE_DEVICE_HANDLE; - -/*! Supported connection types for communication with the ADISENSE device. */ -typedef enum { - ADI_SENSE_CONNECTION_TYPE_SPI = 1, - /*!< Serial Peripheral Interface (SPI) connection type */ -} ADI_SENSE_CONNECTION_TYPE; - -/*! Connection details for communication with a ADISENSE device instance. */ -typedef struct { - ADI_SENSE_CONNECTION_TYPE type; - /*!< Connection type selection */ - ADI_SENSE_PLATFORM_SPI_CONFIG spi; - /*!< SPI connection parameters, required if SPI connection type is used */ - ADI_SENSE_PLATFORM_GPIO_CONFIG gpio; - /*!< GPIO connection parameters, for device reset and status I/O signals */ - ADI_SENSE_PLATFORM_LOG_CONFIG log; - /*!< Log interface connection parameters, for display/routing of log messages */ -} ADI_SENSE_CONNECTION; - -/*! Bit masks (flags) for the different device status indicators. */ -typedef enum { - ADI_SENSE_DEVICE_STATUS_BUSY = (1 << 0), - /*!< Indicates that a command is currently running on the device */ - ADI_SENSE_DEVICE_STATUS_DATAREADY = (1 << 1), - /*!< Indicates the availability of measurement data for retrieval */ - ADI_SENSE_DEVICE_STATUS_ERROR = (1 << 2), - /*!< Indicates that an error condition has been detected by the device */ - ADI_SENSE_DEVICE_STATUS_ALERT = (1 << 3), - /*!< Indicates that an alert condition has been detected by the device */ - ADI_SENSE_DEVICE_STATUS_FIFO_ERROR = (1 << 4), - /*!< Indicates that a FIFO error condition has been detected by the device */ - ADI_SENSE_DEVICE_STATUS_CONFIG_ERROR = (1 << 5), - /*!< Indicates that a configuration error condition has been detected by the device */ - ADI_SENSE_DEVICE_STATUS_LUT_ERROR = (1 << 6), - /*!< Indicates that a look-up table error condition has been detected by the device */ - ADI_SENSE_DEVICE_STATUS_EXT_FLASH_ERROR = (1 << 7), - /*!< Indicates that an external flash memory error condition has been detected by the device */ -} ADI_SENSE_DEVICE_STATUS_FLAGS; - -/*! Bit masks (flags) for the different diagnostics status indicators. */ -typedef enum { - ADI_SENSE_DIAGNOSTICS_STATUS_CHECKSUM_ERROR = (1 << 0), - /*!< Indicates Error on Internal Checksum Calculations */ - ADI_SENSE_DIAGNOSTICS_STATUS_COMMS_ERROR = (1 << 1), - /*!< Indicates Error on Internal Device Communications */ - ADI_SENSE_DIAGNOSTICS_STATUS_SUPPLY_MONITOR_ERROR = (1 << 2), - /*!< Indicates Low Voltage on Internal Supply Voltages */ - ADI_SENSE_DIAGNOSTICS_STATUS_SUPPLY_CAP_ERROR = (1 << 3), - /*!< Indicates Fault on Internal Supply Regulator Capacitor */ - ADI_SENSE_DIAGNOSTICS_STATUS_CONVERSION_ERROR = (1 << 8), - /*!< Indicates Error During Internal ADC Conversions */ - ADI_SENSE_DIAGNOSTICS_STATUS_CALIBRATION_ERROR = (1 << 9), - /*!< Indicates Error During Internal Device Calibrations */ -} ADI_SENSE_DIAGNOSTICS_STATUS_FLAGS; - -/*! Bit masks (flags) for the different channel alert indicators. */ -typedef enum { - ADI_SENSE_CHANNEL_ALERT_TIMEOUT = (1 << 0), - /*!< Indicates timeout condition detected on the channel */ - ADI_SENSE_CHANNEL_ALERT_UNDER_RANGE = (1 << 1), - /*!< Indicates raw sample under valid input range, possibly clamped */ - ADI_SENSE_CHANNEL_ALERT_OVER_RANGE = (1 << 2), - /*!< Indicates raw sample over valid input range, possibly clamped */ - ADI_SENSE_CHANNEL_ALERT_LOW_LIMIT = (1 << 3), - /*!< Indicates measurement result was below configured minimum threshold */ - ADI_SENSE_CHANNEL_ALERT_HIGH_LIMIT = (1 << 4), - /*!< Indicates measurement result was above configured maximum threshold */ - ADI_SENSE_CHANNEL_ALERT_SENSOR_OPEN = (1 << 5), - /*!< Indicates open circuit or mis-wire condition detected on the channel */ - ADI_SENSE_CHANNEL_ALERT_REF_DETECT = (1 << 6), - /*!< Indicates reference-detect error condition detected on the channel */ - ADI_SENSE_CHANNEL_ALERT_CONFIG_ERR = (1 << 7), - /*!< Indicates configuration error condition detected on the channel */ - ADI_SENSE_CHANNEL_ALERT_LUT_ERR = (1 << 8), - /*!< Indicates look-up table error condition detected on the channel */ - ADI_SENSE_CHANNEL_ALERT_SENSOR_NOT_READY = (1 << 9), - /*!< Indicates digital sensor not-ready error condition detected on the channel */ - ADI_SENSE_CHANNEL_ALERT_COMP_NOT_READY = (1 << 10), - /*!< Indicates compensation channel not-ready error condition detected on the channel */ - ADI_SENSE_CHANNEL_ALERT_LUT_UNDER_RANGE = (1 << 13), - /*!< Indicates raw sample was under the available LUT/equation range */ - ADI_SENSE_CHANNEL_ALERT_LUT_OVER_RANGE = (1 << 14), - /*!< Indicates raw sample was over the available LUT/equation range */ -} ADI_SENSE_CHANNEL_ALERT_FLAGS; - -/*! Status details retreived from the ADISENSE device. */ -typedef struct { - ADI_SENSE_DEVICE_STATUS_FLAGS deviceStatus; - /*!< General summary status information from the device */ - ADI_SENSE_DIAGNOSTICS_STATUS_FLAGS diagnosticsStatus; - /*!< Diagnostic error status information from the device */ - ADI_SENSE_CHANNEL_ALERT_FLAGS channelAlerts[ADI_SENSE_MAX_CHANNELS]; - /*!< Per-channel alert status information from the device */ - uint32_t errorCode; - /*!< Code identifying the last error signalled by the device */ - uint32_t alertCode; - /*!< Code identifying the last alert signalled by the device */ - uint32_t debugCode; - /*!< Supplementary code related to the last error/alert */ - uint32_t channelAlertCodes[ADI_SENSE_MAX_CHANNELS]; - /*!< Per-channel code identifying the last alert signalled for each channel */ -} ADI_SENSE_STATUS; - -/*! Data sample details retreived from the ADISENSE device. */ -typedef struct { - ADI_SENSE_DEVICE_STATUS_FLAGS status; - /*!< Device summary status snapshot when the sample was recorded */ - uint32_t channelId; - /*!< The measurement channel from which this sample was obtained */ - int32_t rawValue; - /*!< The raw (unprocessed) value obtained directly from the measurement - * channel, if available - */ - float32_t processedValue; - /*!< The processed value obtained from the measurement channel, as a final - * measurement value, following calibration and linearisation correction, - * and conversion into an appropriate unit of measurement. - */ -} ADI_SENSE_DATA_SAMPLE; - -/*! Measurement mode options for the ADISENSE device. - * @ref adi_sense_StartMeasurement - */ -typedef enum { - ADI_SENSE_MEASUREMENT_MODE_HEALTHCHECK = 1, - /*!< In this mode, a special health-check measurement cycle is executed, - * carrying out a single conversion per channel with measurement - * diagnostics enabled, intended for use as a system health check. */ - ADI_SENSE_MEASUREMENT_MODE_NORMAL, - /*!< In this mode, normal measurement cycle(s) are executed and data samples - * are returned with raw measurement values included. */ - ADI_SENSE_MEASUREMENT_MODE_OMIT_RAW, - /*!< In this mode, normal measurement cycle(s) are executed and data samples - * are returned with raw measurement values omitted for efficiency. */ - ADI_SENSE_MEASUREMENT_MODE_FFT, - /*!< In this mode, FFT mode measurement cycle(s) are executed and data - * samples are returned based on FFT-specific configuration parameters. */ -} ADI_SENSE_MEASUREMENT_MODE; - -/*! Identifiers for the user configuration slots in persistent memory. */ -typedef enum { - ADI_SENSE_FLASH_CONFIG_1, - ADI_SENSE_FLASH_CONFIG_2, - ADI_SENSE_FLASH_CONFIG_3, - ADI_SENSE_FLASH_CONFIG_4, -} ADI_SENSE_USER_CONFIG_SLOT; - - -/****************************************************************************** - * ADISENSE High-Level API function prototypes - *****************************************************************************/ - -/*! - * @brief Open ADISENSE device handle and set up communication interface. - * - * @param[in] nDeviceIndex Zero-based index number identifying this device - * instance. Note that this will be used to - * retrieve a specific device configuration for - * this device (see @ref adi_sense_SetConfig - * and @ref ADI_SENSE_CONFIG) - * @param[in] pConnectionInfo Host-specific connection details (e.g. SPI, GPIO) - * @param[out] phDevice Pointer to return an ADISENSE device handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - #ADI_SENSE_NO_MEM Failed to allocate memory resources. - * - #ADI_SENSE_INVALID_DEVICE_NUM Invalid device index specified - * - * @details Configure and initialise the Log interface and the SPI/GPIO - * communication interface to the ADISense module. - */ -ADI_SENSE_RESULT adi_sense_Open( - unsigned const nDeviceIndex, - ADI_SENSE_CONNECTION * const pConnectionInfo, - ADI_SENSE_DEVICE_HANDLE * const phDevice); - -/*! - * @brief Close ADISENSE device context and free resources. - * - * @param[in] hDevice ADISENSE device context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - */ -ADI_SENSE_RESULT adi_sense_Close( - ADI_SENSE_DEVICE_HANDLE const hDevice); - -/*! - * @brief Get the current state of the specified GPIO input signal. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] ePinId GPIO pin to query - * @param[out] pbAsserted Pointer to return the state of the status signal GPIO pin - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - #ADI_SENSE_INVALID_DEVICE_NUM Invalid GPIO pin specified. - * - * @details Sets *pbAsserted to true if the status signal is asserted, or false - * otherwise. - */ -ADI_SENSE_RESULT adi_sense_GetGpioState( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_GPIO_PIN const ePinId, - bool * const pbAsserted); - -/*! - * @brief Register an application-defined callback function for GPIO interrupts - * - * @param[in] hDevice ADISENSE context handle (@ref adi_sense_Open) - * @param[in] ePinId GPIO pin on which to enable/disable interrupts - * @param[in] callbackFunction Function to be called when an interrupt occurs. - * Specify NULL here to disable interrupts. - * @param[in] pCallbackParam Optional opaque parameter passed to the callback - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - #ADI_SENSE_INVALID_DEVICE_NUM Invalid GPIO pin specified. - */ -ADI_SENSE_RESULT adi_sense_RegisterGpioCallback( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_GPIO_PIN const ePinId, - ADI_SENSE_GPIO_CALLBACK const callbackFunction, - void * const pCallbackParam); - -/*! - * @brief Trigger a shut down of the device. - * - * @param[in] hDevice ADISENSE device context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Instructs the ADISENSE device to initiate a shut down, - * typically used to conserve power when the device is not - * in use. The device may be restarted by calling - * @ref adi_sense_Reset(). Note that active configuration - * settings are not preserved during shutdown and must be - * reloaded after the device has become ready again. - * - * @note No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_Shutdown( - ADI_SENSE_DEVICE_HANDLE const hDevice); - -/*! - * @brief Reset the ADISENSE device. - * - * @param[in] hDevice ADISENSE device context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Trigger a hardware-reset of the ADISENSE device. - * - * @note The device may require several seconds before it is ready for use - * again. @ref adi_sense_GetDeviceReadyState may be used to check if - * the device is ready. - */ -ADI_SENSE_RESULT adi_sense_Reset( - ADI_SENSE_DEVICE_HANDLE const hDevice); - -/*! - * @brief Check if the device is ready, following power-up or a reset. - * - * @param[in] hDevice ADISENSE device context handle - * @param[out] pbReady Pointer to return true if the device is ready, or false - * otherwise - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details This function attempts to read a fixed-value device register via - * the communication interface. - */ -ADI_SENSE_RESULT adi_sense_GetDeviceReadyState( - ADI_SENSE_DEVICE_HANDLE const hDevice, - bool * const pbReady); - -/*! - * @brief Obtain the product ID from the device. - * - * @param[in] hDevice ADISENSE device context handle - * @param[out] pProductId Pointer to return the product ID value - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Reads the product ID registers on the device and returns the value. - */ -ADI_SENSE_RESULT adi_sense_GetProductID( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_PRODUCT_ID * const pProductId); - -/*! - * @brief Write full configuration settings to the device registers. - * - * @param[in] hDevice ADISENSE device context handle - * @param[out] pConfig Pointer to the configuration data structure - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Translates configuration details provided into device-specific - * register settings and updates device configuration registers. - * - * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called - */ -ADI_SENSE_RESULT adi_sense_SetConfig( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_CONFIG * const pConfig); - -/*! - * @brief Apply the configuration settings currently stored in device registers - * - * @param[in] hDevice ADISENSE device context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Instructs the ADISENSE device to reload and apply configuration - * from the device configuration registers. Changes to configuration - * registers are ignored by the device until this function is called. - * - * @note No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_ApplyConfigUpdates( - ADI_SENSE_DEVICE_HANDLE const hDevice); - -/*! - * @brief Store the configuration settings to persistent memory on the device. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] eSlotId User configuration slot in persistent memory - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Instructs the ADISENSE device to save the current contents of its - * device configuration registers to non-volatile memory. - * - * @note No other command must be running when this is called. - * @note Do not power down the device while this command is running. - */ -ADI_SENSE_RESULT adi_sense_SaveConfig( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_USER_CONFIG_SLOT const eSlotId); - -/*! - * @brief Restore configuration settings from persistent memory on the device. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] eSlotId User configuration slot in persistent memory - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Instructs the ADISENSE device to restore the contents of its - * device configuration registers from non-volatile memory. - * - * @note No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_RestoreConfig( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_USER_CONFIG_SLOT const eSlotId); - -/*! - * @brief Erases the external flash memory. - * - * @param[in] hDevice ADISENSE device context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Sends the bulk erase instruction to the external flash - * device. All stored samples are deleted. - * It is a blocking operation and takes tens of seconds to - * complete. - * - * @note No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_EraseExternalFlash( - ADI_SENSE_DEVICE_HANDLE const hDevice); - -/*! - * @brief Gets the number of samples stored in the external flash - * memory. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] pSampleCount Address of the return value. - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @note No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_GetExternalFlashSampleCount( - ADI_SENSE_DEVICE_HANDLE const hDevice, - uint32_t * nSampleCount); - -// DEBUG - TO BE DELETED -ADI_SENSE_RESULT adi_sense_SetExternalFlashIndex( - ADI_SENSE_DEVICE_HANDLE const hDevice, - uint32_t nStartIndex); - -/*! - * @brief Read measurement samples stored in the the external flash memory. - * - * @param[in] hDevice ADISENSE device context handle - * @param[out] pSamples Pointer to return a set of requested data - * samples. - * @param[in] nStartIndex Index of first sample to retrieve. - * @param[in] nBytesPerSample The size, in bytes, of each sample. - * @param[in] nRequested Number of requested data samples. - * @param[out] pnReturned Number of valid data samples successfully - * retrieved. - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Reads the status registers and extracts the relevant information - * to return to the caller. - * - */ -ADI_SENSE_RESULT adi_sense_GetExternalFlashData( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_DATA_SAMPLE * const pSamples, - uint32_t const nIndex, - uint32_t const nRequested, - uint32_t * const pnReturned); - -/*! - * @brief Store the LUT data to persistent memory on the device. - * - * @param[in] hDevice ADISENSE device context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Instructs the ADISENSE device to save the current contents of its - * LUT data buffer, set using @ref adi_sense_SetLutData, to - * non-volatile memory. - * - * @note No other command must be running when this is called. - * @note Do not power down the device while this command is running. - */ -ADI_SENSE_RESULT adi_sense_SaveLutData( - ADI_SENSE_DEVICE_HANDLE const hDevice); - -/*! - * @brief Restore LUT data from persistent memory on the device. - * - * @param[in] hDevice ADISENSE device context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Instructs the ADISENSE device to restore the contents of its - * LUT data, previously stored with @ref adi_sense_SaveLutData, from - * non-volatile memory. - * - * @note No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_RestoreLutData( - ADI_SENSE_DEVICE_HANDLE const hDevice); - -/*! - * @brief Start the measurement cycles on the device. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] eMeasurementMode Allows a choice of special modes for the - * measurement. See @ref ADI_SENSE_MEASUREMENT_MODE - * for further information. - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Instructs the ADISENSE device to start executing measurement cycles - * according to the current applied configuration settings. The - * DATAREADY status signal will be asserted whenever new measurement - * data is published, according to selected settings. - * Measurement cycles may be stopped by calling @ref - * adi_sense_StopMeasurement. - * - * @note No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_StartMeasurement( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_MEASUREMENT_MODE const eMeasurementMode); - -/*! - * @brief Stop the measurement cycles on the device. - * - * @param[in] hDevice ADISENSE device context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Instructs the ADISENSE device to stop executing measurement cycles. - * The command may be delayed until the current conversion, if any, has - * been completed and published. - * - * @note To be used only if a measurement command is currently running. - */ -ADI_SENSE_RESULT adi_sense_StopMeasurement( - ADI_SENSE_DEVICE_HANDLE const hDevice); - -/*! - * @brief Run built-in diagnostic checks on the device. - * - * @param[in] hDevice ADISENSE device context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Instructs the ADISENSE device to execute its built-in diagnostic - * tests, on any enabled measurement channels, according to the current - * applied configuration settings. Device status registers will be - * updated to indicate if any errors were detected by the diagnostics. - * - * @note No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_RunDiagnostics( - ADI_SENSE_DEVICE_HANDLE const hDevice); - -/*! - * @brief Run built-in calibration on the device. - * - * @param[in] hDevice ADISENSE device context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Instructs the ADISENSE device to execute its self-calibration - * routines, on any enabled measurement channels, according to the - * current applied configuration settings. Device status registers - * will be updated to indicate if any errors were detected. - * - * @note No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_RunCalibration( - ADI_SENSE_DEVICE_HANDLE const hDevice); - -/*! - * @brief Run built-in digital calibration on the device. - * - * @param[in] hDevice ADISENSE device context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Instructs the ADISENSE device to execute its calibration - * routines, on any enabled digital channels, according to the - * current applied configuration settings. Device status registers - * will be updated to indicate if any errors were detected. - * - * @note No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_RunDigitalCalibration( - ADI_SENSE_DEVICE_HANDLE const hDevice); - -/*! - * @brief Read the current status from the device registers. - * - * @param[in] hDevice ADISENSE device context handle - * @param[out] pStatus Pointer to return the status summary obtained from the - * device. - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Reads the status registers and extracts the relevant information - * to return to the caller. - * - * @note This may be called at any time, assuming the device is ready. - */ -ADI_SENSE_RESULT adi_sense_GetStatus( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_STATUS * const pStatus); - -/*! - * @brief Read measurement data samples from the device registers. - * - * @param[in] hDevice ADISENSE device context handle - * @param[in] eMeasurementMode Must be set to the same value used for @ref - * adi_sense_StartMeasurement(). - * @param[out] pSamples Pointer to return a set of requested data samples. - * @param[in] nBytesPerSample The size, in bytes, of each sample. - * @param[in] nRequested Number of requested data samples. - * @param[out] pnReturned Number of valid data samples successfully retrieved. - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Reads the status registers and extracts the relevant information - * to return to the caller. - * - * @note This is intended to be called only when the DATAREADY status signal - * is asserted. - */ -ADI_SENSE_RESULT adi_sense_GetData( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_MEASUREMENT_MODE const eMeasurementMode, - ADI_SENSE_DATA_SAMPLE * const pSamples, - uint8_t const nBytesPerSample, - uint32_t const nRequested, - uint32_t * const pnReturned); - -/*! - * @brief Check if a command is currently running on the device. - * - * @param[in] hDevice ADISENSE device context handle - * @param[out] pbCommandRunning Pointer to return the command running status - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - * @details Reads the device status register to check if a command is running. - */ -ADI_SENSE_RESULT adi_sense_GetCommandRunningState( - ADI_SENSE_DEVICE_HANDLE hDevice, - bool *pbCommandRunning); - -#ifdef __cplusplus -} -#endif - -/*! - * @} - */ - -#endif /* __ADI_SENSE_API_H__ */ -
--- a/inc/adi_sense_config_types.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -/* -Copyright (c) 2017 Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - Modified versions of the software must be conspicuously marked as such. - - This software is licensed solely and exclusively for use with processors - manufactured by or for Analog Devices, Inc. - - This software may not be combined or merged with other code in any manner - that would cause the software to become subject to terms and conditions - which differ from those listed here. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights of one - or more patent holders. This license does not release you from the - requirement that you obtain separate licenses from these patent holders - to use this software. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL -PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: adi_sense_config_types.h - * @brief: Type definitions for ADISENSE API. - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_CONFIG_TYPES_H__ -#define __ADI_SENSE_CONFIG_TYPES_H__ - -#include "adi_sense_platform.h" -#include "adi_sense_1000/adi_sense_1000_config.h" - -/*! @addtogroup ADISENSE_Api ADISENSE Host Library API - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/*! A list of supported product identifiers */ -typedef enum { - ADI_SENSE_PRODUCT_ID_ADSNS1000 = 0x0020, - /*!< ADSNS1000 */ -} ADI_SENSE_PRODUCT_ID; - -/*! ADISENSE Configuration schema version */ -typedef struct { - uint8_t major; /*!< Major version number */ - uint8_t minor; /*!< Minor version number */ -} ADI_SENSE_CONFIG_VERSION_ID; - -/*! ADISENSE UUID string length */ -#define ADI_SENSE_UUID_LEN 36 - -/*! ADISENSE global configuration details */ -typedef struct { - const char configUuid[ADI_SENSE_UUID_LEN]; - /*!< Optional unique identifier for this configuration */ - ADI_SENSE_CONFIG_VERSION_ID versionId; - /*!< Identifies the schema version for this configuration */ - ADI_SENSE_PRODUCT_ID productId; - /*!< Identify the product type for which this configuration is valid */ - union - { - ADI_SENSE_1000_CONFIG adisense1000; - /*!< ADSNS1000 product configuration parameters. Used if productId - * selected is ADI_SENSE_PRODUCT_ID_ADSNS1000 */ - }; - /*!< Product-specific configuration parameters, selected based on productId. - * @note Other product variants may be added here in the future */ -} ADI_SENSE_CONFIG; - -#ifdef __cplusplus -} -#endif - -/*! - * @} - */ - -#endif /* __ADI_SENSE_CONFIG_TYPES_H__ */ -
--- a/inc/adi_sense_gpio.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,177 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: adi_sense_gpio.h - * @brief: ADISENSE OS-dependent wrapper layer for GPIO interface - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_GPIO_H__ -#define __ADI_SENSE_GPIO_H__ - -#include "inc/adi_sense_types.h" -#include "inc/adi_sense_platform.h" - -/*! @ingroup ADISENSE_Host */ - -/*! @addtogroup ADISENSE_Gpio ADISENSE Host GPIO interface functions - * @{ - */ - -/*! GPIO pin identifiers */ -typedef enum -{ - ADI_SENSE_GPIO_PIN_RESET = 0, /*!< RESET GPIO output signal */ - ADI_SENSE_GPIO_PIN_ERROR, /*!< ERROR GPIO input signal */ - ADI_SENSE_GPIO_PIN_ALERT, /*!< ALERT GPIO input signal */ - ADI_SENSE_GPIO_PIN_DATAREADY, /*!< DATAREADY GPIO input signal */ -} ADI_SENSE_GPIO_PIN; - -/*! - * GPIO callback function signature - * - * @param[in] ePinId The GPIO pin which triggered the interrupt notification - * @param[in] pArg Optional opaque parameter to be passed to the callback - */ -typedef void (*ADI_SENSE_GPIO_CALLBACK)( - ADI_SENSE_GPIO_PIN ePinId, - void * pArg); - -/*! A handle used in all API functions to identify the GPIO interface context */ -typedef void* ADI_SENSE_GPIO_HANDLE; - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! - * @brief Open the SPI interface and allocate resources - * - * @param[in] pConfig Pointer to platform-specific GPIO interface details - * @param[out] phDevice Pointer to return a GPIO interface context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully - * - #ADI_SENSE_NO_MEM Failed to allocate memory for interface context - */ -ADI_SENSE_RESULT adi_sense_GpioOpen( - ADI_SENSE_PLATFORM_GPIO_CONFIG * pConfig, - ADI_SENSE_GPIO_HANDLE * phDevice); - -/*! - * @brief Close GPIO interface and free resources - * - * @param[in] hDevice GPIO interface context handle (@ref adi_sense_GpioOpen) - */ -void adi_sense_GpioClose( - ADI_SENSE_GPIO_HANDLE hDevice); - -/*! - * @brief Get the state of the specified GPIO pin - * - * @param[in] hDevice GPIO interface context handle (@ref adi_sense_GpioOpen) - * @param[in] ePinId GPIO pin to be read - * @param[out] pbState Pointer to return the state of the GPIO pin - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully - * - #ADI_SENSE_INVALID_DEVICE_NUM Invalid GPIO pin specified - */ -ADI_SENSE_RESULT adi_sense_GpioGet( - ADI_SENSE_GPIO_HANDLE hDevice, - ADI_SENSE_GPIO_PIN ePinId, - bool * pbState); - -/*! - * @brief Set the state of the specified GPIO pin - * - * @param[in] hDevice GPIO interface context handle (@ref adi_sense_GpioOpen) - * @param[in] ePinId GPIO pin to be set - * @param[in] bState The state to set for GPIO pin - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully - * - #ADI_SENSE_INVALID_DEVICE_NUM Invalid GPIO pin specified - */ -ADI_SENSE_RESULT adi_sense_GpioSet( - ADI_SENSE_GPIO_HANDLE hDevice, - ADI_SENSE_GPIO_PIN ePinId, - bool bState); - -/*! - * @brief Enable interrupt notifications on the specified GPIO pin - * - * @param[in] hDevice GPIO interface context handle (@ref adi_sense_GpioOpen) - * @param[in] ePinId GPIO pin on which to enable interrupt notifications - * @param[in] callback Callback function to invoke when the GPIO is asserted - * @param[in] arg Optional opaque parameter to be passed to the callback - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully - * - #ADI_SENSE_INVALID_DEVICE_NUM Invalid GPIO pin specified - */ -ADI_SENSE_RESULT adi_sense_GpioIrqEnable( - ADI_SENSE_GPIO_HANDLE hDevice, - ADI_SENSE_GPIO_PIN ePinId, - ADI_SENSE_GPIO_CALLBACK callback, - void * arg); - -/*! - * @brief Disable interrupt notifications on the specified GPIO pin - * - * @param[in] hDevice GPIO interface context handle (@ref adi_sense_GpioOpen) - * @param[in] ePinId GPIO pin on which to disable interrupt notifications - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully - * - #ADI_SENSE_INVALID_DEVICE_NUM Invalid GPIO pin specified - */ -ADI_SENSE_RESULT adi_sense_GpioIrqDisable( - ADI_SENSE_GPIO_HANDLE hDevice, - ADI_SENSE_GPIO_PIN ePinId); - -#ifdef __cplusplus -} -#endif - -/*! - * @} - */ - -#endif /* __ADI_SENSE_GPIO_H__ */ -
--- a/inc/adi_sense_log.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: adi_sense_log.h - * @brief: ADISENSE OS-dependent wrapper layer for log functions - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_LOG_H__ -#define __ADI_SENSE_LOG_H__ - -#include "inc/adi_sense_types.h" - -/*! @ingroup ADISENSE_Host */ - -/*! @addtogroup ADISENSE_Log ADISENSE Host Logging functions - * @{ - */ - -/*! Macro function for logging an error message */ -#define ADI_SENSE_LOG_ERROR(...) \ - adi_sense_Log(ADI_SENSE_LOG_LEVEL_ERROR, "[ERROR] " __VA_ARGS__) -/*! Macro function for logging a warning message */ -#define ADI_SENSE_LOG_WARN(...) \ - adi_sense_Log(ADI_SENSE_LOG_LEVEL_WARN, "[WARN] " __VA_ARGS__) -/*! Macro function for logging an information message */ -#define ADI_SENSE_LOG_INFO(...) \ - adi_sense_Log(ADI_SENSE_LOG_LEVEL_INFO, "[INFO] " __VA_ARGS__) -/*! Macro function for logging a debug message */ -#define ADI_SENSE_LOG_DEBUG(...) \ - adi_sense_Log(ADI_SENSE_LOG_LEVEL_DEBUG, "[DEBUG] " __VA_ARGS__) - -/*! - * Log message priority levels - */ -typedef enum -{ - ADI_SENSE_LOG_LEVEL_ERROR = 0, /*!< Error message priority */ - ADI_SENSE_LOG_LEVEL_WARN, /*!< Warning message priority */ - ADI_SENSE_LOG_LEVEL_INFO, /*!< Information message priority */ - ADI_SENSE_LOG_LEVEL_DEBUG, /*!< Debug message priority */ -} ADI_SENSE_LOG_LEVEL; - - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! - * @brief Initialise the Log interface and allocate resources. - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - #ADI_SENSE_NO_MEM Failed to allocate memory for device context. - */ -ADI_SENSE_RESULT adi_sense_LogOpen( - ADI_SENSE_PLATFORM_LOG_CONFIG *pConfig); - -/*! - * @brief Close the Log interface and free resources. - */ -void adi_sense_LogClose(void); - -/*! - * @brief Set the minimum priority level for the log messages. - * - * @param[in] maxLevel priority level - * - * @details Sets the log priority level. Messages with priority lower - that this level will not be passed to the log interface. - */ -void adi_sense_LogLevel( - ADI_SENSE_LOG_LEVEL maxLevel); - -/*! - * @brief Print a log message to the platform log interface. - * - * @param[in] level Log message priority level - * @param[in] format Format string and variable argument list, if any - */ -void adi_sense_Log( - ADI_SENSE_LOG_LEVEL level, - const char * format, - ...); - -#ifdef __cplusplus -} -#endif - -/*! - * @} - */ - -#endif /* __ADI_SENSE_LOG_H__ */ -
--- a/inc/adi_sense_platform.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -Copyright (c) 2017 Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - Modified versions of the software must be conspicuously marked as such. - - This software is licensed solely and exclusively for use with processors - manufactured by or for Analog Devices, Inc. - - This software may not be combined or merged with other code in any manner - that would cause the software to become subject to terms and conditions - which differ from those listed here. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights of one - or more patent holders. This license does not release you from the - requirement that you obtain separate licenses from these patent holders - to use this software. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL -PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: - * @brief: Platform-specific type definitions for ADISENSE API. - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_PLATFORM_H__ -#define __ADI_SENSE_PLATFORM_H__ - -#include <stddef.h> -#include <stdint.h> -#include <stdbool.h> - -/*! @defgroup ADISENSE_Host ADISENSE Host Portability Layer */ - -typedef char char_t; -typedef float float32_t; -typedef double float64_t; - -#if defined (__MBED__) -#include "inc/mbed/adi_sense_platform.h" -#else -#error "Unknown host platform" -#endif - -#endif /* __ADI_SENSE_PLATFORM_H__ */ -
--- a/inc/adi_sense_spi.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: adi_sense_spi.h - * @brief: ADISENSE OS-dependent wrapper layer for SPI interface - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_SPI_H__ -#define __ADI_SENSE_SPI_H__ - -#include "inc/adi_sense_types.h" -#include "inc/adi_sense_platform.h" - -/*! @ingroup ADISENSE_Host */ - -/*! @addtogroup ADISENSE_Spi ADISENSE Host SPI interface functions - * @{ - */ - -/*! A handle used in all API functions to identify the SPI interface context */ -typedef void * ADI_SENSE_SPI_HANDLE; - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! - * @brief Open the SPI interface and allocate resources - * - * @param[in] pConfig Pointer to platform-specific SPI interface details - * @param[out] phDevice Pointer to return a SPI interface context handle - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully - * - #ADI_SENSE_NO_MEM Failed to allocate memory for interface context - */ -ADI_SENSE_RESULT adi_sense_SpiOpen( - ADI_SENSE_PLATFORM_SPI_CONFIG * pConfig, - ADI_SENSE_SPI_HANDLE * phDevice); - -/*! - * @brief Close SPI interface and free resources - * - * @param[in] hDevice SPI interface context handle (@ref adi_sense_SpiOpen) - */ -void adi_sense_SpiClose( - ADI_SENSE_SPI_HANDLE hDevice); - -/*! - * @brief Transfer data to slave device - * - * @param[in] hDevice SPI interface context handle (@ref adi_sense_SpiOpen) - * @param[in] pTxData Transmit data buffer, or NULL for read-only transfers - * @param[in] pRxData Receive data buffer, or NULL for write-only transfers - * @param[in] nLength Number of bytes to transfer - * @param[in] bCsHold Leave the chip-select asserted when the transfer is done - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully - * - #ADI_SENSE_FAILURE Failed to complete SPI transfer - */ -ADI_SENSE_RESULT adi_sense_SpiTransfer( - ADI_SENSE_SPI_HANDLE hDevice, - void * pTxData, - void * pRxData, - unsigned nLength, - bool bCsHold); - -#ifdef __cplusplus -} -#endif - -/*! - * @} - */ - -#endif /* __ADI_SENSE_SPI_H__ */ -
--- a/inc/adi_sense_time.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: adi_sense_time.h - * @brief: ADISENSE OS Dependant wrapper layer for time functions - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_TIME_H__ -#define __ADI_SENSE_TIME_H__ - -#include "inc/adi_sense_types.h" - -/*! @ingroup ADISENSE_Host */ - -/*! @addtogroup ADISENSE_Time ADISENSE Host Time functions - * @{ - */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! - * @brief Wait for a specified number of microseconds - * - * @param[in] microseconds Number of microseconds to wait - */ -void adi_sense_TimeDelayUsec( - const unsigned microseconds); - -#ifdef __cplusplus -} -#endif - -/*! - * @} - */ - -#endif /* __ADI_SENSE_TIME_H__ */ -
--- a/inc/adi_sense_types.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: adi_sense_types.h - * @brief: Type definitions for ADISENSE API. - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_TYPES_H__ -#define __ADI_SENSE_TYPES_H__ - -#include "inc/adi_sense_platform.h" - -/*! - ***************************************************************************** - * \enum ADI_SENSE_RESULT - * - * ADISENSE API Error Codes. #ADI_SENSE_SUCCESS is always zero - * The return value of all ADISENSE APIs returning #ADI_SENSE_RESULT - * should always be tested at the application level for success or failure. - * - *****************************************************************************/ -typedef enum -{ - /*! Generic success. */ - ADI_SENSE_SUCCESS, - /*! Generic Failure. */ - ADI_SENSE_FAILURE, - /*! Operation incomplete, call again */ - ADI_SENSE_INCOMPLETE, - /*! Device is already initialized. */ - ADI_SENSE_IN_USE, - /*! Invalid device handle. */ - ADI_SENSE_INVALID_HANDLE, - /*! Invalid device ID. */ - ADI_SENSE_INVALID_DEVICE_NUM, - /*! Device is uninitialized. */ - ADI_SENSE_ERR_NOT_INITIALIZED, - /*! NULL data pointer not allowed. */ - ADI_SENSE_INVALID_POINTER, - /*! Parameter is out of range. */ - ADI_SENSE_INVALID_PARAM, - /*! Unsupported mode of operation. */ - ADI_SENSE_UNSUPPORTED_MODE, - /*! Invalid operation */ - ADI_SENSE_INVALID_OPERATION, - /*! No data available, or buffer full */ - ADI_SENSE_NO_DATA, - /*! No buffer space available */ - ADI_SENSE_NO_SPACE, - /*! Square root of a negative number */ - ADI_SENSE_NEGATIVE_SQRT, - /*! Division by 0 or 0.0 */ - ADI_SENSE_DIVIDE_BY_ZERO, - /*! Invalid signature */ - ADI_SENSE_INVALID_SIGNATURE, - /*! Wrong size */ - ADI_SENSE_WRONG_SIZE, - /*! Sample Out of the dsp data limits */ - ADI_SENSE_OUT_OF_RANGE, - /*! Unable to operate with not a number */ - ADI_SENSE_NAN_FOUND, - /*! Timeout error */ - ADI_SENSE_TIMEOUT, - /*! Memory allocation error */ - ADI_SENSE_NO_MEM, - /*! CRC validation error */ - ADI_SENSE_CRC_ERROR, -} ADI_SENSE_RESULT; - -#endif /* __ADI_SENSE_TYPES_H__ */ -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw1001/ADMW1001_REGISTERS.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,2304 @@ +/* ================================================================================ + + Project : ADMW1000_REGISTERS + File : ADMW1000_REGISTERS.h + Description : Register Definitions + + Date : Nov 5, 2018 + + Copyright (c) 2018 Analog Devices, Inc. All Rights Reserved. + This software is proprietary and confidential to Analog Devices, Inc. and + its licensors. + + This file was auto-generated. Do not make local changes to this file. + + ================================================================================ */ + +#ifndef _DEF_ADMW1001_REGISTERS_H +#define _DEF_ADMW1001_REGISTERS_H + +#if defined(_LANGUAGE_C) || (defined(__GNUC__) && !defined(__ASSEMBLER__)) +#include <stdint.h> +#endif /* _LANGUAGE_C */ + +#ifndef __ADI_GENERATED_DEF_HEADERS__ +#define __ADI_GENERATED_DEF_HEADERS__ 1 +#endif + +#define __ADI_HAS_CORE__ 1 +#define __ADI_HAS_SPI__ 1 +#define __ADI_HAS_TEST__ 1 + +/* ============================================================================================================================ + + ============================================================================================================================ */ + +/* ============================================================================================================================ + ADMW_SPI + ============================================================================================================================ */ +#define REG_SPI_INTERFACE_CONFIG_A_RESET 0x00000030 /* Reset Value for Interface_Config_A */ +#define REG_SPI_INTERFACE_CONFIG_A 0x00000000 /* ADMW_SPI Interface Configuration A */ +#define REG_SPI_INTERFACE_CONFIG_B_RESET 0x00000000 /* Reset Value for Interface_Config_B */ +#define REG_SPI_INTERFACE_CONFIG_B 0x00000001 /* ADMW_SPI Interface Configuration B */ +#define REG_SPI_DEVICE_CONFIG_RESET 0x00000000 /* Reset Value for Device_Config */ +#define REG_SPI_DEVICE_CONFIG 0x00000002 /* ADMW_SPI Device Configuration */ +#define REG_SPI_CHIP_TYPE_RESET 0x00000007 /* Reset Value for Chip_Type */ +#define REG_SPI_CHIP_TYPE 0x00000003 /* ADMW_SPI Chip Type */ +#define REG_SPI_PRODUCT_ID_L_RESET 0x00000020 /* Reset Value for Product_ID_L */ +#define REG_SPI_PRODUCT_ID_L 0x00000004 /* ADMW_SPI Product ID Low */ +#define REG_SPI_PRODUCT_ID_H_RESET 0x00000000 /* Reset Value for Product_ID_H */ +#define REG_SPI_PRODUCT_ID_H 0x00000005 /* ADMW_SPI Product ID High */ +#define REG_SPI_CHIP_GRADE_RESET 0x00000000 /* Reset Value for Chip_Grade */ +#define REG_SPI_CHIP_GRADE 0x00000006 /* ADMW_SPI Chip Grade */ +#define REG_SPI_SCRATCH_PAD_RESET 0x00000000 /* Reset Value for Scratch_Pad */ +#define REG_SPI_SCRATCH_PAD 0x0000000A /* ADMW_SPI Scratch Pad */ +#define REG_SPI_SPI_REVISION_RESET 0x00000082 /* Reset Value for SPI_Revision */ +#define REG_SPI_SPI_REVISION 0x0000000B /* ADMW_SPI SPI Revision */ +#define REG_SPI_VENDOR_L_RESET 0x00000056 /* Reset Value for Vendor_L */ +#define REG_SPI_VENDOR_L 0x0000000C /* ADMW_SPI Vendor ID Low */ +#define REG_SPI_VENDOR_H_RESET 0x00000004 /* Reset Value for Vendor_H */ +#define REG_SPI_VENDOR_H 0x0000000D /* ADMW_SPI Vendor ID High */ +#define REG_SPI_STREAM_MODE_RESET 0x00000000 /* Reset Value for Stream_Mode */ +#define REG_SPI_STREAM_MODE 0x0000000E /* ADMW_SPI Stream Mode */ +#define REG_SPI_TRANSFER_CONFIG_RESET 0x00000000 /* Reset Value for Transfer_Config */ +#define REG_SPI_TRANSFER_CONFIG 0x0000000F /* ADMW_SPI Transfer Config */ +#define REG_SPI_INTERFACE_CONFIG_C_RESET 0x00000033 /* Reset Value for Interface_Config_C */ +#define REG_SPI_INTERFACE_CONFIG_C 0x00000010 /* ADMW_SPI Interface Configuration C */ +#define REG_SPI_INTERFACE_STATUS_A_RESET 0x00000000 /* Reset Value for Interface_Status_A */ +#define REG_SPI_INTERFACE_STATUS_A 0x00000011 /* ADMW_SPI Interface Status A */ + +/* ============================================================================================================================ + ADMW_SPI Register BitMasks, Positions & Enumerations + ============================================================================================================================ */ +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_INTERFACE_CONFIG_A Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_INTERFACE_CONFIG_A_SW_RESET 7 /* First of Two of SW_RESET Bits. */ +#define BITP_SPI_INTERFACE_CONFIG_A_ADDR_ASCENSION 5 /* Determines Sequential Addressing Behavior */ +#define BITP_SPI_INTERFACE_CONFIG_A_SDO_ENABLE 4 /* SDO Pin Enable */ +#define BITP_SPI_INTERFACE_CONFIG_A_SW_RESETX 0 /* Second of Two of SW_RESET Bits. */ +#define BITM_SPI_INTERFACE_CONFIG_A_SW_RESET 0x00000080 /* First of Two of SW_RESET Bits. */ +#define BITM_SPI_INTERFACE_CONFIG_A_ADDR_ASCENSION 0x00000020 /* Determines Sequential Addressing Behavior */ +#define BITM_SPI_INTERFACE_CONFIG_A_SDO_ENABLE 0x00000010 /* SDO Pin Enable */ +#define BITM_SPI_INTERFACE_CONFIG_A_SW_RESETX 0x00000001 /* Second of Two of SW_RESET Bits. */ +#define ENUM_SPI_INTERFACE_CONFIG_A_DESCEND 0x00000000 /* Addr_Ascension: Address accessed is decremented by one for each data byte when streaming */ +#define ENUM_SPI_INTERFACE_CONFIG_A_ASCEND 0x00000020 /* Addr_Ascension: Address accessed is incremented by one for each data byte when streaming */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_INTERFACE_CONFIG_B Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_SPI_INTERFACE_CONFIG_B_SINGLE_INST 7 /* Select Streaming or Single Instruction Mode */ +#define BITM_SPI_INTERFACE_CONFIG_B_SINGLE_INST 0x00000080 /* Select Streaming or Single Instruction Mode */ +#define ENUM_SPI_INTERFACE_CONFIG_B_STREAMING_MODE 0x00000000 /* Single_Inst: Streaming mode is enabled */ +#define ENUM_SPI_INTERFACE_CONFIG_B_SINGLE_INSTRUCTION_MODE 0x00000080 /* Single_Inst: Single Instruction mode is enabled */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_DEVICE_CONFIG Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_SPI_DEVICE_CONFIG_OPERATING_MODES 0 /* Power Modes */ +#define BITM_SPI_DEVICE_CONFIG_OPERATING_MODES 0x00000003 /* Power Modes */ +#define ENUM_SPI_DEVICE_CONFIG_NORMAL 0x00000000 /* Operating_Modes: Normal Operating Mode */ +#define ENUM_SPI_DEVICE_CONFIG_SLEEP 0x00000003 /* Operating_Modes: Low Power Mode */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_CHIP_TYPE Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_CHIP_TYPE_CHIP_TYPE 0 /* Precision ADC */ +#define BITM_SPI_CHIP_TYPE_CHIP_TYPE 0x0000000F /* Precision ADC */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_PRODUCT_ID_L Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_PRODUCT_ID_L_PRODUCT_ID 0 /* This is Device Chip Type/Family */ +#define BITM_SPI_PRODUCT_ID_L_PRODUCT_ID 0x000000FF /* This is Device Chip Type/Family */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_PRODUCT_ID_H Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_PRODUCT_ID_H_PRODUCT_ID 0 /* This is Device Chip Type/Family */ +#define BITM_SPI_PRODUCT_ID_H_PRODUCT_ID 0x000000FF /* This is Device Chip Type/Family */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_CHIP_GRADE Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_CHIP_GRADE_GRADE 4 /* This is the Device Performance Grade */ +#define BITP_SPI_CHIP_GRADE_DEVICE_REVISION 0 /* This is the Device Hardware Revision */ +#define BITM_SPI_CHIP_GRADE_GRADE 0x000000F0 /* This is the Device Performance Grade */ +#define BITM_SPI_CHIP_GRADE_DEVICE_REVISION 0x0000000F /* This is the Device Hardware Revision */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_SCRATCH_PAD Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_SCRATCH_PAD_SCRATCH_VALUE 0 /* Software Scratchpad */ +#define BITM_SPI_SCRATCH_PAD_SCRATCH_VALUE 0x000000FF /* Software Scratchpad */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_SPI_REVISION Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_SPI_REVISION_SPI_TYPE 6 /* Always Reads as 0x2 */ +#define BITP_SPI_SPI_REVISION_VERSION 0 /* SPI Version */ +#define BITM_SPI_SPI_REVISION_SPI_TYPE 0x000000C0 /* Always Reads as 0x2 */ +#define BITM_SPI_SPI_REVISION_VERSION 0x0000003F /* SPI Version */ +#define ENUM_SPI_SPI_REVISION_ADI_SPI 0x00000000 +#define ENUM_SPI_SPI_REVISION_LPT_SPI 0x00000080 +#define ENUM_SPI_SPI_REVISION_REV1_0 0x00000002 /* Version: Revision 1.0 */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_VENDOR_L Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_VENDOR_L_VID 0 /* Analog Devices Vendor ID */ +#define BITM_SPI_VENDOR_L_VID 0x000000FF /* Analog Devices Vendor ID */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_VENDOR_H Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_VENDOR_H_VID 0 /* Analog Devices Vendor ID */ +#define BITM_SPI_VENDOR_H_VID 0x000000FF /* Analog Devices Vendor ID */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_STREAM_MODE Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_STREAM_MODE_LOOP_COUNT 0 /* Sets the Data Byte Count Before Looping to Start Address */ +#define BITM_SPI_STREAM_MODE_LOOP_COUNT 0x000000FF /* Sets the Data Byte Count Before Looping to Start Address */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_TRANSFER_CONFIG Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_TRANSFER_CONFIG_STREAM_MODE 1 /* When Streaming, Controls Master-Slave Transfer */ +#define BITM_SPI_TRANSFER_CONFIG_STREAM_MODE 0x00000002 /* When Streaming, Controls Master-Slave Transfer */ +#define ENUM_SPI_TRANSFER_CONFIG_UPDATE_ON_WRITE 0x00000000 /* Stream_Mode: Transfers after each byte/mulit-byte register */ +#define ENUM_SPI_TRANSFER_CONFIG_UPDATE_ON_ADDRESS_LOOP 0x00000002 /* Stream_Mode: Transfers when address loops */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_INTERFACE_CONFIG_C Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_INTERFACE_CONFIG_C_CRC_ENABLE 6 /* CRC Enable */ +#define BITP_SPI_INTERFACE_CONFIG_C_STRICT_REGISTER_ACCESS 5 /* Multi-byte Registers Must Be Read/Written in Full */ +#define BITP_SPI_INTERFACE_CONFIG_C_SEND_STATUS 4 /* Enables Sending of Status in 4-wire Mode */ +#define BITP_SPI_INTERFACE_CONFIG_C_CRC_ENABLEB 0 /* Inverted CRC Enable */ +#define BITM_SPI_INTERFACE_CONFIG_C_CRC_ENABLE 0x000000C0 /* CRC Enable */ +#define BITM_SPI_INTERFACE_CONFIG_C_STRICT_REGISTER_ACCESS 0x00000020 /* Multi-byte Registers Must Be Read/Written in Full */ +#define BITM_SPI_INTERFACE_CONFIG_C_SEND_STATUS 0x00000010 /* Enables Sending of Status in 4-wire Mode */ +#define BITM_SPI_INTERFACE_CONFIG_C_CRC_ENABLEB 0x00000003 /* Inverted CRC Enable */ +#define ENUM_SPI_INTERFACE_CONFIG_C_DISABLED 0x00000000 /* CRC_Enable: CRC Disabled */ +#define ENUM_SPI_INTERFACE_CONFIG_C_ENABLED 0x00000040 /* CRC_Enable: CRC Enabled */ +#define ENUM_SPI_INTERFACE_CONFIG_C_NORMAL_ACCESS 0x00000000 /* Strict_Register_Access: Normal mode, no access restrictions */ +#define ENUM_SPI_INTERFACE_CONFIG_C_STRICT_ACCESS 0x00000020 /* Strict_Register_Access: Strict mode, multi-byte registers require all bytes read/written */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_SPI_INTERFACE_STATUS_A Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_SPI_INTERFACE_STATUS_A_NOT_READY_ERROR 7 /* Device Not Ready for Transaction */ +#define BITP_SPI_INTERFACE_STATUS_A_CLOCK_COUNT_ERROR 4 /* Incorrect Number of Clocks Detected in a Transaction */ +#define BITP_SPI_INTERFACE_STATUS_A_CRC_ERROR 3 /* Invalid/No CRC Received */ +#define BITP_SPI_INTERFACE_STATUS_A_WR_TO_RD_ONLY_REG_ERROR 2 /* Write to Read-Only Register Attempted */ +#define BITP_SPI_INTERFACE_STATUS_A_REGISTER_PARTIAL_ACCESS_ERROR 1 /* Set When Fewer Than Expected Number of Bytes Read/Written */ +#define BITP_SPI_INTERFACE_STATUS_A_ADDRESS_INVALID_ERROR 0 /* Attempt to Read/Write Non-existent Register Address */ +#define BITM_SPI_INTERFACE_STATUS_A_NOT_READY_ERROR 0x00000080 /* Device Not Ready for Transaction */ +#define BITM_SPI_INTERFACE_STATUS_A_CLOCK_COUNT_ERROR 0x00000010 /* Incorrect Number of Clocks Detected in a Transaction */ +#define BITM_SPI_INTERFACE_STATUS_A_CRC_ERROR 0x00000008 /* Invalid/No CRC Received */ +#define BITM_SPI_INTERFACE_STATUS_A_WR_TO_RD_ONLY_REG_ERROR 0x00000004 /* Write to Read-Only Register Attempted */ +#define BITM_SPI_INTERFACE_STATUS_A_REGISTER_PARTIAL_ACCESS_ERROR 0x00000002 /* Set When Fewer Than Expected Number of Bytes Read/Written */ +#define BITM_SPI_INTERFACE_STATUS_A_ADDRESS_INVALID_ERROR 0x00000001 /* Attempt to Read/Write Non-existent Register Address */ + + +/* ============================================================================================================================ + ADMW1000 Core Registers + ============================================================================================================================ */ + +/* ============================================================================================================================ + ADMW_CORE + ============================================================================================================================ */ +#define REG_CORE_COMMAND_RESET 0x00000000 /* Reset Value for Command */ +#define REG_CORE_COMMAND 0x00000014 /* ADMW_CORE Special Command */ +#define REG_CORE_MODE_RESET 0x00000000 /* Reset Value for Mode */ +#define REG_CORE_MODE 0x00000016 /* ADMW_CORE Operating Mode and DRDY Control */ +#define REG_CORE_POWER_CONFIG_RESET 0x00000000 /* Reset Value for Power_Config */ +#define REG_CORE_POWER_CONFIG 0x00000017 /* ADMW_CORE General Configuration */ +#define REG_CORE_CYCLE_CONTROL_RESET 0x00000000 /* Reset Value for Cycle_Control */ +#define REG_CORE_CYCLE_CONTROL 0x00000018 /* ADMW_CORE Measurement Cycle */ +#define REG_CORE_FIFO_NUM_CYCLES_RESET 0x00000001 /* Reset Value for Fifo_Num_Cycles */ +#define REG_CORE_FIFO_NUM_CYCLES 0x0000001A /* ADMW_CORE Number of Measurement Cycles to Store in FIFO */ +#define REG_CORE_MULTI_CYCLE_REPEAT_INTERVAL_RESET 0x00000000 /* Reset Value for Multi_Cycle_Repeat_Interval */ +#define REG_CORE_MULTI_CYCLE_REPEAT_INTERVAL 0x0000001C /* ADMW_CORE Time Between Repeats of Multi-Cycle Conversions.... */ +#define REG_CORE_STATUS_RESET 0x00000000 /* Reset Value for Status */ +#define REG_CORE_STATUS 0x00000020 /* ADMW_CORE General Status */ +#define REG_CORE_DIAGNOSTICS_STATUS_RESET 0x00000000 /* Reset Value for Diagnostics_Status */ +#define REG_CORE_DIAGNOSTICS_STATUS 0x00000024 /* ADMW_CORE Diagnostics Status */ +#define REG_CORE_CHANNEL_ALERT_STATUS_RESET 0x00000000 /* Reset Value for Channel_Alert_Status */ +#define REG_CORE_CHANNEL_ALERT_STATUS 0x00000026 /* ADMW_CORE Alert Status Summary */ +#define REG_CORE_ALERT_STATUS_2_RESET 0x00000000 /* Reset Value for Alert_Status_2 */ +#define REG_CORE_ALERT_STATUS_2 0x00000028 /* ADMW_CORE Additional Alert Status Information */ +#define REG_CORE_ALERT_DETAIL_CHn_RESET 0x00000000 /* Reset Value for Alert_Detail_Ch[n] */ +#define REG_CORE_ALERT_DETAIL_CH0_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH0 */ +#define REG_CORE_ALERT_DETAIL_CH1_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH1 */ +#define REG_CORE_ALERT_DETAIL_CH2_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH2 */ +#define REG_CORE_ALERT_DETAIL_CH3_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH3 */ +#define REG_CORE_ALERT_DETAIL_CH4_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH4 */ +#define REG_CORE_ALERT_DETAIL_CH5_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH5 */ +#define REG_CORE_ALERT_DETAIL_CH6_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH6 */ +#define REG_CORE_ALERT_DETAIL_CH7_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH7 */ +#define REG_CORE_ALERT_DETAIL_CH8_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH8 */ +#define REG_CORE_ALERT_DETAIL_CH9_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH9 */ +#define REG_CORE_ALERT_DETAIL_CH10_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH10 */ +#define REG_CORE_ALERT_DETAIL_CH11_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH11 */ +#define REG_CORE_ALERT_DETAIL_CH12_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH12 */ +#define REG_CORE_ALERT_DETAIL_CH13_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH13 */ +#define REG_CORE_ALERT_DETAIL_CH14_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH14 */ +#define REG_CORE_ALERT_DETAIL_CH15_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_DETAIL_CH15 */ +#define REG_CORE_ALERT_DETAIL_CH0 0x0000002A /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH1 0x0000002C /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH2 0x0000002E /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH3 0x00000030 /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH4 0x00000032 /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH5 0x00000034 /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH6 0x00000036 /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH7 0x00000038 /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH8 0x0000003A /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH9 0x0000003C /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH10 0x0000003E /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH11 0x00000040 /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH12 0x00000042 /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH13 0x00000044 /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH14 0x00000046 /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CH15 0x00000048 /* ADMW_CORE Detailed Error Information */ +#define REG_CORE_ALERT_DETAIL_CHn(i) (REG_CORE_ALERT_DETAIL_CH0 + ((i) * 2)) +#define REG_CORE_ALERT_DETAIL_CHn_COUNT 16 +#define REG_CORE_ERROR_CODE_RESET 0x00000000 /* Reset Value for Error_Code */ +#define REG_CORE_ERROR_CODE 0x0000004C /* ADMW_CORE Code Indicating Source of Error */ +#define REG_CORE_ALERT_CODE_RESET 0x00000000 /* Reset Value for Alert_Code */ +#define REG_CORE_ALERT_CODE 0x0000004E /* ADMW_CORE Code Indicating Source of Alert */ +#define REG_CORE_EXTERNAL_REFERENCE1_RESET 0x00000000 /* Reset Value for External_Reference1 */ +#define REG_CORE_EXTERNAL_REFERENCE1 0x00000050 /* ADMW_CORE External Reference Information */ +#define REG_CORE_EXTERNAL_REFERENCE2_RESET 0x00000000 /* Reset Value for External_Reference2 */ +#define REG_CORE_EXTERNAL_REFERENCE2 0x00000054 /* ADMW_CORE External Reference Information */ +#define REG_CORE_DIAGNOSTICS_CONTROL_RESET 0x00000000 /* Reset Value for Diagnostics_Control */ +#define REG_CORE_DIAGNOSTICS_CONTROL 0x0000005C /* ADMW_CORE Diagnostic Control */ +#define REG_CORE_DATA_FIFO_RESET 0x00000000 /* Reset Value for Data_FIFO */ +#define REG_CORE_DATA_FIFO 0x00000060 /* ADMW_CORE FIFO Buffer of Sensor Results */ +#define REG_CORE_DEBUG_CODE_RESET 0x00000000 /* Reset Value for Debug_Code */ +#define REG_CORE_DEBUG_CODE 0x00000064 /* ADMW_CORE Additional Information on Source of Alert or Errors */ +#define REG_CORE_FFT_CONFIG_RESET 0x00000000 /* Reset Value for FFT_Config */ +#define REG_CORE_FFT_CONFIG 0x00000068 /* ADMW_CORE FFT Configuration */ +#define REG_CORE_ADVANCED_SENSOR_ACCESS_RESET 0x00000000 /* Reset Value for Advanced_Sensor_Access */ +#define REG_CORE_ADVANCED_SENSOR_ACCESS 0x0000006E /* ADMW_CORE Enables Access to Advanced Sensor Configuration */ +#define REG_CORE_LUT_SELECT_RESET 0x00000000 /* Reset Value for LUT_Select */ +#define REG_CORE_LUT_SELECT 0x00000070 /* ADMW_CORE Read/Write Strobe */ +#define REG_CORE_LUT_OFFSET_RESET 0x00000000 /* Reset Value for LUT_Offset */ +#define REG_CORE_LUT_OFFSET 0x00000072 /* ADMW_CORE Offset into Selected LUT */ +#define REG_CORE_LUT_DATA_RESET 0x00000000 /* Reset Value for LUT_Data */ +#define REG_CORE_LUT_DATA 0x00000074 /* ADMW_CORE Data to Read/Write from Addressed LUT Entry */ +#define REG_CORE_EXT_FLASH_INDEX_RESET 0x00000000 /* Reset Value for Ext_Flash_Index */ +#define REG_CORE_EXT_FLASH_INDEX 0x00000080 /* ADMW_CORE Start Position (Sample No.) for Retrieval of Ext. Flash Data */ +#define REG_CORE_EXT_FLASH_SAMPLE_COUNT_RESET 0x00000000 /* Reset Value for Ext_Flash_Sample_Count */ +#define REG_CORE_EXT_FLASH_SAMPLE_COUNT 0x00000084 /* ADMW_CORE Indicates How Many Samples Stored in External Flash */ +#define REG_CORE_EXT_FLASH_DATA_RESET 0x00000000 /* Reset Value for Ext_Flash_Data */ +#define REG_CORE_EXT_FLASH_DATA 0x00000088 /* ADMW_CORE Data Read Back from External Flash */ +#define REG_CORE_REVISION_RESET 0x00000000 /* Reset Value for Revision */ +#define REG_CORE_REVISION 0x0000008C /* ADMW_CORE Hardware, Firmware Revision */ +#define REG_CORE_CHANNEL_COUNTn_RESET 0x00000000 /* Reset Value for Channel_Count[n] */ +#define REG_CORE_CHANNEL_COUNT0_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT0 */ +#define REG_CORE_CHANNEL_COUNT1_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT1 */ +#define REG_CORE_CHANNEL_COUNT2_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT2 */ +#define REG_CORE_CHANNEL_COUNT3_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT3 */ +#define REG_CORE_CHANNEL_COUNT4_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT4 */ +#define REG_CORE_CHANNEL_COUNT5_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT5 */ +#define REG_CORE_CHANNEL_COUNT6_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT6 */ +#define REG_CORE_CHANNEL_COUNT7_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT7 */ +#define REG_CORE_CHANNEL_COUNT8_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT8 */ +#define REG_CORE_CHANNEL_COUNT9_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT9 */ +#define REG_CORE_CHANNEL_COUNT10_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT10 */ +#define REG_CORE_CHANNEL_COUNT11_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT11 */ +#define REG_CORE_CHANNEL_COUNT12_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT12 */ +#define REG_CORE_CHANNEL_COUNT13_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT13 */ +#define REG_CORE_CHANNEL_COUNT14_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT14 */ +#define REG_CORE_CHANNEL_COUNT15_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_COUNT15 */ +#define REG_CORE_CHANNEL_COUNT0 0x00000090 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT1 0x000000D0 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT2 0x00000110 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT3 0x00000150 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT4 0x00000190 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT5 0x000001D0 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT6 0x00000210 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT7 0x00000250 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT8 0x00000290 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT9 0x000002D0 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT10 0x00000310 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT11 0x00000350 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT12 0x00000390 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT13 0x000003D0 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT14 0x00000410 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNT15 0x00000450 /* ADMW_CORE Number of Channel Occurrences per Measurement Cycle */ +#define REG_CORE_CHANNEL_COUNTn(i) (REG_CORE_CHANNEL_COUNT0 + ((i) * 64)) +#define REG_CORE_CHANNEL_COUNTn_COUNT 16 +#define REG_CORE_CHANNEL_OPTIONSn_RESET 0x00000000 /* Reset Value for Channel_Options[n] */ +#define REG_CORE_CHANNEL_OPTIONS0_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS0 */ +#define REG_CORE_CHANNEL_OPTIONS1_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS1 */ +#define REG_CORE_CHANNEL_OPTIONS2_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS2 */ +#define REG_CORE_CHANNEL_OPTIONS3_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS3 */ +#define REG_CORE_CHANNEL_OPTIONS4_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS4 */ +#define REG_CORE_CHANNEL_OPTIONS5_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS5 */ +#define REG_CORE_CHANNEL_OPTIONS6_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS6 */ +#define REG_CORE_CHANNEL_OPTIONS7_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS7 */ +#define REG_CORE_CHANNEL_OPTIONS8_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS8 */ +#define REG_CORE_CHANNEL_OPTIONS9_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS9 */ +#define REG_CORE_CHANNEL_OPTIONS10_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS10 */ +#define REG_CORE_CHANNEL_OPTIONS11_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS11 */ +#define REG_CORE_CHANNEL_OPTIONS12_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS12 */ +#define REG_CORE_CHANNEL_OPTIONS13_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS13 */ +#define REG_CORE_CHANNEL_OPTIONS14_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS14 */ +#define REG_CORE_CHANNEL_OPTIONS15_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_OPTIONS15 */ +#define REG_CORE_CHANNEL_OPTIONS0 0x00000091 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS1 0x000000D1 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS2 0x00000111 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS3 0x00000151 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS4 0x00000191 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS5 0x000001D1 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS6 0x00000211 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS7 0x00000251 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS8 0x00000291 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS9 0x000002D1 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS10 0x00000311 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS11 0x00000351 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS12 0x00000391 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS13 0x000003D1 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS14 0x00000411 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONS15 0x00000451 /* ADMW_CORE Position of Channel Within Sequence and Enable for FFT */ +#define REG_CORE_CHANNEL_OPTIONSn(i) (REG_CORE_CHANNEL_OPTIONS0 + ((i) * 64)) +#define REG_CORE_CHANNEL_OPTIONSn_COUNT 16 +#define REG_CORE_SENSOR_TYPEn_RESET 0x00000000 /* Reset Value for Sensor_Type[n] */ +#define REG_CORE_SENSOR_TYPE0_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE0 */ +#define REG_CORE_SENSOR_TYPE1_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE1 */ +#define REG_CORE_SENSOR_TYPE2_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE2 */ +#define REG_CORE_SENSOR_TYPE3_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE3 */ +#define REG_CORE_SENSOR_TYPE4_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE4 */ +#define REG_CORE_SENSOR_TYPE5_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE5 */ +#define REG_CORE_SENSOR_TYPE6_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE6 */ +#define REG_CORE_SENSOR_TYPE7_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE7 */ +#define REG_CORE_SENSOR_TYPE8_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE8 */ +#define REG_CORE_SENSOR_TYPE9_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE9 */ +#define REG_CORE_SENSOR_TYPE10_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE10 */ +#define REG_CORE_SENSOR_TYPE11_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE11 */ +#define REG_CORE_SENSOR_TYPE12_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE12 */ +#define REG_CORE_SENSOR_TYPE13_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE13 */ +#define REG_CORE_SENSOR_TYPE14_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE14 */ +#define REG_CORE_SENSOR_TYPE15_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_TYPE15 */ +#define REG_CORE_SENSOR_TYPE0 0x00000092 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE1 0x000000D2 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE2 0x00000112 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE3 0x00000152 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE4 0x00000192 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE5 0x000001D2 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE6 0x00000212 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE7 0x00000252 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE8 0x00000292 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE9 0x000002D2 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE10 0x00000312 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE11 0x00000352 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE12 0x00000392 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE13 0x000003D2 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE14 0x00000412 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPE15 0x00000452 /* ADMW_CORE Sensor Select */ +#define REG_CORE_SENSOR_TYPEn(i) (REG_CORE_SENSOR_TYPE0 + ((i) * 64)) +#define REG_CORE_SENSOR_TYPEn_COUNT 16 +#define REG_CORE_SENSOR_DETAILSn_RESET 0x0000FFF0 /* Reset Value for Sensor_Details[n] */ +#define REG_CORE_SENSOR_DETAILS0_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS0 */ +#define REG_CORE_SENSOR_DETAILS1_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS1 */ +#define REG_CORE_SENSOR_DETAILS2_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS2 */ +#define REG_CORE_SENSOR_DETAILS3_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS3 */ +#define REG_CORE_SENSOR_DETAILS4_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS4 */ +#define REG_CORE_SENSOR_DETAILS5_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS5 */ +#define REG_CORE_SENSOR_DETAILS6_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS6 */ +#define REG_CORE_SENSOR_DETAILS7_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS7 */ +#define REG_CORE_SENSOR_DETAILS8_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS8 */ +#define REG_CORE_SENSOR_DETAILS9_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS9 */ +#define REG_CORE_SENSOR_DETAILS10_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS10 */ +#define REG_CORE_SENSOR_DETAILS11_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS11 */ +#define REG_CORE_SENSOR_DETAILS12_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS12 */ +#define REG_CORE_SENSOR_DETAILS13_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS13 */ +#define REG_CORE_SENSOR_DETAILS14_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS14 */ +#define REG_CORE_SENSOR_DETAILS15_RESET 0x0000FFF0 /* Reset Value for REG_CORE_SENSOR_DETAILS15 */ +#define REG_CORE_SENSOR_DETAILS0 0x00000094 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS1 0x000000D4 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS2 0x00000114 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS3 0x00000154 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS4 0x00000194 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS5 0x000001D4 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS6 0x00000214 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS7 0x00000254 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS8 0x00000294 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS9 0x000002D4 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS10 0x00000314 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS11 0x00000354 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS12 0x00000394 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS13 0x000003D4 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS14 0x00000414 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILS15 0x00000454 /* ADMW_CORE Sensor Details */ +#define REG_CORE_SENSOR_DETAILSn(i) (REG_CORE_SENSOR_DETAILS0 + ((i) * 64)) +#define REG_CORE_SENSOR_DETAILSn_COUNT 16 +#define REG_CORE_CHANNEL_EXCITATIONn_RESET 0x00000000 /* Reset Value for Channel_Excitation[n] */ +#define REG_CORE_CHANNEL_EXCITATION0_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION0 */ +#define REG_CORE_CHANNEL_EXCITATION1_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION1 */ +#define REG_CORE_CHANNEL_EXCITATION2_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION2 */ +#define REG_CORE_CHANNEL_EXCITATION3_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION3 */ +#define REG_CORE_CHANNEL_EXCITATION4_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION4 */ +#define REG_CORE_CHANNEL_EXCITATION5_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION5 */ +#define REG_CORE_CHANNEL_EXCITATION6_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION6 */ +#define REG_CORE_CHANNEL_EXCITATION7_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION7 */ +#define REG_CORE_CHANNEL_EXCITATION8_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION8 */ +#define REG_CORE_CHANNEL_EXCITATION9_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION9 */ +#define REG_CORE_CHANNEL_EXCITATION10_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION10 */ +#define REG_CORE_CHANNEL_EXCITATION11_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION11 */ +#define REG_CORE_CHANNEL_EXCITATION12_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION12 */ +#define REG_CORE_CHANNEL_EXCITATION13_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION13 */ +#define REG_CORE_CHANNEL_EXCITATION14_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION14 */ +#define REG_CORE_CHANNEL_EXCITATION15_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_EXCITATION15 */ +#define REG_CORE_CHANNEL_EXCITATION0 0x00000098 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION1 0x000000D8 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION2 0x00000118 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION3 0x00000158 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION4 0x00000198 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION5 0x000001D8 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION6 0x00000218 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION7 0x00000258 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION8 0x00000298 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION9 0x000002D8 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION10 0x00000318 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION11 0x00000358 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION12 0x00000398 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION13 0x000003D8 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION14 0x00000418 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATION15 0x00000458 /* ADMW_CORE Excitation Current */ +#define REG_CORE_CHANNEL_EXCITATIONn(i) (REG_CORE_CHANNEL_EXCITATION0 + ((i) * 64)) +#define REG_CORE_CHANNEL_EXCITATIONn_COUNT 16 +#define REG_CORE_SETTLING_TIMEn_RESET 0x00000000 /* Reset Value for Settling_Time[n] */ +#define REG_CORE_SETTLING_TIME0_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME0 */ +#define REG_CORE_SETTLING_TIME1_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME1 */ +#define REG_CORE_SETTLING_TIME2_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME2 */ +#define REG_CORE_SETTLING_TIME3_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME3 */ +#define REG_CORE_SETTLING_TIME4_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME4 */ +#define REG_CORE_SETTLING_TIME5_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME5 */ +#define REG_CORE_SETTLING_TIME6_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME6 */ +#define REG_CORE_SETTLING_TIME7_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME7 */ +#define REG_CORE_SETTLING_TIME8_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME8 */ +#define REG_CORE_SETTLING_TIME9_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME9 */ +#define REG_CORE_SETTLING_TIME10_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME10 */ +#define REG_CORE_SETTLING_TIME11_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME11 */ +#define REG_CORE_SETTLING_TIME12_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME12 */ +#define REG_CORE_SETTLING_TIME13_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME13 */ +#define REG_CORE_SETTLING_TIME14_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME14 */ +#define REG_CORE_SETTLING_TIME15_RESET 0x00000000 /* Reset Value for REG_CORE_SETTLING_TIME15 */ +#define REG_CORE_SETTLING_TIME0 0x0000009A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME1 0x000000DA /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME2 0x0000011A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME3 0x0000015A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME4 0x0000019A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME5 0x000001DA /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME6 0x0000021A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME7 0x0000025A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME8 0x0000029A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME9 0x000002DA /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME10 0x0000031A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME11 0x0000035A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME12 0x0000039A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME13 0x000003DA /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME14 0x0000041A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIME15 0x0000045A /* ADMW_CORE Settling Time */ +#define REG_CORE_SETTLING_TIMEn(i) (REG_CORE_SETTLING_TIME0 + ((i) * 64)) +#define REG_CORE_SETTLING_TIMEn_COUNT 16 +#define REG_CORE_FILTER_SELECTn_RESET 0x00000000 /* Reset Value for Filter_Select[n] */ +#define REG_CORE_FILTER_SELECT0_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT0 */ +#define REG_CORE_FILTER_SELECT1_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT1 */ +#define REG_CORE_FILTER_SELECT2_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT2 */ +#define REG_CORE_FILTER_SELECT3_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT3 */ +#define REG_CORE_FILTER_SELECT4_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT4 */ +#define REG_CORE_FILTER_SELECT5_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT5 */ +#define REG_CORE_FILTER_SELECT6_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT6 */ +#define REG_CORE_FILTER_SELECT7_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT7 */ +#define REG_CORE_FILTER_SELECT8_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT8 */ +#define REG_CORE_FILTER_SELECT9_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT9 */ +#define REG_CORE_FILTER_SELECT10_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT10 */ +#define REG_CORE_FILTER_SELECT11_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT11 */ +#define REG_CORE_FILTER_SELECT12_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT12 */ +#define REG_CORE_FILTER_SELECT13_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT13 */ +#define REG_CORE_FILTER_SELECT14_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT14 */ +#define REG_CORE_FILTER_SELECT15_RESET 0x00000000 /* Reset Value for REG_CORE_FILTER_SELECT15 */ +#define REG_CORE_FILTER_SELECT0 0x0000009C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT1 0x000000DC /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT2 0x0000011C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT3 0x0000015C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT4 0x0000019C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT5 0x000001DC /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT6 0x0000021C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT7 0x0000025C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT8 0x0000029C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT9 0x000002DC /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT10 0x0000031C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT11 0x0000035C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT12 0x0000039C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT13 0x000003DC /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT14 0x0000041C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECT15 0x0000045C /* ADMW_CORE ADC Digital Filter Selection */ +#define REG_CORE_FILTER_SELECTn(i) (REG_CORE_FILTER_SELECT0 + ((i) * 64)) +#define REG_CORE_FILTER_SELECTn_COUNT 16 +#define REG_CORE_HIGH_THRESHOLD_LIMITn_RESET 0x7F800000 /* Reset Value for High_Threshold_Limit[n] */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT0_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT0 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT1_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT1 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT2_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT2 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT3_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT3 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT4_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT4 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT5_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT5 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT6_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT6 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT7_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT7 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT8_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT8 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT9_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT9 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT10_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT10 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT11_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT11 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT12_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT12 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT13_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT13 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT14_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT14 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT15_RESET 0x7F800000 /* Reset Value for REG_CORE_HIGH_THRESHOLD_LIMIT15 */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT0 0x000000A0 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT1 0x000000E0 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT2 0x00000120 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT3 0x00000160 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT4 0x000001A0 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT5 0x000001E0 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT6 0x00000220 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT7 0x00000260 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT8 0x000002A0 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT9 0x000002E0 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT10 0x00000320 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT11 0x00000360 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT12 0x000003A0 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT13 0x000003E0 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT14 0x00000420 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMIT15 0x00000460 /* ADMW_CORE High Threshold */ +#define REG_CORE_HIGH_THRESHOLD_LIMITn(i) (REG_CORE_HIGH_THRESHOLD_LIMIT0 + ((i) * 64)) +#define REG_CORE_HIGH_THRESHOLD_LIMITn_COUNT 16 +#define REG_CORE_LOW_THRESHOLD_LIMITn_RESET 0xFF800000 /* Reset Value for Low_Threshold_Limit[n] */ +#define REG_CORE_LOW_THRESHOLD_LIMIT0_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT0 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT1_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT1 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT2_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT2 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT3_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT3 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT4_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT4 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT5_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT5 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT6_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT6 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT7_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT7 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT8_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT8 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT9_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT9 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT10_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT10 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT11_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT11 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT12_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT12 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT13_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT13 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT14_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT14 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT15_RESET 0xFF800000 /* Reset Value for REG_CORE_LOW_THRESHOLD_LIMIT15 */ +#define REG_CORE_LOW_THRESHOLD_LIMIT0 0x000000A4 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT1 0x000000E4 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT2 0x00000124 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT3 0x00000164 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT4 0x000001A4 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT5 0x000001E4 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT6 0x00000224 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT7 0x00000264 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT8 0x000002A4 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT9 0x000002E4 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT10 0x00000324 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT11 0x00000364 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT12 0x000003A4 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT13 0x000003E4 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT14 0x00000424 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMIT15 0x00000464 /* ADMW_CORE Low Threshold */ +#define REG_CORE_LOW_THRESHOLD_LIMITn(i) (REG_CORE_LOW_THRESHOLD_LIMIT0 + ((i) * 64)) +#define REG_CORE_LOW_THRESHOLD_LIMITn_COUNT 16 +#define REG_CORE_SENSOR_OFFSETn_RESET 0x00000000 /* Reset Value for Sensor_Offset[n] */ +#define REG_CORE_SENSOR_OFFSET0_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET0 */ +#define REG_CORE_SENSOR_OFFSET1_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET1 */ +#define REG_CORE_SENSOR_OFFSET2_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET2 */ +#define REG_CORE_SENSOR_OFFSET3_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET3 */ +#define REG_CORE_SENSOR_OFFSET4_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET4 */ +#define REG_CORE_SENSOR_OFFSET5_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET5 */ +#define REG_CORE_SENSOR_OFFSET6_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET6 */ +#define REG_CORE_SENSOR_OFFSET7_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET7 */ +#define REG_CORE_SENSOR_OFFSET8_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET8 */ +#define REG_CORE_SENSOR_OFFSET9_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET9 */ +#define REG_CORE_SENSOR_OFFSET10_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET10 */ +#define REG_CORE_SENSOR_OFFSET11_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET11 */ +#define REG_CORE_SENSOR_OFFSET12_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET12 */ +#define REG_CORE_SENSOR_OFFSET13_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET13 */ +#define REG_CORE_SENSOR_OFFSET14_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET14 */ +#define REG_CORE_SENSOR_OFFSET15_RESET 0x00000000 /* Reset Value for REG_CORE_SENSOR_OFFSET15 */ +#define REG_CORE_SENSOR_OFFSET0 0x000000A8 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET1 0x000000E8 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET2 0x00000128 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET3 0x00000168 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET4 0x000001A8 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET5 0x000001E8 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET6 0x00000228 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET7 0x00000268 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET8 0x000002A8 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET9 0x000002E8 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET10 0x00000328 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET11 0x00000368 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET12 0x000003A8 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET13 0x000003E8 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET14 0x00000428 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSET15 0x00000468 /* ADMW_CORE Sensor Offset Adjustment */ +#define REG_CORE_SENSOR_OFFSETn(i) (REG_CORE_SENSOR_OFFSET0 + ((i) * 64)) +#define REG_CORE_SENSOR_OFFSETn_COUNT 16 +#define REG_CORE_SENSOR_GAINn_RESET 0x3F800000 /* Reset Value for Sensor_Gain[n] */ +#define REG_CORE_SENSOR_GAIN0_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN0 */ +#define REG_CORE_SENSOR_GAIN1_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN1 */ +#define REG_CORE_SENSOR_GAIN2_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN2 */ +#define REG_CORE_SENSOR_GAIN3_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN3 */ +#define REG_CORE_SENSOR_GAIN4_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN4 */ +#define REG_CORE_SENSOR_GAIN5_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN5 */ +#define REG_CORE_SENSOR_GAIN6_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN6 */ +#define REG_CORE_SENSOR_GAIN7_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN7 */ +#define REG_CORE_SENSOR_GAIN8_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN8 */ +#define REG_CORE_SENSOR_GAIN9_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN9 */ +#define REG_CORE_SENSOR_GAIN10_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN10 */ +#define REG_CORE_SENSOR_GAIN11_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN11 */ +#define REG_CORE_SENSOR_GAIN12_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN12 */ +#define REG_CORE_SENSOR_GAIN13_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN13 */ +#define REG_CORE_SENSOR_GAIN14_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN14 */ +#define REG_CORE_SENSOR_GAIN15_RESET 0x3F800000 /* Reset Value for REG_CORE_SENSOR_GAIN15 */ +#define REG_CORE_SENSOR_GAIN0 0x000000AC /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN1 0x000000EC /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN2 0x0000012C /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN3 0x0000016C /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN4 0x000001AC /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN5 0x000001EC /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN6 0x0000022C /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN7 0x0000026C /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN8 0x000002AC /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN9 0x000002EC /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN10 0x0000032C /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN11 0x0000036C /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN12 0x000003AC /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN13 0x000003EC /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN14 0x0000042C /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAIN15 0x0000046C /* ADMW_CORE Sensor Gain Adjustment */ +#define REG_CORE_SENSOR_GAINn(i) (REG_CORE_SENSOR_GAIN0 + ((i) * 64)) +#define REG_CORE_SENSOR_GAINn_COUNT 16 +#define REG_CORE_ALERT_CODE_CHn_RESET 0x00000000 /* Reset Value for Alert_Code_Ch[n] */ +#define REG_CORE_ALERT_CODE_CH0_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH0 */ +#define REG_CORE_ALERT_CODE_CH1_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH1 */ +#define REG_CORE_ALERT_CODE_CH2_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH2 */ +#define REG_CORE_ALERT_CODE_CH3_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH3 */ +#define REG_CORE_ALERT_CODE_CH4_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH4 */ +#define REG_CORE_ALERT_CODE_CH5_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH5 */ +#define REG_CORE_ALERT_CODE_CH6_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH6 */ +#define REG_CORE_ALERT_CODE_CH7_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH7 */ +#define REG_CORE_ALERT_CODE_CH8_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH8 */ +#define REG_CORE_ALERT_CODE_CH9_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH9 */ +#define REG_CORE_ALERT_CODE_CH10_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH10 */ +#define REG_CORE_ALERT_CODE_CH11_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH11 */ +#define REG_CORE_ALERT_CODE_CH12_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH12 */ +#define REG_CORE_ALERT_CODE_CH13_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH13 */ +#define REG_CORE_ALERT_CODE_CH14_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH14 */ +#define REG_CORE_ALERT_CODE_CH15_RESET 0x00000000 /* Reset Value for REG_CORE_ALERT_CODE_CH15 */ +#define REG_CORE_ALERT_CODE_CH0 0x000000B0 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH1 0x000000F0 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH2 0x00000130 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH3 0x00000170 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH4 0x000001B0 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH5 0x000001F0 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH6 0x00000230 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH7 0x00000270 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH8 0x000002B0 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH9 0x000002F0 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH10 0x00000330 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH11 0x00000370 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH12 0x000003B0 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH13 0x000003F0 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH14 0x00000430 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CH15 0x00000470 /* ADMW_CORE Per-Channel Detailed Alert-Code Information */ +#define REG_CORE_ALERT_CODE_CHn(i) (REG_CORE_ALERT_CODE_CH0 + ((i) * 64)) +#define REG_CORE_ALERT_CODE_CHn_COUNT 16 +#define REG_CORE_CHANNEL_SKIPn_RESET 0x00000000 /* Reset Value for Channel_Skip[n] */ +#define REG_CORE_CHANNEL_SKIP0_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP0 */ +#define REG_CORE_CHANNEL_SKIP1_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP1 */ +#define REG_CORE_CHANNEL_SKIP2_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP2 */ +#define REG_CORE_CHANNEL_SKIP3_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP3 */ +#define REG_CORE_CHANNEL_SKIP4_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP4 */ +#define REG_CORE_CHANNEL_SKIP5_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP5 */ +#define REG_CORE_CHANNEL_SKIP6_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP6 */ +#define REG_CORE_CHANNEL_SKIP7_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP7 */ +#define REG_CORE_CHANNEL_SKIP8_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP8 */ +#define REG_CORE_CHANNEL_SKIP9_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP9 */ +#define REG_CORE_CHANNEL_SKIP10_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP10 */ +#define REG_CORE_CHANNEL_SKIP11_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP11 */ +#define REG_CORE_CHANNEL_SKIP12_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP12 */ +#define REG_CORE_CHANNEL_SKIP13_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP13 */ +#define REG_CORE_CHANNEL_SKIP14_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP14 */ +#define REG_CORE_CHANNEL_SKIP15_RESET 0x00000000 /* Reset Value for REG_CORE_CHANNEL_SKIP15 */ +#define REG_CORE_CHANNEL_SKIP0 0x000000B2 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP1 0x000000F2 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP2 0x00000132 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP3 0x00000172 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP4 0x000001B2 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP5 0x000001F2 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP6 0x00000232 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP7 0x00000272 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP8 0x000002B2 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP9 0x000002F2 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP10 0x00000332 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP11 0x00000372 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP12 0x000003B2 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP13 0x000003F2 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP14 0x00000432 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIP15 0x00000472 /* ADMW_CORE Indicates If Channel Will Skip Some Measurement Cycles */ +#define REG_CORE_CHANNEL_SKIPn(i) (REG_CORE_CHANNEL_SKIP0 + ((i) * 64)) +#define REG_CORE_CHANNEL_SKIPn_COUNT 16 +#define REG_CORE_SENSOR_PARAMETERn_RESET 0x7FC00000 /* Reset Value for Sensor_Parameter[n] */ +#define REG_CORE_SENSOR_PARAMETER0_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER0 */ +#define REG_CORE_SENSOR_PARAMETER1_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER1 */ +#define REG_CORE_SENSOR_PARAMETER2_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER2 */ +#define REG_CORE_SENSOR_PARAMETER3_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER3 */ +#define REG_CORE_SENSOR_PARAMETER4_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER4 */ +#define REG_CORE_SENSOR_PARAMETER5_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER5 */ +#define REG_CORE_SENSOR_PARAMETER6_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER6 */ +#define REG_CORE_SENSOR_PARAMETER7_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER7 */ +#define REG_CORE_SENSOR_PARAMETER8_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER8 */ +#define REG_CORE_SENSOR_PARAMETER9_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER9 */ +#define REG_CORE_SENSOR_PARAMETER10_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER10 */ +#define REG_CORE_SENSOR_PARAMETER11_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER11 */ +#define REG_CORE_SENSOR_PARAMETER12_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER12 */ +#define REG_CORE_SENSOR_PARAMETER13_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER13 */ +#define REG_CORE_SENSOR_PARAMETER14_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER14 */ +#define REG_CORE_SENSOR_PARAMETER15_RESET 0x7FC00000 /* Reset Value for REG_CORE_SENSOR_PARAMETER15 */ +#define REG_CORE_SENSOR_PARAMETER0 0x000000B4 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER1 0x000000F4 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER2 0x00000134 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER3 0x00000174 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER4 0x000001B4 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER5 0x000001F4 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER6 0x00000234 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER7 0x00000274 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER8 0x000002B4 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER9 0x000002F4 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER10 0x00000334 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER11 0x00000374 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER12 0x000003B4 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER13 0x000003F4 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER14 0x00000434 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETER15 0x00000474 /* ADMW_CORE Sensor Parameter Adjustment */ +#define REG_CORE_SENSOR_PARAMETERn(i) (REG_CORE_SENSOR_PARAMETER0 + ((i) * 64)) +#define REG_CORE_SENSOR_PARAMETERn_COUNT 16 +#define REG_CORE_CALIBRATION_PARAMETERn_RESET 0x00000000 /* Reset Value for Calibration_Parameter[n] */ +#define REG_CORE_CALIBRATION_PARAMETER0_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER0 */ +#define REG_CORE_CALIBRATION_PARAMETER1_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER1 */ +#define REG_CORE_CALIBRATION_PARAMETER2_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER2 */ +#define REG_CORE_CALIBRATION_PARAMETER3_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER3 */ +#define REG_CORE_CALIBRATION_PARAMETER4_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER4 */ +#define REG_CORE_CALIBRATION_PARAMETER5_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER5 */ +#define REG_CORE_CALIBRATION_PARAMETER6_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER6 */ +#define REG_CORE_CALIBRATION_PARAMETER7_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER7 */ +#define REG_CORE_CALIBRATION_PARAMETER8_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER8 */ +#define REG_CORE_CALIBRATION_PARAMETER9_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER9 */ +#define REG_CORE_CALIBRATION_PARAMETER10_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER10 */ +#define REG_CORE_CALIBRATION_PARAMETER11_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER11 */ +#define REG_CORE_CALIBRATION_PARAMETER12_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER12 */ +#define REG_CORE_CALIBRATION_PARAMETER13_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER13 */ +#define REG_CORE_CALIBRATION_PARAMETER14_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER14 */ +#define REG_CORE_CALIBRATION_PARAMETER15_RESET 0x00000000 /* Reset Value for REG_CORE_CALIBRATION_PARAMETER15 */ +#define REG_CORE_CALIBRATION_PARAMETER0 0x000000B8 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER1 0x000000F8 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER2 0x00000138 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER3 0x00000178 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER4 0x000001B8 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER5 0x000001F8 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER6 0x00000238 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER7 0x00000278 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER8 0x000002B8 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER9 0x000002F8 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER10 0x00000338 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER11 0x00000378 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER12 0x000003B8 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER13 0x000003F8 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER14 0x00000438 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETER15 0x00000478 /* ADMW_CORE Calibration Parameter Value */ +#define REG_CORE_CALIBRATION_PARAMETERn(i) (REG_CORE_CALIBRATION_PARAMETER0 + ((i) * 64)) +#define REG_CORE_CALIBRATION_PARAMETERn_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_CONFIGn_RESET 0x00000000 /* Reset Value for Digital_Sensor_Config[n] */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG0_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG0 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG1_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG1 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG2_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG2 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG3_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG3 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG4_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG4 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG5_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG5 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG6_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG6 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG7_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG7 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG8_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG8 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG9_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG9 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG10_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG10 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG11_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG11 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG12_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG12 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG13_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG13 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG14_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG14 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG15_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_CONFIG15 */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG0 0x000000BC /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG1 0x000000FC /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG2 0x0000013C /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG3 0x0000017C /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG4 0x000001BC /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG5 0x000001FC /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG6 0x0000023C /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG7 0x0000027C /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG8 0x000002BC /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG9 0x000002FC /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG10 0x0000033C /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG11 0x0000037C /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG12 0x000003BC /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG13 0x000003FC /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG14 0x0000043C /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIG15 0x0000047C /* ADMW_CORE Digital Sensor Data Coding */ +#define REG_CORE_DIGITAL_SENSOR_CONFIGn(i) (REG_CORE_DIGITAL_SENSOR_CONFIG0 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_CONFIGn_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_ADDRESSn_RESET 0x00000000 /* Reset Value for Digital_Sensor_Address[n] */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS0_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS0 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS1_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS1 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS2_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS2 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS3_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS3 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS4_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS4 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS5_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS5 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS6_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS6 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS7_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS7 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS8_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS8 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS9_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS9 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS10_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS10 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS11_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS11 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS12_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS12 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS13_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS13 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS14_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS14 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS15_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_ADDRESS15 */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS0 0x000000BE /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS1 0x000000FE /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS2 0x0000013E /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS3 0x0000017E /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS4 0x000001BE /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS5 0x000001FE /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS6 0x0000023E /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS7 0x0000027E /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS8 0x000002BE /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS9 0x000002FE /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS10 0x0000033E /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS11 0x0000037E /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS12 0x000003BE /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS13 0x000003FE /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS14 0x0000043E /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESS15 0x0000047E /* ADMW_CORE Sensor Address */ +#define REG_CORE_DIGITAL_SENSOR_ADDRESSn(i) (REG_CORE_DIGITAL_SENSOR_ADDRESS0 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_ADDRESSn_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDSn_RESET 0x00000000 /* Reset Value for Digital_Sensor_Num_Cmds[n] */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS0_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS0 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS1_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS1 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS2_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS2 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS3_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS3 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS4_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS4 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS5_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS5 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS6_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS6 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS7_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS7 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS8_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS8 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS9_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS9 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS10_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS10 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS11_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS11 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS12_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS12 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS13_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS13 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS14_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS14 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS15_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_NUM_CMDS15 */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS0 0x000000BF /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS1 0x000000FF /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS2 0x0000013F /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS3 0x0000017F /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS4 0x000001BF /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS5 0x000001FF /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS6 0x0000023F /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS7 0x0000027F /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS8 0x000002BF /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS9 0x000002FF /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS10 0x0000033F /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS11 0x0000037F /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS12 0x000003BF /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS13 0x000003FF /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS14 0x0000043F /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDS15 0x0000047F /* ADMW_CORE Number of Configuration, Read Commands for Digital Sensors */ +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDSn(i) (REG_CORE_DIGITAL_SENSOR_NUM_CMDS0 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_NUM_CMDSn_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_COMMSn_RESET 0x00000006 /* Reset Value for Digital_Sensor_Comms[n] */ +#define REG_CORE_DIGITAL_SENSOR_COMMS0_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS0 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS1_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS2_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS3_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS4_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS5_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS6_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS7_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS8_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS8 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS9_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS9 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS10_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS10 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS11_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS11 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS12_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS12 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS13_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS13 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS14_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS14 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS15_RESET 0x00000006 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMS15 */ +#define REG_CORE_DIGITAL_SENSOR_COMMS0 0x000000C0 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS1 0x00000100 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS2 0x00000140 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS3 0x00000180 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS4 0x000001C0 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS5 0x00000200 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS6 0x00000240 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS7 0x00000280 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS8 0x000002C0 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS9 0x00000300 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS10 0x00000340 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS11 0x00000380 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS12 0x000003C0 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS13 0x00000400 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS14 0x00000440 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMS15 0x00000480 /* ADMW_CORE Digital Sensor Communication Clock Configuration */ +#define REG_CORE_DIGITAL_SENSOR_COMMSn(i) (REG_CORE_DIGITAL_SENSOR_COMMS0 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_COMMSn_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_COMMAND1n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command1[n] */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND10_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND10 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND11_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND11 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND12_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND12 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND13_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND13 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND14_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND14 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND15_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND15 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND16_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND16 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND17_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND17 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND18_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND18 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND19_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND19 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND110_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND110 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND111_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND111 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND112_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND112 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND113_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND113 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND114_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND114 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND115_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND115 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND10 0x000000C2 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND11 0x00000102 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND12 0x00000142 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND13 0x00000182 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND14 0x000001C2 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND15 0x00000202 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND16 0x00000242 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND17 0x00000282 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND18 0x000002C2 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND19 0x00000302 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND110 0x00000342 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND111 0x00000382 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND112 0x000003C2 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND113 0x00000402 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND114 0x00000442 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND115 0x00000482 /* ADMW_CORE Sensor Configuration Command1 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND1n(i) (REG_CORE_DIGITAL_SENSOR_COMMAND10 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_COMMAND1n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_COMMAND2n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command2[n] */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND20_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND20 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND21_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND21 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND22_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND22 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND23_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND23 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND24_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND24 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND25_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND25 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND26_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND26 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND27_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND27 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND28_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND28 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND29_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND29 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND210_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND210 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND211_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND211 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND212_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND212 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND213_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND213 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND214_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND214 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND215_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND215 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND20 0x000000C3 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND21 0x00000103 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND22 0x00000143 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND23 0x00000183 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND24 0x000001C3 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND25 0x00000203 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND26 0x00000243 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND27 0x00000283 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND28 0x000002C3 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND29 0x00000303 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND210 0x00000343 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND211 0x00000383 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND212 0x000003C3 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND213 0x00000403 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND214 0x00000443 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND215 0x00000483 /* ADMW_CORE Sensor Configuration Command2 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND2n(i) (REG_CORE_DIGITAL_SENSOR_COMMAND20 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_COMMAND2n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_COMMAND3n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command3[n] */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND30_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND30 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND31_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND31 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND32_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND32 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND33_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND33 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND34_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND34 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND35_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND35 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND36_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND36 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND37_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND37 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND38_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND38 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND39_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND39 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND310_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND310 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND311_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND311 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND312_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND312 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND313_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND313 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND314_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND314 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND315_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND315 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND30 0x000000C4 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND31 0x00000104 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND32 0x00000144 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND33 0x00000184 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND34 0x000001C4 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND35 0x00000204 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND36 0x00000244 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND37 0x00000284 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND38 0x000002C4 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND39 0x00000304 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND310 0x00000344 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND311 0x00000384 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND312 0x000003C4 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND313 0x00000404 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND314 0x00000444 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND315 0x00000484 /* ADMW_CORE Sensor Configuration Command3 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND3n(i) (REG_CORE_DIGITAL_SENSOR_COMMAND30 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_COMMAND3n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_COMMAND4n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command4[n] */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND40_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND40 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND41_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND41 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND42_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND42 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND43_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND43 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND44_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND44 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND45_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND45 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND46_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND46 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND47_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND47 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND48_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND48 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND49_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND49 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND410_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND410 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND411_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND411 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND412_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND412 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND413_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND413 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND414_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND414 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND415_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND415 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND40 0x000000C5 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND41 0x00000105 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND42 0x00000145 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND43 0x00000185 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND44 0x000001C5 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND45 0x00000205 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND46 0x00000245 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND47 0x00000285 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND48 0x000002C5 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND49 0x00000305 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND410 0x00000345 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND411 0x00000385 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND412 0x000003C5 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND413 0x00000405 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND414 0x00000445 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND415 0x00000485 /* ADMW_CORE Sensor Configuration Command4 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND4n(i) (REG_CORE_DIGITAL_SENSOR_COMMAND40 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_COMMAND4n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_COMMAND5n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command5[n] */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND50_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND50 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND51_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND51 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND52_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND52 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND53_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND53 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND54_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND54 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND55_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND55 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND56_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND56 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND57_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND57 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND58_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND58 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND59_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND59 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND510_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND510 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND511_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND511 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND512_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND512 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND513_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND513 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND514_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND514 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND515_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND515 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND50 0x000000C6 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND51 0x00000106 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND52 0x00000146 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND53 0x00000186 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND54 0x000001C6 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND55 0x00000206 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND56 0x00000246 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND57 0x00000286 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND58 0x000002C6 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND59 0x00000306 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND510 0x00000346 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND511 0x00000386 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND512 0x000003C6 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND513 0x00000406 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND514 0x00000446 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND515 0x00000486 /* ADMW_CORE Sensor Configuration Command5 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND5n(i) (REG_CORE_DIGITAL_SENSOR_COMMAND50 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_COMMAND5n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_COMMAND6n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command6[n] */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND60_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND60 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND61_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND61 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND62_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND62 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND63_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND63 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND64_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND64 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND65_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND65 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND66_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND66 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND67_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND67 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND68_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND68 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND69_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND69 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND610_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND610 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND611_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND611 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND612_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND612 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND613_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND613 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND614_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND614 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND615_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND615 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND60 0x000000C7 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND61 0x00000107 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND62 0x00000147 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND63 0x00000187 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND64 0x000001C7 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND65 0x00000207 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND66 0x00000247 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND67 0x00000287 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND68 0x000002C7 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND69 0x00000307 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND610 0x00000347 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND611 0x00000387 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND612 0x000003C7 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND613 0x00000407 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND614 0x00000447 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND615 0x00000487 /* ADMW_CORE Sensor Configuration Command6 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND6n(i) (REG_CORE_DIGITAL_SENSOR_COMMAND60 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_COMMAND6n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_COMMAND7n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Command7[n] */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND70_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND70 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND71_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND71 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND72_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND72 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND73_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND73 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND74_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND74 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND75_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND75 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND76_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND76 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND77_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND77 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND78_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND78 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND79_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND79 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND710_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND710 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND711_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND711 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND712_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND712 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND713_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND713 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND714_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND714 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND715_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_COMMAND715 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND70 0x000000C8 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND71 0x00000108 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND72 0x00000148 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND73 0x00000188 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND74 0x000001C8 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND75 0x00000208 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND76 0x00000248 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND77 0x00000288 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND78 0x000002C8 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND79 0x00000308 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND710 0x00000348 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND711 0x00000388 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND712 0x000003C8 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND713 0x00000408 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND714 0x00000448 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND715 0x00000488 /* ADMW_CORE Sensor Configuration Command7 */ +#define REG_CORE_DIGITAL_SENSOR_COMMAND7n(i) (REG_CORE_DIGITAL_SENSOR_COMMAND70 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_COMMAND7n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_READ_CMD1n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd1[n] */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD10_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD10 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD11_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD11 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD12_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD12 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD13_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD13 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD14_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD14 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD15_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD15 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD16_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD16 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD17_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD17 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD18_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD18 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD19_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD19 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD110_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD110 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD111_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD111 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD112_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD112 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD113_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD113 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD114_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD114 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD115_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD115 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD10 0x000000C9 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD11 0x00000109 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD12 0x00000149 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD13 0x00000189 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD14 0x000001C9 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD15 0x00000209 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD16 0x00000249 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD17 0x00000289 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD18 0x000002C9 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD19 0x00000309 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD110 0x00000349 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD111 0x00000389 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD112 0x000003C9 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD113 0x00000409 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD114 0x00000449 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD115 0x00000489 /* ADMW_CORE Sensor Read Command1 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD1n(i) (REG_CORE_DIGITAL_SENSOR_READ_CMD10 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_READ_CMD1n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_READ_CMD2n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd2[n] */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD20_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD20 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD21_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD21 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD22_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD22 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD23_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD23 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD24_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD24 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD25_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD25 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD26_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD26 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD27_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD27 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD28_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD28 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD29_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD29 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD210_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD210 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD211_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD211 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD212_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD212 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD213_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD213 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD214_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD214 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD215_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD215 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD20 0x000000CA /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD21 0x0000010A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD22 0x0000014A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD23 0x0000018A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD24 0x000001CA /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD25 0x0000020A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD26 0x0000024A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD27 0x0000028A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD28 0x000002CA /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD29 0x0000030A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD210 0x0000034A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD211 0x0000038A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD212 0x000003CA /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD213 0x0000040A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD214 0x0000044A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD215 0x0000048A /* ADMW_CORE Sensor Read Command2 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD2n(i) (REG_CORE_DIGITAL_SENSOR_READ_CMD20 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_READ_CMD2n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_READ_CMD3n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd3[n] */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD30_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD30 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD31_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD31 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD32_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD32 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD33_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD33 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD34_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD34 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD35_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD35 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD36_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD36 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD37_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD37 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD38_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD38 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD39_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD39 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD310_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD310 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD311_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD311 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD312_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD312 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD313_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD313 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD314_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD314 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD315_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD315 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD30 0x000000CB /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD31 0x0000010B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD32 0x0000014B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD33 0x0000018B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD34 0x000001CB /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD35 0x0000020B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD36 0x0000024B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD37 0x0000028B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD38 0x000002CB /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD39 0x0000030B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD310 0x0000034B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD311 0x0000038B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD312 0x000003CB /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD313 0x0000040B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD314 0x0000044B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD315 0x0000048B /* ADMW_CORE Sensor Read Command3 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD3n(i) (REG_CORE_DIGITAL_SENSOR_READ_CMD30 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_READ_CMD3n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_READ_CMD4n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd4[n] */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD40_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD40 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD41_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD41 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD42_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD42 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD43_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD43 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD44_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD44 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD45_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD45 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD46_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD46 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD47_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD47 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD48_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD48 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD49_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD49 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD410_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD410 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD411_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD411 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD412_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD412 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD413_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD413 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD414_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD414 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD415_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD415 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD40 0x000000CC /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD41 0x0000010C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD42 0x0000014C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD43 0x0000018C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD44 0x000001CC /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD45 0x0000020C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD46 0x0000024C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD47 0x0000028C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD48 0x000002CC /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD49 0x0000030C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD410 0x0000034C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD411 0x0000038C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD412 0x000003CC /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD413 0x0000040C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD414 0x0000044C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD415 0x0000048C /* ADMW_CORE Sensor Read Command4 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD4n(i) (REG_CORE_DIGITAL_SENSOR_READ_CMD40 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_READ_CMD4n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_READ_CMD5n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd5[n] */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD50_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD50 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD51_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD51 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD52_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD52 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD53_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD53 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD54_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD54 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD55_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD55 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD56_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD56 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD57_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD57 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD58_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD58 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD59_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD59 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD510_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD510 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD511_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD511 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD512_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD512 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD513_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD513 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD514_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD514 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD515_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD515 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD50 0x000000CD /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD51 0x0000010D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD52 0x0000014D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD53 0x0000018D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD54 0x000001CD /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD55 0x0000020D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD56 0x0000024D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD57 0x0000028D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD58 0x000002CD /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD59 0x0000030D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD510 0x0000034D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD511 0x0000038D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD512 0x000003CD /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD513 0x0000040D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD514 0x0000044D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD515 0x0000048D /* ADMW_CORE Sensor Read Command5 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD5n(i) (REG_CORE_DIGITAL_SENSOR_READ_CMD50 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_READ_CMD5n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_READ_CMD6n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd6[n] */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD60_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD60 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD61_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD61 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD62_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD62 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD63_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD63 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD64_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD64 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD65_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD65 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD66_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD66 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD67_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD67 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD68_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD68 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD69_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD69 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD610_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD610 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD611_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD611 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD612_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD612 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD613_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD613 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD614_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD614 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD615_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD615 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD60 0x000000CE /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD61 0x0000010E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD62 0x0000014E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD63 0x0000018E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD64 0x000001CE /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD65 0x0000020E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD66 0x0000024E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD67 0x0000028E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD68 0x000002CE /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD69 0x0000030E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD610 0x0000034E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD611 0x0000038E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD612 0x000003CE /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD613 0x0000040E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD614 0x0000044E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD615 0x0000048E /* ADMW_CORE Sensor Read Command6 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD6n(i) (REG_CORE_DIGITAL_SENSOR_READ_CMD60 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_READ_CMD6n_COUNT 16 +#define REG_CORE_DIGITAL_SENSOR_READ_CMD7n_RESET 0x00000000 /* Reset Value for Digital_Sensor_Read_Cmd7[n] */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD70_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD70 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD71_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD71 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD72_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD72 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD73_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD73 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD74_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD74 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD75_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD75 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD76_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD76 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD77_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD77 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD78_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD78 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD79_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD79 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD710_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD710 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD711_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD711 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD712_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD712 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD713_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD713 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD714_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD714 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD715_RESET 0x00000000 /* Reset Value for REG_CORE_DIGITAL_SENSOR_READ_CMD715 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD70 0x000000CF /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD71 0x0000010F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD72 0x0000014F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD73 0x0000018F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD74 0x000001CF /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD75 0x0000020F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD76 0x0000024F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD77 0x0000028F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD78 0x000002CF /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD79 0x0000030F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD710 0x0000034F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD711 0x0000038F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD712 0x000003CF /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD713 0x0000040F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD714 0x0000044F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD715 0x0000048F /* ADMW_CORE Sensor Read Command7 */ +#define REG_CORE_DIGITAL_SENSOR_READ_CMD7n(i) (REG_CORE_DIGITAL_SENSOR_READ_CMD70 + ((i) * 64)) +#define REG_CORE_DIGITAL_SENSOR_READ_CMD7n_COUNT 16 + +/* ============================================================================================================================ + ADMW_CORE Register BitMasks, Positions & Enumerations + ============================================================================================================================ */ +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_COMMAND Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_COMMAND_SPECIAL_COMMAND 0 /* Special Command */ +#define BITM_CORE_COMMAND_SPECIAL_COMMAND 0x000000FF /* Special Command */ +#define ENUM_CORE_COMMAND_NOP 0x00000000 /* Special_Command: No Command */ +#define ENUM_CORE_COMMAND_CONVERT 0x00000001 /* Special_Command: Start ADC Conversions */ +#define ENUM_CORE_COMMAND_CONVERT_WITH_RAW 0x00000002 /* Special_Command: Start Conversions with Added RAW ADC Data */ +#define ENUM_CORE_COMMAND_RUN_DIAGNOSTICS 0x00000003 /* Special_Command: Initiate a Diagnostics Cycle */ +#define ENUM_CORE_COMMAND_SELF_CALIBRATION 0x00000004 /* Special_Command: Initiate a Self-Calibration Cycle */ +#define ENUM_CORE_COMMAND_LATCH_CONFIG 0x00000007 /* Special_Command: Latch Configuration. */ +#define ENUM_CORE_COMMAND_LOAD_LUT 0x00000008 /* Special_Command: Load LUT from FLASH */ +#define ENUM_CORE_COMMAND_SAVE_LUT 0x00000009 /* Special_Command: Save LUT to FLASH */ +#define ENUM_CORE_COMMAND_SYSTEM_CHECK 0x0000000A /* Special_Command: Full Suite of Measurement Diagnostics */ +#define ENUM_CORE_COMMAND_CONVERT_FFT 0x0000000B /* Special_Command: Perform FFTs on Selected Channel(s) */ +#define ENUM_CORE_COMMAND_ERASE_EXTERNAL_FLASH 0x00000010 /* Special_Command: Erase Contents of External Flash */ +#define ENUM_CORE_COMMAND_POWER_DOWN 0x00000014 /* Special_Command: Enter Low Power State */ +#define ENUM_CORE_COMMAND_LOAD_CONFIG_1 0x00000018 /* Special_Command: Load Registers with Configuration#1 from FLASH */ +#define ENUM_CORE_COMMAND_SAVE_CONFIG_1 0x00000019 /* Special_Command: Store Current Registers to FLASH Configuration#1 */ +#define ENUM_CORE_COMMAND_LOAD_CONFIG_2 0x0000001A /* Special_Command: Load Registers with Configuration#2 from FLASH */ +#define ENUM_CORE_COMMAND_SAVE_CONFIG_2 0x0000001B /* Special_Command: Store Current Registers to FLASH Configuration#2 */ +#define ENUM_CORE_COMMAND_LOAD_CONFIG_3 0x0000001C /* Special_Command: Load Registers with Configuration#3 from FLASH */ +#define ENUM_CORE_COMMAND_SAVE_CONFIG_3 0x0000001D /* Special_Command: Store Current Registers to FLASH Configuration#3 */ +#define ENUM_CORE_COMMAND_LOAD_CONFIG_4 0x0000001E /* Special_Command: Load Registers with Configuration#4 from FLASH */ +#define ENUM_CORE_COMMAND_SAVE_CONFIG_4 0x0000001F /* Special_Command: Store Current Registers to FLASH Configuration#4 */ +#define ENUM_CORE_COMMAND_CALIBRATE_DIGITAL 0x00000020 /* Special_Command: Performs a Calibration of Digital Sensor, if Supported & Enabled. */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_MODE Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_MODE_EXT_FLASH_STORE 7 /* Indicates If Measurement Data Should Be Stored in Flash */ +#define BITP_CORE_MODE_FFT_MODE 5 /* Indicates Single or Multiple Sequence of FFTs */ +#define BITP_CORE_MODE_CALIBRATION_METHOD 4 /* Indicates If Calibration is Required on 'Latch' Command */ +#define BITP_CORE_MODE_DRDY_MODE 2 /* Indicates Behavior of DRDY with Respect to FIFO State */ +#define BITP_CORE_MODE_CONVERSION_MODE 0 /* Conversion Mode */ +#define BITM_CORE_MODE_EXT_FLASH_STORE 0x00000080 /* Indicates If Measurement Data Should Be Stored in Flash */ +#define BITM_CORE_MODE_FFT_MODE 0x00000020 /* Indicates Single or Multiple Sequence of FFTs */ +#define BITM_CORE_MODE_CALIBRATION_METHOD 0x00000010 /* Indicates If Calibration is Required on 'Latch' Command */ +#define BITM_CORE_MODE_DRDY_MODE 0x0000000C /* Indicates Behavior of DRDY with Respect to FIFO State */ +#define BITM_CORE_MODE_CONVERSION_MODE 0x00000003 /* Conversion Mode */ +#define ENUM_CORE_MODE_EXT_FLASH_NOT_USED 0x00000000 /* Ext_Flash_Store: Do Not Use External Flash */ +#define ENUM_CORE_MODE_EXT_FLASH_USED 0x00000080 /* Ext_Flash_Store: Use External Flash */ +#define ENUM_CORE_MODE_FFT_MODE_SINGLE 0x00000000 /* FFT_Mode: Perform Single Sequence of FFT(s) on Selected Channel(s) */ +#define ENUM_CORE_MODE_FFT_MODE_CONTINUOUS 0x00000020 /* FFT_Mode: Perform Continuous Sequence of FFTs on Selected Channel(s) */ +#define ENUM_CORE_MODE_NO_CAL 0x00000000 /* Calibration_Method: No Calibration Performed */ +#define ENUM_CORE_MODE_DO_CAL 0x00000010 /* Calibration_Method: Calibration Performed */ +#define ENUM_CORE_MODE_DRDY_PER_CONVERSION 0x00000000 /* Drdy_Mode: Data Ready Per Conversion */ +#define ENUM_CORE_MODE_DRDY_PER_CYCLE 0x00000004 /* Drdy_Mode: Data Ready Per Cycle */ +#define ENUM_CORE_MODE_DRDY_PER_FIFO_FILL 0x00000008 /* Drdy_Mode: Data Ready Per FIFO Fill / Multi-Cycle Burst */ +#define ENUM_CORE_MODE_SINGLECYCLE 0x00000000 /* Conversion_Mode: Single Cycle */ +#define ENUM_CORE_MODE_MULTICYCLE 0x00000001 /* Conversion_Mode: Multi Cycle */ +#define ENUM_CORE_MODE_CONTINUOUS 0x00000002 /* Conversion_Mode: Continuous Conversion */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_POWER_CONFIG Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_POWER_CONFIG_POWER_MODE_ADC 0 /* ADC Power Mode */ +#define BITM_CORE_POWER_CONFIG_POWER_MODE_ADC 0x00000003 /* ADC Power Mode */ +#define ENUM_CORE_POWER_CONFIG_ADC_LOW_POWER 0x00000000 /* Power_Mode_ADC: ADC Low Power Mode */ +#define ENUM_CORE_POWER_CONFIG_ADC_MID_POWER 0x00000001 /* Power_Mode_ADC: ADC Mid Power Mode */ +#define ENUM_CORE_POWER_CONFIG_ADC_FULL_POWER 0x00000002 /* Power_Mode_ADC: ADC Full Power Mode */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_CYCLE_CONTROL Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_CYCLE_CONTROL_CYCLE_TIME_UNITS 14 /* Units for Cycle Time */ +#define BITP_CORE_CYCLE_CONTROL_FILTER_SETTLING 13 /* Determines ADC Filter Settling in a Multi-Channel Sequence */ +#define BITP_CORE_CYCLE_CONTROL_CYCLE_TYPE 12 /* Type of Measurement Cycle */ +#define BITP_CORE_CYCLE_CONTROL_CYCLE_TIME 0 /* Duration of a Full Measurement Cycle */ +#define BITM_CORE_CYCLE_CONTROL_CYCLE_TIME_UNITS 0x0000C000 /* Units for Cycle Time */ +#define BITM_CORE_CYCLE_CONTROL_FILTER_SETTLING 0x00002000 /* Determines ADC Filter Settling in a Multi-Channel Sequence */ +#define BITM_CORE_CYCLE_CONTROL_CYCLE_TYPE 0x00001000 /* Type of Measurement Cycle */ +#define BITM_CORE_CYCLE_CONTROL_CYCLE_TIME 0x00000FFF /* Duration of a Full Measurement Cycle */ +#define ENUM_CORE_CYCLE_CONTROL_MICROSECONDS 0x00000000 /* Cycle_Time_Units: Micro-Seconds */ +#define ENUM_CORE_CYCLE_CONTROL_MILLISECONDS 0x00004000 /* Cycle_Time_Units: Milli-Seconds */ +#define ENUM_CORE_CYCLE_CONTROL_SECONDS 0x00008000 /* Cycle_Time_Units: Seconds */ +#define ENUM_CORE_CYCLE_CONTROL_FILTER_SETTLING_SETTLED 0x00000000 /* Filter_Settling: ADC Result Fully Settles for Every Output */ +#define ENUM_CORE_CYCLE_CONTROL_FILTER_SETTLING_FAST 0x00002000 /* Filter_Settling: ADC Result Appears at Higher Update Rate for Consecutive Conversions */ +#define ENUM_CORE_CYCLE_CONTROL_CYCLE_TYPE_SWITCH 0x00000000 /* Cycle_Type: Switch Channels After Every Conversion */ +#define ENUM_CORE_CYCLE_CONTROL_CYCLE_TYPE_FULL 0x00001000 /* Cycle_Type: Perform Full Number Of Conversions On A Channel Consecutively */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_FIFO_NUM_CYCLES Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_FIFO_NUM_CYCLES_FIFO_NUM_CYCLES 0 /* How Many Cycles to Fill FIFO */ +#define BITM_CORE_FIFO_NUM_CYCLES_FIFO_NUM_CYCLES 0x000000FF /* How Many Cycles to Fill FIFO */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_MULTI_CYCLE_REPEAT_INTERVAL Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_MULTI_CYCLE_REPEAT_INTERVAL_MULTI_CYCLE_REPEAT_INTERVAL 0 /* Defines Time Between Repetitions of Measurement Cycles. */ +#define BITM_CORE_MULTI_CYCLE_REPEAT_INTERVAL_MULTI_CYCLE_REPEAT_INTERVAL 0x00FFFFFF /* Defines Time Between Repetitions of Measurement Cycles. */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_STATUS Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_STATUS_FIFO_ERROR 5 /* Indicates Error with FIFO */ +#define BITP_CORE_STATUS_CMD_RUNNING 4 /* Indicates a Special Command is Active */ +#define BITP_CORE_STATUS_DRDY 3 /* Indicates a New Sensor Result is Available to Be Read */ +#define BITP_CORE_STATUS_ERROR 2 /* Indicates an Error */ +#define BITP_CORE_STATUS_ALERT_ACTIVE 1 /* Indicates One or More Sensors Alerts are Active */ +#define BITM_CORE_STATUS_FIFO_ERROR 0x00000020 /* Indicates Error with FIFO */ +#define BITM_CORE_STATUS_CMD_RUNNING 0x00000010 /* Indicates a Special Command is Active */ +#define BITM_CORE_STATUS_DRDY 0x00000008 /* Indicates a New Sensor Result is Available to Be Read */ +#define BITM_CORE_STATUS_ERROR 0x00000004 /* Indicates an Error */ +#define BITM_CORE_STATUS_ALERT_ACTIVE 0x00000002 /* Indicates One or More Sensors Alerts are Active */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIAGNOSTICS_STATUS Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIAGNOSTICS_STATUS_DIAG_CALIBRATION_ERROR 13 /* Indicates Error During Internal Device Calibrations */ +#define BITP_CORE_DIAGNOSTICS_STATUS_DIAG_CONVERSION_ERROR 12 /* Indicates Error During Internal ADC Conversions */ +#define BITP_CORE_DIAGNOSTICS_STATUS_DIAG_SUPPLY_CAP_ERROR 3 /* Indicates Fault on Internal Supply Regulator Capacitor */ +#define BITP_CORE_DIAGNOSTICS_STATUS_DIAG_SUPPLY_MONITOR_ERROR 2 /* Indicates Low Voltage on Internal Supply Voltages */ +#define BITP_CORE_DIAGNOSTICS_STATUS_DIAG_COMMS_ERROR 1 /* Indicates Error on Internal Device Communications */ +#define BITP_CORE_DIAGNOSTICS_STATUS_DIAG_CHECKSUM_ERROR 0 /* Indicates Error on Internal Checksum Calculations */ +#define BITM_CORE_DIAGNOSTICS_STATUS_DIAG_CALIBRATION_ERROR 0x00002000 /* Indicates Error During Internal Device Calibrations */ +#define BITM_CORE_DIAGNOSTICS_STATUS_DIAG_CONVERSION_ERROR 0x00001000 /* Indicates Error During Internal ADC Conversions */ +#define BITM_CORE_DIAGNOSTICS_STATUS_DIAG_SUPPLY_CAP_ERROR 0x00000008 /* Indicates Fault on Internal Supply Regulator Capacitor */ +#define BITM_CORE_DIAGNOSTICS_STATUS_DIAG_SUPPLY_MONITOR_ERROR 0x00000004 /* Indicates Low Voltage on Internal Supply Voltages */ +#define BITM_CORE_DIAGNOSTICS_STATUS_DIAG_COMMS_ERROR 0x00000002 /* Indicates Error on Internal Device Communications */ +#define BITM_CORE_DIAGNOSTICS_STATUS_DIAG_CHECKSUM_ERROR 0x00000001 /* Indicates Error on Internal Checksum Calculations */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_CHANNEL_ALERT_STATUS Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH15 15 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH14 14 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH13 13 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH12 12 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH11 11 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH10 10 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH9 9 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH8 8 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH7 7 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH6 6 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH5 5 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH4 4 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH3 3 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH2 2 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH1 1 /* Indicates Channel Alert is Active */ +#define BITP_CORE_CHANNEL_ALERT_STATUS_ALERT_CH0 0 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH15 0x00008000 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH14 0x00004000 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH13 0x00002000 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH12 0x00001000 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH11 0x00000800 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH10 0x00000400 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH9 0x00000200 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH8 0x00000100 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH7 0x00000080 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH6 0x00000040 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH5 0x00000020 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH4 0x00000010 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH3 0x00000008 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH2 0x00000004 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH1 0x00000002 /* Indicates Channel Alert is Active */ +#define BITM_CORE_CHANNEL_ALERT_STATUS_ALERT_CH0 0x00000001 /* Indicates Channel Alert is Active */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_ALERT_STATUS_2 Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_ALERT_STATUS_2_EXT_FLASH_ERROR 7 /* Indicates with External Flash Memory */ +#define BITP_CORE_ALERT_STATUS_2_TEMPERATURE_ALARM_LO 6 /* Indicates Device Temperature Low Alarm */ +#define BITP_CORE_ALERT_STATUS_2_TEMPERATURE_ALARM_HI 5 /* Indicates Device Temperature High Alarm */ +#define BITP_CORE_ALERT_STATUS_2_TEMPERATURE_ALERT_LO 4 /* Indicates Device Temperature Low Alert */ +#define BITP_CORE_ALERT_STATUS_2_TEMPERATURE_ALERT_HI 3 /* Indicates Device Temperature High Alert */ +#define BITP_CORE_ALERT_STATUS_2_CONFIGURATION_ERROR 2 /* Indicates Error with Programmed Configuration */ +#define BITP_CORE_ALERT_STATUS_2_LUT_ERROR 1 /* Indicates Error with One or More Look-Up-Tables */ +#define BITM_CORE_ALERT_STATUS_2_EXT_FLASH_ERROR 0x00000080 /* Indicates with External Flash Memory */ +#define BITM_CORE_ALERT_STATUS_2_TEMPERATURE_ALARM_LO 0x00000040 /* Indicates Device Temperature Low Alarm */ +#define BITM_CORE_ALERT_STATUS_2_TEMPERATURE_ALARM_HI 0x00000020 /* Indicates Device Temperature High Alarm */ +#define BITM_CORE_ALERT_STATUS_2_TEMPERATURE_ALERT_LO 0x00000010 /* Indicates Device Temperature Low Alert */ +#define BITM_CORE_ALERT_STATUS_2_TEMPERATURE_ALERT_HI 0x00000008 /* Indicates Device Temperature High Alert */ +#define BITM_CORE_ALERT_STATUS_2_CONFIGURATION_ERROR 0x00000004 /* Indicates Error with Programmed Configuration */ +#define BITM_CORE_ALERT_STATUS_2_LUT_ERROR 0x00000002 /* Indicates Error with One or More Look-Up-Tables */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_ALERT_DETAIL_CH[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_ALERT_DETAIL_CH_COMP_NOT_READY 15 /* Indicates Compensation Channel Not Ready When Required */ +#define BITP_CORE_ALERT_DETAIL_CH_SENSOR_NOT_READY 14 /* Indicates Digital Sensor Not Ready When Read */ +#define BITP_CORE_ALERT_DETAIL_CH_CORRECTION_OVERRANGE 13 /* Indicates Result Larger Than LUT/Equation Range */ +#define BITP_CORE_ALERT_DETAIL_CH_CORRECTION_UNDERRANGE 12 /* Indicates Result Less Than LUT/Equation Range */ +#define BITP_CORE_ALERT_DETAIL_CH_OVER_VOLTAGE 11 /* Indicates Channel Over-Voltage */ +#define BITP_CORE_ALERT_DETAIL_CH_UNDER_VOLTAGE 10 /* Indicates Channel Under-Voltage */ +#define BITP_CORE_ALERT_DETAIL_CH_LUT_ERROR_CH 9 /* Indicates Error with Channel Look-Up-Table */ +#define BITP_CORE_ALERT_DETAIL_CH_CONFIG_ERR 8 /* Indicates Configuration Error on Channel */ +#define BITP_CORE_ALERT_DETAIL_CH_CALIBRATION_INVALID 7 /* Indicates Problem During Calibration of Channel */ +#define BITP_CORE_ALERT_DETAIL_CH_REF_DETECT 6 /* Indicates Whether ADC Reference is Valid */ +#define BITP_CORE_ALERT_DETAIL_CH_SENSOR_OPEN 5 /* Indicates Sensor Input is Open Circuit */ +#define BITP_CORE_ALERT_DETAIL_CH_HIGH_LIMIT 4 /* Indicates Sensor Result is Greater Than High Limit */ +#define BITP_CORE_ALERT_DETAIL_CH_LOW_LIMIT 3 /* Indicates Sensor Result is Less Than Low Limit */ +#define BITP_CORE_ALERT_DETAIL_CH_OVER_RANGE 2 /* Indicates Channel Over-Range */ +#define BITP_CORE_ALERT_DETAIL_CH_UNDER_RANGE 1 /* Indicates Channel Under-Range */ +#define BITP_CORE_ALERT_DETAIL_CH_TIME_OUT 0 /* Indicates Time-Out Error from Digital Sensor */ +#define BITM_CORE_ALERT_DETAIL_CH_COMP_NOT_READY 0x00008000 /* Indicates Compensation Channel Not Ready When Required */ +#define BITM_CORE_ALERT_DETAIL_CH_SENSOR_NOT_READY 0x00004000 /* Indicates Digital Sensor Not Ready When Read */ +#define BITM_CORE_ALERT_DETAIL_CH_CORRECTION_OVERRANGE 0x00002000 /* Indicates Result Larger Than LUT/Equation Range */ +#define BITM_CORE_ALERT_DETAIL_CH_CORRECTION_UNDERRANGE 0x00001000 /* Indicates Result Less Than LUT/Equation Range */ +#define BITM_CORE_ALERT_DETAIL_CH_OVER_VOLTAGE 0x00000800 /* Indicates Channel Over-Voltage */ +#define BITM_CORE_ALERT_DETAIL_CH_UNDER_VOLTAGE 0x00000400 /* Indicates Channel Under-Voltage */ +#define BITM_CORE_ALERT_DETAIL_CH_LUT_ERROR_CH 0x00000200 /* Indicates Error with Channel Look-Up-Table */ +#define BITM_CORE_ALERT_DETAIL_CH_CONFIG_ERR 0x00000100 /* Indicates Configuration Error on Channel */ +#define BITM_CORE_ALERT_DETAIL_CH_CALIBRATION_INVALID 0x00000080 /* Indicates Problem During Calibration of Channel */ +#define BITM_CORE_ALERT_DETAIL_CH_REF_DETECT 0x00000040 /* Indicates Whether ADC Reference is Valid */ +#define BITM_CORE_ALERT_DETAIL_CH_SENSOR_OPEN 0x00000020 /* Indicates Sensor Input is Open Circuit */ +#define BITM_CORE_ALERT_DETAIL_CH_HIGH_LIMIT 0x00000010 /* Indicates Sensor Result is Greater Than High Limit */ +#define BITM_CORE_ALERT_DETAIL_CH_LOW_LIMIT 0x00000008 /* Indicates Sensor Result is Less Than Low Limit */ +#define BITM_CORE_ALERT_DETAIL_CH_OVER_RANGE 0x00000004 /* Indicates Channel Over-Range */ +#define BITM_CORE_ALERT_DETAIL_CH_UNDER_RANGE 0x00000002 /* Indicates Channel Under-Range */ +#define BITM_CORE_ALERT_DETAIL_CH_TIME_OUT 0x00000001 /* Indicates Time-Out Error from Digital Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_ERROR_CODE Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_ERROR_CODE_ERROR_CODE 0 /* Code Indicating Type of Error */ +#define BITM_CORE_ERROR_CODE_ERROR_CODE 0x0000FFFF /* Code Indicating Type of Error */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_ALERT_CODE Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_ALERT_CODE_ALERT_CODE 0 /* Code Indicating Type of Alert */ +#define BITM_CORE_ALERT_CODE_ALERT_CODE 0x0000FFFF /* Code Indicating Type of Alert */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_EXTERNAL_REFERENCE1 Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_EXTERNAL_REFERENCE1_EXT_REFIN1_VALUE 0 /* Refin1 Value */ +#define BITM_CORE_EXTERNAL_REFERENCE1_EXT_REFIN1_VALUE 0xFFFFFFFF /* Refin1 Value */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_EXTERNAL_REFERENCE2 Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_EXTERNAL_REFERENCE2_EXT_REFIN2_VALUE 0 /* Refin2 Value */ +#define BITM_CORE_EXTERNAL_REFERENCE2_EXT_REFIN2_VALUE 0xFFFFFFFF /* Refin2 Value */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIAGNOSTICS_CONTROL Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIAGNOSTICS_CONTROL_TEMPERARURE_ALARM_ACTION 4 /* Determines Output in Response to Temperature Alarm */ +#define BITP_CORE_DIAGNOSTICS_CONTROL_DIAG_OSD_FREQ 2 /* Diagnostics Open Sensor Detect Frequency */ +#define BITP_CORE_DIAGNOSTICS_CONTROL_DIAG_MEAS_EN 1 /* Diagnostics Measure Enable */ +#define BITP_CORE_DIAGNOSTICS_CONTROL_DIAG_GLOBAL_EN 0 /* Diagnostics Global Enable */ +#define BITM_CORE_DIAGNOSTICS_CONTROL_TEMPERARURE_ALARM_ACTION 0x00000010 /* Determines Output in Response to Temperature Alarm */ +#define BITM_CORE_DIAGNOSTICS_CONTROL_DIAG_OSD_FREQ 0x0000000C /* Diagnostics Open Sensor Detect Frequency */ +#define BITM_CORE_DIAGNOSTICS_CONTROL_DIAG_MEAS_EN 0x00000002 /* Diagnostics Measure Enable */ +#define BITM_CORE_DIAGNOSTICS_CONTROL_DIAG_GLOBAL_EN 0x00000001 /* Diagnostics Global Enable */ +#define ENUM_CORE_DIAGNOSTICS_CONTROL_TEMPERATURE_ALARM_NAN 0x00000000 /* Temperarure_Alarm_Action: Sensor Output Equals Not-A-Number in Response to Temperature Alarm */ +#define ENUM_CORE_DIAGNOSTICS_CONTROL_TEMPERATURE_ALARM_OUTPUT_ACTIVE 0x00000010 /* Temperarure_Alarm_Action: Sensor Output is not Clamped to Not-A-Number in Response to Temperature Alarm */ +#define ENUM_CORE_DIAGNOSTICS_CONTROL_OCD_OFF 0x00000000 /* Diag_OSD_Freq: No Open-Circuit Detection During Measurement */ +#define ENUM_CORE_DIAGNOSTICS_CONTROL_OCD_PER_1_CYCLE 0x00000004 /* Diag_OSD_Freq: Open-Circuit Detection Performed Once Per Measurement Cycle */ +#define ENUM_CORE_DIAGNOSTICS_CONTROL_OCD_PER_100_CYCLES 0x00000008 /* Diag_OSD_Freq: Open-Circuit Detection Performed Once Per Hundred Measurement Cycles */ +#define ENUM_CORE_DIAGNOSTICS_CONTROL_OCD_PER_1000_CYCLES 0x0000000C /* Diag_OSD_Freq: Open-Circuit Detection Performed Once Per Thousand Measurement Cycles */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DATA_FIFO Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DATA_FIFO_DATA_FIFO 0 /* Fifo Buffer of Sensor Results */ +#define BITM_CORE_DATA_FIFO_DATA_FIFO 0x000000FF /* Fifo Buffer of Sensor Results */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DEBUG_CODE Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DEBUG_CODE_DEBUG_CODE 0 /* Additional Information on Source of Alert or Errors */ +#define BITM_CORE_DEBUG_CODE_DEBUG_CODE 0xFFFFFFFF /* Additional Information on Source of Alert or Errors */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_FFT_CONFIG Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_FFT_CONFIG_FFT_NUM_CHANNELS 6 /* Indicates Number of Channels for FFT */ +#define BITP_CORE_FFT_CONFIG_FFT_OUTPUT 4 /* Indicates FFT Output Format */ +#define BITP_CORE_FFT_CONFIG_FFT_WINDOW 2 /* Indicates Window Type for FFT */ +#define BITP_CORE_FFT_CONFIG_FFT_NUM_BINS 0 /* Indicates Number of Bins in FFT */ +#define BITM_CORE_FFT_CONFIG_FFT_NUM_CHANNELS 0x000000C0 /* Indicates Number of Channels for FFT */ +#define BITM_CORE_FFT_CONFIG_FFT_OUTPUT 0x00000030 /* Indicates FFT Output Format */ +#define BITM_CORE_FFT_CONFIG_FFT_WINDOW 0x0000000C /* Indicates Window Type for FFT */ +#define BITM_CORE_FFT_CONFIG_FFT_NUM_BINS 0x00000003 /* Indicates Number of Bins in FFT */ +#define ENUM_CORE_FFT_CONFIG_FFT_CHANS_1 0x00000000 /* FFT_Num_Channels: One FFT Channel */ +#define ENUM_CORE_FFT_CONFIG_FFT_CHANS_2 0x00000040 /* FFT_Num_Channels: Two FFT Channels */ +#define ENUM_CORE_FFT_CONFIG_FFT_CHANS_3 0x00000080 /* FFT_Num_Channels: Three FFT Channels */ +#define ENUM_CORE_FFT_CONFIG_FFT_CHANS_4 0x000000C0 /* FFT_Num_Channels: Four FFT Channels */ +#define ENUM_CORE_FFT_CONFIG_FFT_OUTPUT_FULL 0x00000000 /* FFT_Output: N/2-Term Amplitude Response */ +#define ENUM_CORE_FFT_CONFIG_FFT_OUTPUT_MAX16 0x00000010 /* FFT_Output: Bin-Number and Amplitude of 16 Highest Peaks of Amplitude Response */ +#define ENUM_CORE_FFT_CONFIG_FFT_OUTPUT_FULL_WITH_RAW 0x00000020 /* FFT_Output: N/2-Term Amplitude Response Plus N Raw ADC Samples */ +#define ENUM_CORE_FFT_CONFIG_FFT_WINDOW_NONE 0x00000000 /* FFT_Window: No Window */ +#define ENUM_CORE_FFT_CONFIG_FFT_WINDOW_HANN 0x00000004 /* FFT_Window: Hann Window */ +#define ENUM_CORE_FFT_CONFIG_FFT_WINDOW_BLACKMANN_HARRIS 0x00000008 /* FFT_Window: Blackman-Harris-Nuttall Window */ +#define ENUM_CORE_FFT_CONFIG_FFT_WINDOW_TBD 0x0000000C /* FFT_Window: Reserved */ +#define ENUM_CORE_FFT_CONFIG_FFT_BINS_256 0x00000000 /* FFT_Num_Bins: FFT Size 256 */ +#define ENUM_CORE_FFT_CONFIG_FFT_BINS_512 0x00000001 /* FFT_Num_Bins: FFT Size 512 */ +#define ENUM_CORE_FFT_CONFIG_FFT_BINS_1024 0x00000002 /* FFT_Num_Bins: FFT Size 1024 */ +#define ENUM_CORE_FFT_CONFIG_FFT_BINS_2048 0x00000003 /* FFT_Num_Bins: FFT Size 2048 */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_ADVANCED_SENSOR_ACCESS Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_ADVANCED_SENSOR_ACCESS_ADVANCED_SENSOR_ACCESS 0 /* Write Specific Key Value to Access Advanced Sensors */ +#define BITM_CORE_ADVANCED_SENSOR_ACCESS_ADVANCED_SENSOR_ACCESS 0x0000FFFF /* Write Specific Key Value to Access Advanced Sensors */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_LUT_SELECT Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_LUT_SELECT_LUT_RW 7 /* Read or Write LUT Data */ +#define BITM_CORE_LUT_SELECT_LUT_RW 0x00000080 /* Read or Write LUT Data */ +#define ENUM_CORE_LUT_SELECT_LUT_READ 0x00000000 /* LUT_RW: Read Addressed LUT Data */ +#define ENUM_CORE_LUT_SELECT_LUT_WRITE 0x00000080 /* LUT_RW: Write Addressed LUT Data */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_LUT_OFFSET Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_LUT_OFFSET_LUT_OFFSET 0 /* Offset into Look-Up-Table */ +#define BITM_CORE_LUT_OFFSET_LUT_OFFSET 0x00003FFF /* Offset into Look-Up-Table */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_LUT_DATA Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_LUT_DATA_LUT_DATA 0 /* Data Byte to Write to / Read from Look-Up-Table */ +#define BITM_CORE_LUT_DATA_LUT_DATA 0x000000FF /* Data Byte to Write to / Read from Look-Up-Table */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_EXT_FLASH_INDEX Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_EXT_FLASH_INDEX_EXT_FLASH_INDEX 0 /* Start Position (Sample No.) for Retrieval of Ext. Flash Data */ +#define BITM_CORE_EXT_FLASH_INDEX_EXT_FLASH_INDEX 0xFFFFFFFF /* Start Position (Sample No.) for Retrieval of Ext. Flash Data */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_EXT_FLASH_SAMPLE_COUNT Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_EXT_FLASH_SAMPLE_COUNT_EXT_FLASH_SAMPLE_COUNT 0 /* Indicates How Many Samples Stored in External Flash */ +#define BITM_CORE_EXT_FLASH_SAMPLE_COUNT_EXT_FLASH_SAMPLE_COUNT 0xFFFFFFFF /* Indicates How Many Samples Stored in External Flash */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_EXT_FLASH_DATA Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_EXT_FLASH_DATA_EXT_FLASH_DATA 0 /* Data Read Back from External Flash */ +#define BITM_CORE_EXT_FLASH_DATA_EXT_FLASH_DATA 0x000000FF /* Data Read Back from External Flash */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_REVISION Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_REVISION_REV_MAJOR 24 /* Major Revision Information */ +#define BITP_CORE_REVISION_REV_MINOR 16 /* Minor Revision Information */ +#define BITP_CORE_REVISION_REV_PATCH 0 /* Patch Revision Information */ +#define BITM_CORE_REVISION_REV_MAJOR 0xFF000000 /* Major Revision Information */ +#define BITM_CORE_REVISION_REV_MINOR 0x00FF0000 /* Minor Revision Information */ +#define BITM_CORE_REVISION_REV_PATCH 0x0000FFFF /* Patch Revision Information */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_CHANNEL_COUNT[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_CHANNEL_COUNT_CHANNEL_ENABLE 7 /* Enable Channel in Measurement Cycle */ +#define BITP_CORE_CHANNEL_COUNT_CHANNEL_COUNT 0 /* How Many Times Channel Should Appear in One Cycle */ +#define BITM_CORE_CHANNEL_COUNT_CHANNEL_ENABLE 0x00000080 /* Enable Channel in Measurement Cycle */ +#define BITM_CORE_CHANNEL_COUNT_CHANNEL_COUNT 0x0000007F /* How Many Times Channel Should Appear in One Cycle */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_CHANNEL_OPTIONS[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_CHANNEL_OPTIONS_FFT_ENABLE_CH 7 /* Indicates Channel to Be Used for FFT */ +#define BITP_CORE_CHANNEL_OPTIONS_CHANNEL_PRIORITY 0 /* Indicates Priority or Position of This Channel in Sequence */ +#define BITM_CORE_CHANNEL_OPTIONS_FFT_ENABLE_CH 0x00000080 /* Indicates Channel to Be Used for FFT */ +#define BITM_CORE_CHANNEL_OPTIONS_CHANNEL_PRIORITY 0x0000000F /* Indicates Priority or Position of This Channel in Sequence */ +#define ENUM_CORE_CHANNEL_OPTIONS_NO_FFT 0x00000000 /* FFT_Enable_Ch: FFT Will not be Performed on This Channel */ +#define ENUM_CORE_CHANNEL_OPTIONS_DO_FFT 0x00000080 /* FFT_Enable_Ch: FFT Will be Performed on This Channel */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_SENSOR_TYPE[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_SENSOR_TYPE_SENSOR_TYPE 0 /* Sensor Type */ +#define BITM_CORE_SENSOR_TYPE_SENSOR_TYPE 0x00000FFF /* Sensor Type */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_T_DEF_L1 0x00000000 /* Sensor_Type: Thermocouple T-Type Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_J_DEF_L1 0x00000001 /* Sensor_Type: Thermocouple J-Type Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_K_DEF_L1 0x00000002 /* Sensor_Type: Thermocouple K-Type Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_1_DEF_L2 0x00000008 /* Sensor_Type: Thermocouple Sensor 1 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_2_DEF_L2 0x00000009 /* Sensor_Type: Thermocouple Sensor 2 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_3_DEF_L2 0x0000000A /* Sensor_Type: Thermocouple Sensor 3 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_4_DEF_L2 0x0000000B /* Sensor_Type: Thermocouple Sensor 4 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_T_ADV_L1 0x00000010 /* Sensor_Type: Thermocouple T-Type Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_J_ADV_L1 0x00000011 /* Sensor_Type: Thermocouple J-Type Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_K_ADV_L1 0x00000012 /* Sensor_Type: Thermocouple K-Type Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_1_ADV_L2 0x00000018 /* Sensor_Type: Thermocouple Sensor 1 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_2_ADV_L2 0x00000019 /* Sensor_Type: Thermocouple Sensor 2 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_3_ADV_L2 0x0000001A /* Sensor_Type: Thermocouple Sensor 3 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_4_ADV_L2 0x0000001B /* Sensor_Type: Thermocouple Sensor 4 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT100_DEF_L1 0x00000020 /* Sensor_Type: RTD 2 Wire PT100 Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT1000_DEF_L1 0x00000021 /* Sensor_Type: RTD 2 Wire PT1000 Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_1_DEF_L2 0x00000028 /* Sensor_Type: RTD 2 Wire Sensor 1 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_2_DEF_L2 0x00000029 /* Sensor_Type: RTD 2 Wire Sensor 2 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_3_DEF_L2 0x0000002A /* Sensor_Type: RTD 2 Wire Sensor 3 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_4_DEF_L2 0x0000002B /* Sensor_Type: RTD 2 Wire Sensor 4 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT100_ADV_L1 0x00000030 /* Sensor_Type: RTD 2 Wire PT100 Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT1000_ADV_L1 0x00000031 /* Sensor_Type: RTD 2 Wire PT1000 Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_1_ADV_L2 0x00000038 /* Sensor_Type: RTD 2 Wire Sensor 1 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_2_ADV_L2 0x00000039 /* Sensor_Type: RTD 2 Wire Sensor 2 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_3_ADV_L2 0x0000003A /* Sensor_Type: RTD 2 Wire Sensor 3 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_2W_4_ADV_L2 0x0000003B /* Sensor_Type: RTD 2 Wire Sensor 4 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT100_DEF_L1 0x00000040 /* Sensor_Type: RTD 3 Wire PT100 Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT1000_DEF_L1 0x00000041 /* Sensor_Type: RTD 3 Wire PT1000 Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_1_DEF_L2 0x00000048 /* Sensor_Type: RTD 3 Wire Sensor 1 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_2_DEF_L2 0x00000049 /* Sensor_Type: RTD 3 Wire Sensor 2 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_3_DEF_L2 0x0000004A /* Sensor_Type: RTD 3 Wire Sensor 3 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_4_DEF_L2 0x0000004B /* Sensor_Type: RTD 3 Wire Sensor 4 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT100_ADV_L1 0x00000050 /* Sensor_Type: RTD 3 Wire PT100 Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT1000_ADV_L1 0x00000051 /* Sensor_Type: RTD 3 Wire PT1000 Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_1_ADV_L2 0x00000058 /* Sensor_Type: RTD 3 Wire Sensor 1 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_2_ADV_L2 0x00000059 /* Sensor_Type: RTD 3 Wire Sensor 2 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_3_ADV_L2 0x0000005A /* Sensor_Type: RTD 3 Wire Sensor 3 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_3W_4_ADV_L2 0x0000005B /* Sensor_Type: RTD 3 Wire Sensor 4 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT100_DEF_L1 0x00000060 /* Sensor_Type: RTD 4 Wire PT100 Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT1000_DEF_L1 0x00000061 /* Sensor_Type: RTD 4 Wire PT1000 Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_1_DEF_L2 0x00000068 /* Sensor_Type: RTD 4 Wire Sensor 1 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_2_DEF_L2 0x00000069 /* Sensor_Type: RTD 4 Wire Sensor 2 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_3_DEF_L2 0x0000006A /* Sensor_Type: RTD 4 Wire Sensor 3 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_4_DEF_L2 0x0000006B /* Sensor_Type: RTD 4 Wire Sensor 4 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT100_ADV_L1 0x00000070 /* Sensor_Type: RTD 4 Wire PT100 Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT1000_ADV_L1 0x00000071 /* Sensor_Type: RTD 4 Wire PT1000 Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_1_ADV_L2 0x00000078 /* Sensor_Type: RTD 4 Wire Sensor 1 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_2_ADV_L2 0x00000079 /* Sensor_Type: RTD 4 Wire Sensor 2 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_3_ADV_L2 0x0000007A /* Sensor_Type: RTD 4 Wire Sensor 3 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_RTD_4W_4_ADV_L2 0x0000007B /* Sensor_Type: RTD 4 Wire Sensor 4 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_A_10K_DEF_L1 0x00000080 /* Sensor_Type: Thermistor Type A 10kOhm Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_B_10K_DEF_L1 0x00000081 /* Sensor_Type: Thermistor Type B 10kOhm Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_1_DEF_L2 0x00000088 /* Sensor_Type: Thermistor Sensor 1 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_2_DEF_L2 0x00000089 /* Sensor_Type: Thermistor Sensor 2 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_3_DEF_L2 0x0000008A /* Sensor_Type: Thermistor Sensor 3 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_4_DEF_L2 0x0000008B /* Sensor_Type: Thermistor Sensor 4 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_A_10K_ADV_L1 0x00000090 /* Sensor_Type: Thermistor Type A 10kOhm Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_B_10K_ADV_L1 0x00000091 /* Sensor_Type: Thermistor Type B 10kOhm Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_1_ADV_L2 0x00000098 /* Sensor_Type: Thermistor Sensor 1 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_2_ADV_L2 0x00000099 /* Sensor_Type: Thermistor Sensor 2 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_3_ADV_L2 0x0000009A /* Sensor_Type: Thermistor Sensor 3 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_THERMISTOR_4_ADV_L2 0x0000009B /* Sensor_Type: Thermistor Sensor 4 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_1_DEF_L2 0x000000A8 /* Sensor_Type: Bridge 4 Wire Sensor 1 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_2_DEF_L2 0x000000A9 /* Sensor_Type: Bridge 4 Wire Sensor 2 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_3_DEF_L2 0x000000AA /* Sensor_Type: Bridge 4 Wire Sensor 3 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_4_DEF_L2 0x000000AB /* Sensor_Type: Bridge 4 Wire Sensor 4 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_1_ADV_L2 0x000000B8 /* Sensor_Type: Bridge 4 Wire Sensor 1 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_2_ADV_L2 0x000000B9 /* Sensor_Type: Bridge 4 Wire Sensor 2 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_3_ADV_L2 0x000000BA /* Sensor_Type: Bridge 4 Wire Sensor 2 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_4_ADV_L2 0x000000BB /* Sensor_Type: Bridge 4 Wire Sensor 2 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_1_DEF_L2 0x000000C8 /* Sensor_Type: Bridge 6 Wire Sensor 1 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_2_DEF_L2 0x000000C9 /* Sensor_Type: Bridge 6 Wire Sensor 2 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_3_DEF_L2 0x000000CA /* Sensor_Type: Bridge 6 Wire Sensor 3 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_4_DEF_L2 0x000000CB /* Sensor_Type: Bridge 6 Wire Sensor 4 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_1_ADV_L2 0x000000D8 /* Sensor_Type: Bridge 6 Wire Sensor 1 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_2_ADV_L2 0x000000D9 /* Sensor_Type: Bridge 6 Wire Sensor 2 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_3_ADV_L2 0x000000DA /* Sensor_Type: Bridge 6 Wire Sensor 3 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_4_ADV_L2 0x000000DB /* Sensor_Type: Bridge 6 Wire Sensor 4 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_TYPEA_DEF_L1 0x000000E0 /* Sensor_Type: Diode 2 Current Type A Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_TYPEA_DEF_L1 0x000000E1 /* Sensor_Type: Diode 3 Current Type A Sensor Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_1_DEF_L2 0x000000E8 /* Sensor_Type: Diode 2 Current Sensor 1 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_1_DEF_L2 0x000000E9 /* Sensor_Type: Diode 3 Current Sensor 1 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_TYPEA_ADV_L1 0x000000F0 /* Sensor_Type: Diode 2 Current Type A Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_TYPEA_ADV_L1 0x000000F1 /* Sensor_Type: Diode 3 Current Type A Sensor Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_DIODE_2C_1_ADV_L2 0x000000F8 /* Sensor_Type: Diode 2 Current Sensor 1 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_DIODE_3C_1_ADV_L2 0x000000F9 /* Sensor_Type: Diode 3 Current Sensor 1 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_A_DEF_L1 0x00000100 /* Sensor_Type: Microphone With No External Amplifier Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_B_DEF_L1 0x00000101 /* Sensor_Type: Microphone With External Amplifier Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_1_DEF_L2 0x00000108 /* Sensor_Type: Microphone With No External Amplifier Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_2_DEF_L2 0x00000109 /* Sensor_Type: Microphone With External Amplifier Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_A_ADV_L1 0x00000110 /* Sensor_Type: Microphone With No External Amplifier Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_B_ADV_L1 0x00000111 /* Sensor_Type: Microphone With External Amplifier Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_1_ADV_L2 0x00000116 /* Sensor_Type: Microphone With No External Amplifier Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_MICROPHONE_2_ADV_L2 0x00000117 /* Sensor_Type: Microphone With External Amplifier Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_VOLTAGE 0x00000200 /* Sensor_Type: Voltage Input */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1 0x00000220 /* Sensor_Type: Voltage Output Pressure Sensor A Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_B_DEF_L1 0x00000221 /* Sensor_Type: Voltage Output Pressure Sensor B Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_1_DEF_L2 0x00000228 /* Sensor_Type: Voltage Output Pressure Sensor 1 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_2_DEF_L2 0x00000229 /* Sensor_Type: Voltage Output Pressure Sensor 2 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_A_ADV_L1 0x00000230 /* Sensor_Type: Voltage Output Pressure Sensor A Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_B_ADV_L1 0x00000231 /* Sensor_Type: Voltage Output Pressure Sensor B Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_1_ADV_L2 0x00000238 /* Sensor_Type: Voltage Output Pressure Sensor 1 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_2_ADV_L2 0x00000239 /* Sensor_Type: Voltage Output Pressure Sensor 2 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_CURRENT 0x00000300 /* Sensor_Type: Current Input */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_A_DEF_L1 0x00000320 /* Sensor_Type: Current Output Pressure Sensor A Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_1_DEF_L2 0x00000328 /* Sensor_Type: Current Output Pressure Sensor 1 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_2_DEF_L2 0x00000329 /* Sensor_Type: Current Output Pressure Sensor 2 Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_A_ADV_L1 0x00000330 /* Sensor_Type: Current Output Pressure Sensor A Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_1_ADV_L2 0x00000338 /* Sensor_Type: Current Output Pressure Sensor 1 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_2_ADV_L2 0x00000339 /* Sensor_Type: Current Output Pressure Sensor 2 Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_DEF_L1 0x00000800 /* Sensor_Type: I2C Pressure Sensor A Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_DEF_L1 0x00000801 /* Sensor_Type: I2C Pressure Sensor B Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_DEF_L2 0x00000808 /* Sensor_Type: I2C Pressure Sensor A Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_DEF_L2 0x00000809 /* Sensor_Type: I2C Pressure Sensor B Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_ADV_L1 0x00000810 /* Sensor_Type: I2C Pressure Sensor A Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_ADV_L1 0x00000811 /* Sensor_Type: I2C Pressure Sensor B Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_ADV_L2 0x00000818 /* Sensor_Type: I2C Pressure Sensor A Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_ADV_L2 0x00000819 /* Sensor_Type: I2C Pressure Sensor B Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_DEF_L1 0x00000840 /* Sensor_Type: I2C Humidity Sensor A Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_DEF_L1 0x00000841 /* Sensor_Type: I2C Humidity Sensor B Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_DEF_L2 0x00000848 /* Sensor_Type: I2C Humidity Sensor A Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_DEF_L2 0x00000849 /* Sensor_Type: I2C Humidity Sensor B Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_ADV_L1 0x00000850 /* Sensor_Type: I2C Humidity Sensor A Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_ADV_L1 0x00000851 /* Sensor_Type: I2C Humidity Sensor B Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_ADV_L2 0x00000858 /* Sensor_Type: I2C Humidity Sensor A Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_ADV_L2 0x00000859 /* Sensor_Type: I2C Humidity Sensor B Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_DEF_L1 0x00000880 /* Sensor_Type: I2C Ambient Light Sensor A Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_DEF_L2 0x00000888 /* Sensor_Type: I2C Ambient Light Sensor A Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_ADV_L1 0x00000890 /* Sensor_Type: I2C Ambient Light Sensor A Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_ADV_L2 0x00000898 /* Sensor_Type: I2C Ambient Light Sensor A Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_DEF_L1 0x00000C00 /* Sensor_Type: SPI Pressure Sensor A Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_DEF_L2 0x00000C08 /* Sensor_Type: SPI Pressure Sensor A Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_ADV_L1 0x00000C10 /* Sensor_Type: SPI Pressure Sensor A Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_ADV_L2 0x00000C18 /* Sensor_Type: SPI Pressure Sensor A Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_DEF_L1 0x00000C40 /* Sensor_Type: SPI Humidity Sensor A Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_DEF_L1 0x00000C41 /* Sensor_Type: SPI Humidity Sensor B Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_DEF_L2 0x00000C48 /* Sensor_Type: SPI Humidity Sensor A Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_DEF_L2 0x00000C49 /* Sensor_Type: SPI Humidity Sensor B Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_ADV_L1 0x00000C50 /* Sensor_Type: SPI Humidity Sensor A Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_ADV_L1 0x00000C51 /* Sensor_Type: SPI Humidity Sensor B Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_ADV_L2 0x00000C58 /* Sensor_Type: SPI Humidity Sensor A Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_ADV_L2 0x00000C59 /* Sensor_Type: SPI Humidity Sensor B Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_DEF_L1 0x00000C80 /* Sensor_Type: SPI Accelerometer Sensor A 3-Axis Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_DEF_L1 0x00000C81 /* Sensor_Type: SPI Accelerometer Sensor B 3-Axis Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_DEF_L2 0x00000C88 /* Sensor_Type: SPI Accelerometer Sensor A 3-Axis Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_DEF_L2 0x00000C89 /* Sensor_Type: SPI Accelerometer Sensor B 3-Axis Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_ADV_L1 0x00000C90 /* Sensor_Type: SPI Accelerometer Sensor A 3-Axis Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_ADV_L1 0x00000C91 /* Sensor_Type: SPI Accelerometer Sensor B 3-Axis Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_ADV_L2 0x00000C98 /* Sensor_Type: SPI Accelerometer Sensor A 3-Axis Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_ADV_L2 0x00000C99 /* Sensor_Type: SPI Accelerometer Sensor B 3-Axis Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_DEF_L1 0x00000E00 /* Sensor_Type: UART CO2 Sensor A Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_DEF_L1 0x00000E01 /* Sensor_Type: UART CO2 Sensor B Defined Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_DEF_L2 0x00000E08 /* Sensor_Type: UART CO2 Sensor A Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_DEF_L2 0x00000E09 /* Sensor_Type: UART CO2 Sensor B Defined Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_ADV_L1 0x00000E10 /* Sensor_Type: UART CO2 Sensor A Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_ADV_L1 0x00000E11 /* Sensor_Type: UART CO2 Sensor B Advanced Level 1 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_ADV_L2 0x00000E18 /* Sensor_Type: UART CO2 Sensor A Advanced Level 2 */ +#define ENUM_CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_ADV_L2 0x00000E19 /* Sensor_Type: UART CO2 Sensor B Advanced Level 2 */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_SENSOR_DETAILS[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_SENSOR_DETAILS_COMPENSATION_DISABLE 31 /* Indicates Compensation Data Should Not Be Used */ +#define BITP_CORE_SENSOR_DETAILS_AVERAGING 28 /* Number of ADC Results to Average */ +#define BITP_CORE_SENSOR_DETAILS_PGA_GAIN 24 /* PGA Gain */ +#define BITP_CORE_SENSOR_DETAILS_REFERENCE_SELECT 20 /* Reference Selection */ +#define BITP_CORE_SENSOR_DETAILS_VBIAS 19 /* Controls ADC Vbias Output */ +#define BITP_CORE_SENSOR_DETAILS_REFERENCE_BUFFER_DISABLE 18 /* Enable or Disable ADC Reference Buffer */ +#define BITP_CORE_SENSOR_DETAILS_DO_NOT_PUBLISH 17 /* Do Not Publish Channel Result */ +#define BITP_CORE_SENSOR_DETAILS_UNITY_LUT_SELECT 16 /* Selects Unity Transfer Function Instead of Sensor Default */ +#define BITP_CORE_SENSOR_DETAILS_COMPENSATION_CHANNEL 4 /* Indicates Which Channel is Used to Compensate Sensor Result */ +#define BITP_CORE_SENSOR_DETAILS_MEASUREMENT_UNITS 0 /* Units of Sensor Measurement */ +#define BITM_CORE_SENSOR_DETAILS_COMPENSATION_DISABLE 0x80000000 /* Indicates Compensation Data Should Not Be Used */ +#define BITM_CORE_SENSOR_DETAILS_AVERAGING 0x70000000 /* Number of ADC Results to Average */ +#define BITM_CORE_SENSOR_DETAILS_PGA_GAIN 0x07000000 /* PGA Gain */ +#define BITM_CORE_SENSOR_DETAILS_REFERENCE_SELECT 0x00F00000 /* Reference Selection */ +#define BITM_CORE_SENSOR_DETAILS_VBIAS 0x00080000 /* Controls ADC Vbias Output */ +#define BITM_CORE_SENSOR_DETAILS_REFERENCE_BUFFER_DISABLE 0x00040000 /* Enable or Disable ADC Reference Buffer */ +#define BITM_CORE_SENSOR_DETAILS_DO_NOT_PUBLISH 0x00020000 /* Do Not Publish Channel Result */ +#define BITM_CORE_SENSOR_DETAILS_UNITY_LUT_SELECT 0x00010000 /* Selects Unity Transfer Function Instead of Sensor Default */ +#define BITM_CORE_SENSOR_DETAILS_COMPENSATION_CHANNEL 0x000000F0 /* Indicates Which Channel is Used to Compensate Sensor Result */ +#define BITM_CORE_SENSOR_DETAILS_MEASUREMENT_UNITS 0x0000000F /* Units of Sensor Measurement */ +#define ENUM_CORE_SENSOR_DETAILS_PGA_GAIN_1 0x00000000 /* PGA_Gain: Gain of 1 */ +#define ENUM_CORE_SENSOR_DETAILS_PGA_GAIN_2 0x01000000 /* PGA_Gain: Gain of 2 */ +#define ENUM_CORE_SENSOR_DETAILS_PGA_GAIN_4 0x02000000 /* PGA_Gain: Gain of 4 */ +#define ENUM_CORE_SENSOR_DETAILS_PGA_GAIN_8 0x03000000 /* PGA_Gain: Gain of 8 */ +#define ENUM_CORE_SENSOR_DETAILS_PGA_GAIN_16 0x04000000 /* PGA_Gain: Gain of 16 */ +#define ENUM_CORE_SENSOR_DETAILS_PGA_GAIN_32 0x05000000 /* PGA_Gain: Gain of 32 */ +#define ENUM_CORE_SENSOR_DETAILS_PGA_GAIN_64 0x06000000 /* PGA_Gain: Gain of 64 */ +#define ENUM_CORE_SENSOR_DETAILS_PGA_GAIN_128 0x07000000 /* PGA_Gain: Gain of 128 */ +#define ENUM_CORE_SENSOR_DETAILS_REF_INT 0x00000000 /* Reference_Select: Internal Reference */ +#define ENUM_CORE_SENSOR_DETAILS_REF_AVDD 0x00100000 /* Reference_Select: AVDD */ +#define ENUM_CORE_SENSOR_DETAILS_REF_VEXT1 0x00200000 /* Reference_Select: External Voltage on Refin1 */ +#define ENUM_CORE_SENSOR_DETAILS_REF_VEXT2 0x00300000 /* Reference_Select: External Voltage on Refin2 */ +#define ENUM_CORE_SENSOR_DETAILS_REF_RINT1 0x00400000 /* Reference_Select: Internal Resistor1 */ +#define ENUM_CORE_SENSOR_DETAILS_REF_RINT2 0x00500000 /* Reference_Select: Internal Resistor2 */ +#define ENUM_CORE_SENSOR_DETAILS_REF_REXT1 0x00600000 /* Reference_Select: External Resistor on Refin1 */ +#define ENUM_CORE_SENSOR_DETAILS_REF_REXT2 0x00700000 /* Reference_Select: External Resistor on Refin2 */ +#define ENUM_CORE_SENSOR_DETAILS_REF_EXC 0x00800000 /* Reference_Select: Bridge Excitation Voltage */ +#define ENUM_CORE_SENSOR_DETAILS_UNITS_UNSPECIFIED 0x00000000 /* Measurement_Units: Not Specified */ +#define ENUM_CORE_SENSOR_DETAILS_UNITS_RESERVED 0x00000001 /* Measurement_Units: Reserved */ +#define ENUM_CORE_SENSOR_DETAILS_UNITS_DEGC 0x00000002 /* Measurement_Units: Degrees C */ +#define ENUM_CORE_SENSOR_DETAILS_UNITS_DEGF 0x00000003 /* Measurement_Units: Degrees F */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_CHANNEL_EXCITATION[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_CHANNEL_EXCITATION_IOUT_DONT_SWAP_3WIRE 7 /* Indicates 3-Wire Excitation Currents Should Not Be Swapped */ +#define BITP_CORE_CHANNEL_EXCITATION_IOUT_DIODE_RATIO 5 /* Modify Current Ratios Used for Diode Sensor */ +#define BITP_CORE_CHANNEL_EXCITATION_IOUT_EXCITATION_CURRENT 0 /* Current Source Value */ +#define BITM_CORE_CHANNEL_EXCITATION_IOUT_DONT_SWAP_3WIRE 0x00000080 /* Indicates 3-Wire Excitation Currents Should Not Be Swapped */ +#define BITM_CORE_CHANNEL_EXCITATION_IOUT_DIODE_RATIO 0x00000020 /* Modify Current Ratios Used for Diode Sensor */ +#define BITM_CORE_CHANNEL_EXCITATION_IOUT_EXCITATION_CURRENT 0x00000007 /* Current Source Value */ +#define ENUM_CORE_CHANNEL_EXCITATION_IOUT_DIODE_DEFAULT 0x00000000 /* IOUT_Diode_Ratio: Default Excitation Current Ratios */ +#define ENUM_CORE_CHANNEL_EXCITATION_IOUT_DIODE_MAX 0x00000020 /* IOUT_Diode_Ratio: Higher Excitation Current Ratios */ +#define ENUM_CORE_CHANNEL_EXCITATION_IEXC_OFF 0x00000000 /* IOUT_Excitation_Current: Disabled */ +#define ENUM_CORE_CHANNEL_EXCITATION_IEXC_50UA 0x00000001 /* IOUT_Excitation_Current: 50 \mu;A */ +#define ENUM_CORE_CHANNEL_EXCITATION_IEXC_100UA 0x00000002 /* IOUT_Excitation_Current: 100 \mu;A */ +#define ENUM_CORE_CHANNEL_EXCITATION_IEXC_250UA 0x00000003 /* IOUT_Excitation_Current: 250 \mu;A */ +#define ENUM_CORE_CHANNEL_EXCITATION_IEXC_500UA 0x00000004 /* IOUT_Excitation_Current: 500 \mu;A */ +#define ENUM_CORE_CHANNEL_EXCITATION_IEXC_750UA 0x00000005 /* IOUT_Excitation_Current: 750 \mu;A */ +#define ENUM_CORE_CHANNEL_EXCITATION_IEXC_1000UA 0x00000006 /* IOUT_Excitation_Current: 1000 \mu;A */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_SETTLING_TIME[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_SETTLING_TIME_SETTLING_TIME_UNITS 14 /* Units for Settling Time */ +#define BITP_CORE_SETTLING_TIME_SETTLING_TIME 0 /* Settling Time to Allow When Switching to Channel */ +#define BITM_CORE_SETTLING_TIME_SETTLING_TIME_UNITS 0x0000C000 /* Units for Settling Time */ +#define BITM_CORE_SETTLING_TIME_SETTLING_TIME 0x00003FFF /* Settling Time to Allow When Switching to Channel */ +#define ENUM_CORE_SETTLING_TIME_MICROSECONDS 0x00000000 /* Settling_Time_Units: Micro-Seconds */ +#define ENUM_CORE_SETTLING_TIME_MILLISECONDS 0x00004000 /* Settling_Time_Units: Milli-Seconds */ +#define ENUM_CORE_SETTLING_TIME_SECONDS 0x00008000 /* Settling_Time_Units: Seconds */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_FILTER_SELECT[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_FILTER_SELECT_ADC_FILTER_TYPE 11 /* ADC Digital Filter Type */ +#define BITP_CORE_FILTER_SELECT_ADC_FS 0 /* ADC Digital Filter Select */ +#define BITM_CORE_FILTER_SELECT_ADC_FILTER_TYPE 0x0000F800 /* ADC Digital Filter Type */ +#define BITM_CORE_FILTER_SELECT_ADC_FS 0x000007FF /* ADC Digital Filter Select */ +#define ENUM_CORE_FILTER_SELECT_FILTER_FIR_25SPS 0x00000000 /* ADC_Filter_Type: FIR Filter 25 SPS */ +#define ENUM_CORE_FILTER_SELECT_FILTER_FIR_20SPS 0x00000800 /* ADC_Filter_Type: FIR Filter 20 SPS */ +#define ENUM_CORE_FILTER_SELECT_FILTER_SINC4 0x00001000 /* ADC_Filter_Type: Sinc4 Filter */ +#define ENUM_CORE_FILTER_SELECT_FILTER_TBD 0x00001800 /* ADC_Filter_Type: TBD Filter */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_HIGH_THRESHOLD_LIMIT[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_HIGH_THRESHOLD_LIMIT_HIGH_THRESHOLD 0 /* Upper Limit for Sensor Alert Comparison */ +#define BITM_CORE_HIGH_THRESHOLD_LIMIT_HIGH_THRESHOLD 0xFFFFFFFF /* Upper Limit for Sensor Alert Comparison */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_LOW_THRESHOLD_LIMIT[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_LOW_THRESHOLD_LIMIT_LOW_THRESHOLD 0 /* Lower Limit for Sensor Alert Comparison */ +#define BITM_CORE_LOW_THRESHOLD_LIMIT_LOW_THRESHOLD 0xFFFFFFFF /* Lower Limit for Sensor Alert Comparison */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_SENSOR_OFFSET[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_SENSOR_OFFSET_SENSOR_OFFSET 0 /* Sensor Offset Adjustment */ +#define BITM_CORE_SENSOR_OFFSET_SENSOR_OFFSET 0xFFFFFFFF /* Sensor Offset Adjustment */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_SENSOR_GAIN[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_SENSOR_GAIN_SENSOR_GAIN 0 /* Sensor Gain Adjustment */ +#define BITM_CORE_SENSOR_GAIN_SENSOR_GAIN 0xFFFFFFFF /* Sensor Gain Adjustment */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_ALERT_CODE_CH[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_ALERT_CODE_CH_ALERT_CODE_CH 0 /* Per-Channel Code Indicating Type of Alert */ +#define BITM_CORE_ALERT_CODE_CH_ALERT_CODE_CH 0x0000FFFF /* Per-Channel Code Indicating Type of Alert */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_CHANNEL_SKIP[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_CHANNEL_SKIP_CHANNEL_SKIP 0 /* Indicates If Channel Will Skip Some Measurement Cycles */ +#define BITM_CORE_CHANNEL_SKIP_CHANNEL_SKIP 0x000000FF /* Indicates If Channel Will Skip Some Measurement Cycles */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_SENSOR_PARAMETER[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_SENSOR_PARAMETER_SENSOR_PARAMETER 0 /* Sensor Parameter Adjustment */ +#define BITM_CORE_SENSOR_PARAMETER_SENSOR_PARAMETER 0xFFFFFFFF /* Sensor Parameter Adjustment */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_CALIBRATION_PARAMETER[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_CALIBRATION_PARAMETER_CALIBRATION_PARAMETER_ENABLE 24 /* Enables Use of Calibration_Parameter */ +#define BITP_CORE_CALIBRATION_PARAMETER_CALIBRATION_PARAMETER 0 /* Calibration Parameter Value */ +#define BITM_CORE_CALIBRATION_PARAMETER_CALIBRATION_PARAMETER_ENABLE 0x01000000 /* Enables Use of Calibration_Parameter */ +#define BITM_CORE_CALIBRATION_PARAMETER_CALIBRATION_PARAMETER 0x00FFFFFF /* Calibration Parameter Value */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_CONFIG[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_DATA_BITS 11 /* Number of Relevant Data Bits */ +#define BITP_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_READ_BYTES 8 /* Number of Bytes to Read from the Sensor */ +#define BITP_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_BIT_OFFSET 4 /* Data Bit Offset, Relative to Alignment */ +#define BITP_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_LEFT_ALIGNED 3 /* Data Alignment Within the Data Frame */ +#define BITP_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_LITTLE_ENDIAN 2 /* Data Endianness of Sensor Result */ +#define BITP_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_CODING 0 /* Data Encoding of Sensor Result */ +#define BITM_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_DATA_BITS 0x0000F800 /* Number of Relevant Data Bits */ +#define BITM_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_READ_BYTES 0x00000700 /* Number of Bytes to Read from the Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_BIT_OFFSET 0x000000F0 /* Data Bit Offset, Relative to Alignment */ +#define BITM_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_LEFT_ALIGNED 0x00000008 /* Data Alignment Within the Data Frame */ +#define BITM_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_LITTLE_ENDIAN 0x00000004 /* Data Endianness of Sensor Result */ +#define BITM_CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_CODING 0x00000003 /* Data Encoding of Sensor Result */ +#define ENUM_CORE_DIGITAL_SENSOR_CONFIG_CODING_NONE 0x00000000 /* Digital_Sensor_Coding: None/Invalid */ +#define ENUM_CORE_DIGITAL_SENSOR_CONFIG_CODING_UNIPOLAR 0x00000001 /* Digital_Sensor_Coding: Unipolar */ +#define ENUM_CORE_DIGITAL_SENSOR_CONFIG_CODING_TWOS_COMPL 0x00000002 /* Digital_Sensor_Coding: Twos Complement */ +#define ENUM_CORE_DIGITAL_SENSOR_CONFIG_CODING_OFFSET_BINARY 0x00000003 /* Digital_Sensor_Coding: Offset Binary */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_ADDRESS[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_ADDRESS_DIGITAL_SENSOR_ADDRESS 0 /* I2C Address or Write Address Command for SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_ADDRESS_DIGITAL_SENSOR_ADDRESS 0x000000FF /* I2C Address or Write Address Command for SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_NUM_CMDS[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_READ_CMDS 4 /* Number of Read Commands for Digital Sensor */ +#define BITP_CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_CFG_CMDS 0 /* Number of Configuration Commands for Digital Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_READ_CMDS 0x00000070 /* Number of Read Commands for Digital Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_CFG_CMDS 0x00000007 /* Number of Configuration Commands for Digital Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_COMMS[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_COMMS_UART_MODE 12 /* Configuration for Sensor UART Protocol */ +#define BITP_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE 10 /* Configuration for Sensor SPI Protocol */ +#define BITP_CORE_DIGITAL_SENSOR_COMMS_UART_BAUD 7 /* Controls Baud Rate for UART Sensors */ +#define BITP_CORE_DIGITAL_SENSOR_COMMS_I2C_CLOCK 5 /* Controls SCLK Frequency for I2C Sensors */ +#define BITP_CORE_DIGITAL_SENSOR_COMMS_SPI_CLOCK 1 /* Controls Clock Frequency for SPI Sensors */ +#define BITP_CORE_DIGITAL_SENSOR_COMMS_DIGITAL_SENSOR_COMMS_EN 0 /* Enable Digital Sensor Comms Register Parameters */ +#define BITM_CORE_DIGITAL_SENSOR_COMMS_UART_MODE 0x0000F000 /* Configuration for Sensor UART Protocol */ +#define BITM_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE 0x00000C00 /* Configuration for Sensor SPI Protocol */ +#define BITM_CORE_DIGITAL_SENSOR_COMMS_UART_BAUD 0x00000380 /* Controls Baud Rate for UART Sensors */ +#define BITM_CORE_DIGITAL_SENSOR_COMMS_I2C_CLOCK 0x00000060 /* Controls SCLK Frequency for I2C Sensors */ +#define BITM_CORE_DIGITAL_SENSOR_COMMS_SPI_CLOCK 0x0000001E /* Controls Clock Frequency for SPI Sensors */ +#define BITM_CORE_DIGITAL_SENSOR_COMMS_DIGITAL_SENSOR_COMMS_EN 0x00000001 /* Enable Digital Sensor Comms Register Parameters */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N1 0x00000000 /* Uart_Mode: 8 Data Bits No Parity 1 Stop Bit */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N2 0x00001000 /* Uart_Mode: 8 Data Bits No Parity 2 Stop Bits */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N3 0x00002000 /* Uart_Mode: 8 Data Bits No Parity 3 Stop Bits */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E1 0x00004000 /* Uart_Mode: 8 Data Bits Even Parity 1 Stop Bit */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E2 0x00005000 /* Uart_Mode: 8 Data Bits Even Parity 2 Stop Bits */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E3 0x00006000 /* Uart_Mode: 8 Data Bits Even Parity 3 Stop Bits */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O1 0x00008000 /* Uart_Mode: 8 Data Bits Odd Parity 1 Stop Bit */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O2 0x00009000 /* Uart_Mode: 8 Data Bits Odd Parity 2 Stop Bits */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O3 0x0000A000 /* Uart_Mode: 8 Data Bits Odd Parity 3 Stop Bits */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_0 0x00000000 /* SPI_Mode: Clock Polarity = 0 Clock Phase = 0 */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_1 0x00000400 /* SPI_Mode: Clock Polarity = 0 Clock Phase = 1 */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_2 0x00000800 /* SPI_Mode: Clock Polarity = 1 Clock Phase = 0 */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_3 0x00000C00 /* SPI_Mode: Clock Polarity = 1 Clock Phase = 1 */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_UART_115200 0x00000000 /* Uart_Baud: 115200 bps */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_UART_57600 0x00000080 /* Uart_Baud: 57600 bps */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_UART_38400 0x00000100 /* Uart_Baud: 38400 bps */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_UART_19200 0x00000180 /* Uart_Baud: 19200 bps */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_UART_9600 0x00000200 /* Uart_Baud: 9600 bps */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_UART_4800 0x00000280 /* Uart_Baud: 4800 bps */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_UART_2400 0x00000300 /* Uart_Baud: 2400 bps */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_UART_1200 0x00000380 /* Uart_Baud: 1200 bps */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_I2C_100K 0x00000000 /* I2C_Clock: 100kHz SCL */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_I2C_400K 0x00000020 /* I2C_Clock: 400kHz SCL */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_I2C_RESERVED1 0x00000040 /* I2C_Clock: Reserved */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_I2C_RESERVED2 0x00000060 /* I2C_Clock: Reserved */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_13MHZ 0x00000000 /* SPI_Clock: 13 MHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_6_5MHZ 0x00000002 /* SPI_Clock: 6.5 MHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_3_25MHZ 0x00000004 /* SPI_Clock: 3.25 MHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_1_625MHZ 0x00000006 /* SPI_Clock: 1.625 MHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_812KHZ 0x00000008 /* SPI_Clock: 812.5kHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_406KHZ 0x0000000A /* SPI_Clock: 406.2kHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_203KHZ 0x0000000C /* SPI_Clock: 203.1kHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_101KHZ 0x0000000E /* SPI_Clock: 101.5kHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_50KHZ 0x00000010 /* SPI_Clock: 50.8kHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_25KHZ 0x00000012 /* SPI_Clock: 25.4kHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_12KHZ 0x00000014 /* SPI_Clock: 12.7kHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_6KHZ 0x00000016 /* SPI_Clock: 6.3kHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_3KHZ 0x00000018 /* SPI_Clock: 3.2kHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_1_5KHZ 0x0000001A /* SPI_Clock: 1.58kHz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_793HZ 0x0000001C /* SPI_Clock: 793Hz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_SPI_396HZ 0x0000001E /* SPI_Clock: 396Hz */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_DIGITAL_COMMS_DEFAULT 0x00000000 /* Digital_Sensor_Comms_En: Default Parameters Used for Digital Sensor Communications */ +#define ENUM_CORE_DIGITAL_SENSOR_COMMS_DIGITAL_COMMS_USER 0x00000001 /* Digital_Sensor_Comms_En: User Supplied Parameters Used for Digital Sensor Communications */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_COMMAND1[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_COMMAND1_DIGITAL_SENSOR_COMMAND1 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_COMMAND1_DIGITAL_SENSOR_COMMAND1 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_COMMAND2[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_COMMAND2_DIGITAL_SENSOR_COMMAND2 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_COMMAND2_DIGITAL_SENSOR_COMMAND2 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_COMMAND3[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_COMMAND3_DIGITAL_SENSOR_COMMAND3 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_COMMAND3_DIGITAL_SENSOR_COMMAND3 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_COMMAND4[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_COMMAND4_DIGITAL_SENSOR_COMMAND4 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_COMMAND4_DIGITAL_SENSOR_COMMAND4 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_COMMAND5[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_COMMAND5_DIGITAL_SENSOR_COMMAND5 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_COMMAND5_DIGITAL_SENSOR_COMMAND5 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_COMMAND6[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_COMMAND6_DIGITAL_SENSOR_COMMAND6 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_COMMAND6_DIGITAL_SENSOR_COMMAND6 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_COMMAND7[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_COMMAND7_DIGITAL_SENSOR_COMMAND7 0 /* Configuration Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_COMMAND7_DIGITAL_SENSOR_COMMAND7 0x000000FF /* Configuration Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_READ_CMD1[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_READ_CMD1_DIGITAL_SENSOR_READ_CMD1 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_READ_CMD1_DIGITAL_SENSOR_READ_CMD1 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_READ_CMD2[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_READ_CMD2_DIGITAL_SENSOR_READ_CMD2 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_READ_CMD2_DIGITAL_SENSOR_READ_CMD2 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_READ_CMD3[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_READ_CMD3_DIGITAL_SENSOR_READ_CMD3 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_READ_CMD3_DIGITAL_SENSOR_READ_CMD3 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_READ_CMD4[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_READ_CMD4_DIGITAL_SENSOR_READ_CMD4 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_READ_CMD4_DIGITAL_SENSOR_READ_CMD4 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_READ_CMD5[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_READ_CMD5_DIGITAL_SENSOR_READ_CMD5 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_READ_CMD5_DIGITAL_SENSOR_READ_CMD5 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_READ_CMD6[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_READ_CMD6_DIGITAL_SENSOR_READ_CMD6 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_READ_CMD6_DIGITAL_SENSOR_READ_CMD6 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ + +/* ------------------------------------------------------------------------------------------------------------------------- + ADMW_CORE_DIGITAL_SENSOR_READ_CMD7[n] Pos/Masks Description + ------------------------------------------------------------------------------------------------------------------------- */ +#define BITP_CORE_DIGITAL_SENSOR_READ_CMD7_DIGITAL_SENSOR_READ_CMD7 0 /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ +#define BITM_CORE_DIGITAL_SENSOR_READ_CMD7_DIGITAL_SENSOR_READ_CMD7 0x000000FF /* Per Conversion Command to Send to Digital I2C/SPI Sensor */ + + +#endif /* end ifndef _DEF1000_REGISTERS_H */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw1001/ADMW1001_REGISTERS_typedefs.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,2363 @@ +/* ================================================================================ + + Project : ADMW1001_REGISTERS + File : ADMW1001_REGISTERS_typedefs.h + Description : C Register Structures + + Date : Nov 5, 2018 + + Copyright (c) 2018 Analog Devices, Inc. All Rights Reserved. + This software is proprietary and confidential to Analog Devices, Inc. and + its licensors. + + This file was auto-generated. Do not make local changes to this file. + + ================================================================================ */ + +#ifndef _ADMW1001_REGISTERS_TYPEDEFS_H +#define _ADMW1001_REGISTERS_TYPEDEFS_H + +/* pickup integer types */ +#if defined(_LANGUAGE_C) || (defined(__GNUC__) && !defined(__ASSEMBLER__)) +#include <stdint.h> +#endif /* _LANGUAGE_C */ + +#if defined ( __CC_ARM ) +#pragma push +#pragma anon_unions +#endif + +/** @defgroup Interface_Config_A Interface Configuration A (Interface_Config_A) Register + * Interface Configuration A (Interface_Config_A) Register. + * @{ + */ + +/* ========================================================================= + *! \enum ADMW_SPI_Interface_Config_A_Addr_Ascension + *! \brief Determines Sequential Addressing Behavior (Addr_Ascension) Enumerations + * ========================================================================= */ +typedef enum +{ + SPI_INTERFACE_CONFIG_A_DESCEND = 0, /**< Address accessed is decremented by one for each data byte when streaming */ + SPI_INTERFACE_CONFIG_A_ASCEND = 1 /**< Address accessed is incremented by one for each data byte when streaming */ +} ADMW_SPI_Interface_Config_A_Addr_Ascension; + + +/* ========================================================================== + *! \struct ADMW_SPI_Interface_Config_A_Struct + *! \brief Interface Configuration A Register bit field structure + * ========================================================================== */ +typedef struct _ADMW_SPI_Interface_Config_A_t { + union { + struct { + uint8_t SW_ResetX : 1; /**< Second of Two of SW_RESET Bits. */ + uint8_t reserved1 : 3; + uint8_t SDO_Enable : 1; /**< SDO Pin Enable */ + uint8_t Addr_Ascension : 1; /**< Determines Sequential Addressing Behavior */ + uint8_t reserved6 : 1; + uint8_t SW_Reset : 1; /**< First of Two of SW_RESET Bits. */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Interface_Config_A_t; + +/*@}*/ + +/** @defgroup Interface_Config_B Interface Configuration B (Interface_Config_B) Register + * Interface Configuration B (Interface_Config_B) Register. + * @{ + */ + +/* ========================================================================= + *! \enum ADMW_SPI_Interface_Config_B_Single_Inst + *! \brief Select Streaming or Single Instruction Mode (Single_Inst) Enumerations + * ========================================================================= */ +typedef enum +{ + SPI_INTERFACE_CONFIG_B_STREAMING_MODE = 0, /**< Streaming mode is enabled */ + SPI_INTERFACE_CONFIG_B_SINGLE_INSTRUCTION_MODE = 1 /**< Single Instruction mode is enabled */ +} ADMW_SPI_Interface_Config_B_Single_Inst; + + +/* ========================================================================== + *! \struct ADMW_SPI_Interface_Config_B_Struct + *! \brief Interface Configuration B Register bit field structure + * ========================================================================== */ +typedef struct SPI_Interface_Config_B_t { + union { + struct { + uint8_t reserved0 : 7; + uint8_t Single_Inst : 1; /**< Select Streaming or Single Instruction Mode */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Interface_Config_B_t; + +/*@}*/ + +/** @defgroup Device_Config Device Configuration (Device_Config) Register + * Device Configuration (Device_Config) Register. + * @{ + */ + +/* ========================================================================= + *! \enum ADMW_SPI_Device_Config_Operating_Modes + *! \brief Power Modes (Operating_Modes) Enumerations + * ========================================================================= */ +typedef enum +{ + SPI_DEVICE_CONFIG_NORMAL = 0, /**< Normal Operating Mode */ + SPI_DEVICE_CONFIG_SLEEP = 3 /**< Low Power Mode */ +} ADMW_SPI_Device_Config_Operating_Modes; + + +/* ========================================================================== + *! \struct ADMW_SPI_Device_Config_Struct + *! \brief Device Configuration Register bit field structure + * ========================================================================== */ +typedef struct SPI_Device_Config_t { + union { + struct { + uint8_t Operating_Modes : 2; /**< Power Modes */ + uint8_t reserved2 : 6; + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Device_Config_t; + +/*@}*/ + +/** @defgroup Chip_Type Chip Type (Chip_Type) Register + * Chip Type (Chip_Type) Register. + * @{ + */ + +/* ========================================================================== + *! \struct ADMW_SPI_Chip_Type_Struct + *! \brief Chip Type Register bit field structure + * ========================================================================== */ +typedef struct SPI_Chip_Type_t { + union { + struct { + uint8_t Chip_Type : 4; /**< Precision ADC */ + uint8_t reserved4 : 4; + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Chip_Type_t; + +/*@}*/ + +/** @defgroup Product_ID_L Product ID Low (Product_ID_L) Register + * Product ID Low (Product_ID_L) Register. + * @{ + */ + +/* ========================================================================== + *! \struct ADMW_SPI_Product_ID_L_Struct + *! \brief Product ID Low Register bit field structure + * ========================================================================== */ +typedef struct SPI_Product_ID_L_t { + union { + struct { + uint8_t Product_ID : 8; /**< Product_ID[7:0] This is Device Chip Type/Family */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Product_ID_L_t; + +/*@}*/ + +/** @defgroup Product_ID_H Product ID High (Product_ID_H) Register + * Product ID High (Product_ID_H) Register. + * @{ + */ + +/* ========================================================================== + *! \struct ADMW_SPI_Product_ID_H_Struct + *! \brief Product ID High Register bit field structure + * ========================================================================== */ +typedef struct SPI_Product_ID_H_t { + union { + struct { + uint8_t Product_ID : 8; /**< Product_ID[15:8] This is Device Chip Type/Family */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Product_ID_H_t; + +/*@}*/ + +/** @defgroup Chip_Grade Chip Grade (Chip_Grade) Register + * Chip Grade (Chip_Grade) Register. + * @{ + */ + +/* ========================================================================== + *! \struct ADMW_SPI_Chip_Grade_Struct + *! \brief Chip Grade Register bit field structure + * ========================================================================== */ +typedef struct SPI_Chip_Grade_t { + union { + struct { + uint8_t Device_Revision : 4; /**< This is the Device Hardware Revision */ + uint8_t Grade : 4; /**< This is the Device Performance Grade */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Chip_Grade_t; + +/*@}*/ + +/** @defgroup Scratch_Pad Scratch Pad (Scratch_Pad) Register + * Scratch Pad (Scratch_Pad) Register. + * @{ + */ + +/* ========================================================================== + *! \struct ADMW_SPI_Scratch_Pad_Struct + *! \brief Scratch Pad Register bit field structure + * ========================================================================== */ +typedef struct SPI_Scratch_Pad_t { + union { + struct { + uint8_t Scratch_Value : 8; /**< Software Scratchpad */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Scratch_Pad_t; + +/*@}*/ + +/** @defgroup SPI_Revision SPI Revision (SPI_Revision) Register + * SPI Revision (SPI_Revision) Register. + * @{ + */ + +/* ========================================================================= + *! \enum ADMW_SPI_SPI_Revision_Version + *! \brief SPI Version (Version) Enumerations + * ========================================================================= */ +typedef enum +{ + SPI_SPI_REVISION_REV1_0 = 2 /**< Revision 1.0 */ +} ADMW_SPI_SPI_Revision_Version; + + +/* ========================================================================= + *! \enum ADMW_SPI_SPI_Revision_SPI_Type + *! \brief Always Reads as 0x2 (SPI_Type) Enumerations + * ========================================================================= */ +typedef enum +{ + ADMW_SPI_SPI_REVISION_ADMW_SPI = 0, /**< */ + ADMW_SPI_SPI_REVISION_LPT_SPI = 2 /**< */ +} ADMW_SPI_SPI_Revision_SPI_Type; + + +/* ========================================================================== + *! \struct ADMW_SPI_SPI_Revision_Struct + *! \brief SPI Revision Register bit field structure + * ========================================================================== */ +typedef struct _ADMW_SPI_SPI_Revision_t { + union { + struct { + uint8_t Version : 6; /**< SPI Version */ + uint8_t SPI_Type : 2; /**< Always Reads as 0x2 */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_SPI_Revision_t; + +/*@}*/ + +/** @defgroup Vendor_L Vendor ID Low (Vendor_L) Register + * Vendor ID Low (Vendor_L) Register. + * @{ + */ + +/* ========================================================================== + *! \struct ADMW_SPI_Vendor_L_Struct + *! \brief Vendor ID Low Register bit field structure + * ========================================================================== */ +typedef struct _ADMW_SPI_Vendor_L_t { + union { + struct { + uint8_t VID : 8; /**< VID[7:0] Analog Devices Vendor ID */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Vendor_L_t; + +/*@}*/ + +/** @defgroup Vendor_H Vendor ID High (Vendor_H) Register + * Vendor ID High (Vendor_H) Register. + * @{ + */ + +/* ========================================================================== + *! \struct ADMW_SPI_Vendor_H_Struct + *! \brief Vendor ID High Register bit field structure + * ========================================================================== */ +typedef struct _ADMW_SPI_Vendor_H_t { + union { + struct { + uint8_t VID : 8; /**< VID[15:8] Analog Devices Vendor ID */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Vendor_H_t; + +/*@}*/ + +/** @defgroup Stream_Mode Stream Mode (Stream_Mode) Register + * Stream Mode (Stream_Mode) Register. + * @{ + */ + +/* ========================================================================== + *! \struct ADMW_SPI_Stream_Mode_Struct + *! \brief Stream Mode Register bit field structure + * ========================================================================== */ +typedef struct _ADMW_SPI_Stream_Mode_t { + union { + struct { + uint8_t Loop_Count : 8; /**< Sets the Data Byte Count Before Looping to Start Address */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Stream_Mode_t; + +/*@}*/ + +/** @defgroup Transfer_Config Transfer Config (Transfer_Config) Register + * Transfer Config (Transfer_Config) Register. + * @{ + */ + +/* ========================================================================= + *! \enum ADMW_SPI_Transfer_Config_Stream_Mode + *! \brief When Streaming, Controls Master-Slave Transfer (Stream_Mode) Enumerations + * ========================================================================= */ +typedef enum +{ + ADMW_SPI_TRANSFER_CONFIG_UPDATE_ON_WRITE = 0, /**< Transfers after each byte/mulit-byte register */ + ADMW_SPI_TRANSFER_CONFIG_UPDATE_ON_ADDRESS_LOOP = 1 /**< Transfers when address loops */ +} ADMW_SPI_Transfer_Config_Stream_Mode; + + +/* ========================================================================== + *! \struct ADMW_SPI_Transfer_Config_Struct + *! \brief Transfer Config Register bit field structure + * ========================================================================== */ +typedef struct _ADMW_SPI_Transfer_Config_t { + union { + struct { + uint8_t reserved0 : 1; + uint8_t Stream_Mode : 1; /**< When Streaming, Controls Master-Slave Transfer */ + uint8_t reserved2 : 6; + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Transfer_Config_t; + +/*@}*/ + +/** @defgroup Interface_Config_C Interface Configuration C (Interface_Config_C) Register + * Interface Configuration C (Interface_Config_C) Register. + * @{ + */ + +/* ========================================================================= + *! \enum ADMW_SPI_Interface_Config_C_Strict_Register_Access + *! \brief Multi-byte Registers Must Be Read/Written in Full (Strict_Register_Access) Enumerations + * ========================================================================= */ +typedef enum +{ + ADMW_SPI_INTERFACE_CONFIG_C_NORMAL_ACCESS = 0, /**< Normal mode, no access restrictions */ + ADMW_SPI_INTERFACE_CONFIG_C_STRICT_ACCESS = 1 /**< Strict mode, multi-byte registers require all bytes read/written */ +} ADMW_SPI_Interface_Config_C_Strict_Register_Access; + + +/* ========================================================================= + *! \enum ADMW_SPI_Interface_Config_C_CRC_Enable + *! \brief CRC Enable (CRC_Enable) Enumerations + * ========================================================================= */ +typedef enum +{ + ADMW_SPI_INTERFACE_CONFIG_C_DISABLED = 0, /**< CRC Disabled */ + ADMW_SPI_INTERFACE_CONFIG_C_ENABLED = 1 /**< CRC Enabled */ +} ADMW_SPI_Interface_Config_C_CRC_Enable; + + +/* ========================================================================== + *! \struct ADMW_SPI_Interface_Config_C_Struct + *! \brief Interface Configuration C Register bit field structure + * ========================================================================== */ +typedef struct _ADMW_SPI_Interface_Config_C_t { + union { + struct { + uint8_t CRC_EnableB : 2; /**< Inverted CRC Enable */ + uint8_t reserved2 : 2; + uint8_t Send_Status : 1; /**< Enables Sending of Status in 4-wire Mode */ + uint8_t Strict_Register_Access : 1; /**< Multi-byte Registers Must Be Read/Written in Full */ + uint8_t CRC_Enable : 2; /**< CRC Enable */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Interface_Config_C_t; + +/*@}*/ + +/** @defgroup Interface_Status_A Interface Status A (Interface_Status_A) Register + * Interface Status A (Interface_Status_A) Register. + * @{ + */ + +/* ========================================================================== + *! \struct ADMW_SPI_Interface_Status_A_Struct + *! \brief Interface Status A Register bit field structure + * ========================================================================== */ +typedef struct _ADMW_SPI_Interface_Status_A_t { + union { + struct { + uint8_t Address_Invalid_Error : 1; /**< Attempt to Read/Write Non-existent Register Address */ + uint8_t Register_Partial_Access_Error : 1; /**< Set When Fewer Than Expected Number of Bytes Read/Written */ + uint8_t Wr_To_Rd_Only_Reg_Error : 1; /**< Write to Read-Only Register Attempted */ + uint8_t CRC_Error : 1; /**< Invalid/No CRC Received */ + uint8_t Clock_Count_Error : 1; /**< Incorrect Number of Clocks Detected in a Transaction */ + uint8_t reserved5 : 2; + uint8_t Not_Ready_Error : 1; /**< Device Not Ready for Transaction */ + }; + uint8_t VALUE8; + }; +} ADMW_SPI_Interface_Status_A_t; + +/*@}*/ + +/** @defgroup Command Special Command (Command) Register + * Special Command (Command) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Command_Special_Command + *! \brief Special Command (Special_Command) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_COMMAND_NOP = 0, /**< No Command */ + CORE_COMMAND_CONVERT = 1, /**< Start ADC Conversions */ + CORE_COMMAND_CONVERT_WITH_RAW = 2, /**< Start Conversions with Added RAW ADC Data */ + CORE_COMMAND_RUN_DIAGNOSTICS = 3, /**< Initiate a Diagnostics Cycle */ + CORE_COMMAND_SELF_CALIBRATION = 4, /**< Initiate a Self-Calibration Cycle */ + CORE_COMMAND_LATCH_CONFIG = 7, /**< Latch Configuration. */ + CORE_COMMAND_LOAD_LUT = 8, /**< Load LUT from FLASH */ + CORE_COMMAND_SAVE_LUT = 9, /**< Save LUT to FLASH */ + CORE_COMMAND_SYSTEM_CHECK = 10, /**< Full Suite of Measurement Diagnostics */ + CORE_COMMAND_CONVERT_FFT = 11, /**< Perform FFTs on Selected Channel(s) */ + CORE_COMMAND_ERASE_EXTERNAL_FLASH = 16, /**< Erase Contents of External Flash */ + CORE_COMMAND_POWER_DOWN = 20, /**< Enter Low Power State */ + CORE_COMMAND_LOAD_CONFIG_1 = 24, /**< Load Registers with Configuration#1 from FLASH */ + CORE_COMMAND_SAVE_CONFIG_1 = 25, /**< Store Current Registers to FLASH Configuration#1 */ + CORE_COMMAND_LOAD_CONFIG_2 = 26, /**< Load Registers with Configuration#2 from FLASH */ + CORE_COMMAND_SAVE_CONFIG_2 = 27, /**< Store Current Registers to FLASH Configuration#2 */ + CORE_COMMAND_LOAD_CONFIG_3 = 28, /**< Load Registers with Configuration#3 from FLASH */ + CORE_COMMAND_SAVE_CONFIG_3 = 29, /**< Store Current Registers to FLASH Configuration#3 */ + CORE_COMMAND_LOAD_CONFIG_4 = 30, /**< Load Registers with Configuration#4 from FLASH */ + CORE_COMMAND_SAVE_CONFIG_4 = 31, /**< Store Current Registers to FLASH Configuration#4 */ + CORE_COMMAND_CALIBRATE_DIGITAL = 32 /**< Performs a Calibration of Digital Sensor, if Supported & Enabled. */ +} CORE_Command_Special_Command; + + +/* ========================================================================== + *! \struct CORE_Command_Struct + *! \brief Special Command Register bit field structure + * ========================================================================== */ +typedef struct CORE_Command_t { + union { + struct { + uint8_t Special_Command : 8; /**< Special Command */ + }; + uint8_t VALUE8; + }; +} CORE_Command_t; + +/*@}*/ + +/** @defgroup Mode Operating Mode and DRDY Control (Mode) Register + * Operating Mode and DRDY Control (Mode) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Mode_Conversion_Mode + *! \brief Conversion Mode (Conversion_Mode) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_MODE_SINGLECYCLE = 0, /**< Single Cycle */ + CORE_MODE_MULTICYCLE = 1, /**< Multi Cycle */ + CORE_MODE_CONTINUOUS = 2 /**< Continuous Conversion */ +} CORE_Mode_Conversion_Mode; + + +/* ========================================================================= + *! \enum CORE_Mode_Drdy_Mode + *! \brief Indicates Behavior of DRDY with Respect to FIFO State (Drdy_Mode) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_MODE_DRDY_PER_CONVERSION = 0, /**< Data Ready Per Conversion */ + CORE_MODE_DRDY_PER_CYCLE = 1, /**< Data Ready Per Cycle */ + CORE_MODE_DRDY_PER_FIFO_FILL = 2 /**< Data Ready Per FIFO Fill / Multi-Cycle Burst */ +} CORE_Mode_Drdy_Mode; + + +/* ========================================================================= + *! \enum CORE_Mode_Calibration_Method + *! \brief Indicates If Calibration is Required on 'Latch' Command (Calibration_Method) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_MODE_NO_CAL = 0, /**< No Calibration Performed */ + CORE_MODE_DO_CAL = 1 /**< Calibration Performed */ +} CORE_Mode_Calibration_Method; + + +/* ========================================================================= + *! \enum CORE_Mode_FFT_Mode + *! \brief Indicates Single or Multiple Sequence of FFTs (FFT_Mode) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_MODE_FFT_MODE_SINGLE = 0, /**< Perform Single Sequence of FFT(s) on Selected Channel(s) */ + CORE_MODE_FFT_MODE_CONTINUOUS = 1 /**< Perform Continuous Sequence of FFTs on Selected Channel(s) */ +} CORE_Mode_FFT_Mode; + + +/* ========================================================================= + *! \enum CORE_Mode_Ext_Flash_Store + *! \brief Indicates If Measurement Data Should Be Stored in Flash (Ext_Flash_Store) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_MODE_EXT_FLASH_NOT_USED = 0, /**< Do Not Use External Flash */ + CORE_MODE_EXT_FLASH_USED = 1 /**< Use External Flash */ +} CORE_Mode_Ext_Flash_Store; + + +/* ========================================================================== + *! \struct CORE_Mode_Struct + *! \brief Operating Mode and DRDY Control Register bit field structure + * ========================================================================== */ +typedef struct CORE_Mode_t { + union { + struct { + uint8_t Conversion_Mode : 2; /**< Conversion Mode */ + uint8_t Drdy_Mode : 2; /**< Indicates Behavior of DRDY with Respect to FIFO State */ + uint8_t Calibration_Method : 1; /**< Indicates If Calibration is Required on 'Latch' Command */ + uint8_t FFT_Mode : 1; /**< Indicates Single or Multiple Sequence of FFTs */ + uint8_t reserved6 : 1; + uint8_t Ext_Flash_Store : 1; /**< Indicates If Measurement Data Should Be Stored in Flash */ + }; + uint8_t VALUE8; + }; +} CORE_Mode_t; + +/*@}*/ + +/** @defgroup Power_Config General Configuration (Power_Config) Register + * General Configuration (Power_Config) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Power_Config_Power_Mode_ADC + *! \brief ADC Power Mode (Power_Mode_ADC) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_POWER_CONFIG_ADC_LOW_POWER = 0, /**< ADC Low Power Mode */ + CORE_POWER_CONFIG_ADC_MID_POWER = 1, /**< ADC Mid Power Mode */ + CORE_POWER_CONFIG_ADC_FULL_POWER = 2 /**< ADC Full Power Mode */ +} CORE_Power_Config_Power_Mode_ADC; + + +/* ========================================================================== + *! \struct CORE_Power_Config_Struct + *! \brief General Configuration Register bit field structure + * ========================================================================== */ +typedef struct CORE_Power_Config_t { + union { + struct { + uint8_t Power_Mode_ADC : 2; /**< ADC Power Mode */ + uint8_t reserved2 : 6; + }; + uint8_t VALUE8; + }; +} CORE_Power_Config_t; + +/*@}*/ + +/** @defgroup Cycle_Control Measurement Cycle (Cycle_Control) Register + * Measurement Cycle (Cycle_Control) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Cycle_Control_Cycle_Type + *! \brief Type of Measurement Cycle (Cycle_Type) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_CYCLE_CONTROL_CYCLE_TYPE_SWITCH = 0, /**< Switch Channels After Every Conversion */ + CORE_CYCLE_CONTROL_CYCLE_TYPE_FULL = 1 /**< Perform Full Number Of Conversions On A Channel Consecutively */ +} CORE_Cycle_Control_Cycle_Type; + + +/* ========================================================================= + *! \enum CORE_Cycle_Control_Filter_Settling + *! \brief Determines ADC Filter Settling in a Multi-Channel Sequence (Filter_Settling) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_CYCLE_CONTROL_FILTER_SETTLING_SETTLED = 0, /**< ADC Result Fully Settles for Every Output */ + CORE_CYCLE_CONTROL_FILTER_SETTLING_FAST = 1 /**< ADC Result Appears at Higher Update Rate for Consecutive Conversions */ +} CORE_Cycle_Control_Filter_Settling; + + +/* ========================================================================= + *! \enum CORE_Cycle_Control_Cycle_Time_Units + *! \brief Units for Cycle Time (Cycle_Time_Units) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_CYCLE_CONTROL_MICROSECONDS = 0, /**< Micro-Seconds */ + CORE_CYCLE_CONTROL_MILLISECONDS = 1, /**< Milli-Seconds */ + CORE_CYCLE_CONTROL_SECONDS = 2 /**< Seconds */ +} CORE_Cycle_Control_Cycle_Time_Units; + + +/* ========================================================================== + *! \struct CORE_Cycle_Control_Struct + *! \brief Measurement Cycle Register bit field structure + * ========================================================================== */ +typedef struct CORE_Cycle_Control_t { + union { + struct { + uint16_t Cycle_Time : 12; /**< Duration of a Full Measurement Cycle */ + uint16_t Cycle_Type : 1; /**< Type of Measurement Cycle */ + uint16_t Filter_Settling : 1; /**< Determines ADC Filter Settling in a Multi-Channel Sequence */ + uint16_t Cycle_Time_Units : 2; /**< Units for Cycle Time */ + }; + uint16_t VALUE16; + }; +} CORE_Cycle_Control_t; + +/*@}*/ + +/** @defgroup Fifo_Num_Cycles Number of Measurement Cycles to Store in FIFO (Fifo_Num_Cycles) Register + * Number of Measurement Cycles to Store in FIFO (Fifo_Num_Cycles) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Fifo_Num_Cycles_Struct + *! \brief Number of Measurement Cycles to Store in FIFO Register bit field structure + * ========================================================================== */ +typedef struct CORE_Fifo_Num_Cycles_t { + union { + struct { + uint8_t Fifo_Num_Cycles : 8; /**< How Many Cycles to Fill FIFO */ + }; + uint8_t VALUE8; + }; +} CORE_Fifo_Num_Cycles_t; + +/*@}*/ + +/** @defgroup Multi_Cycle_Repeat_Interval Time Between Repeats of Multi-Cycle Conversions.... (Multi_Cycle_Repeat_Interval) Register + * Time Between Repeats of Multi-Cycle Conversions.... (Multi_Cycle_Repeat_Interval) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Multi_Cycle_Repeat_Interval_Struct + *! \brief Time Between Repeats of Multi-Cycle Conversions.... Register bit field structure + * ========================================================================== */ +typedef struct CORE_Multi_Cycle_Repeat_Interval_t { + union { + struct { + uint32_t Multi_Cycle_Repeat_Interval : 24; /**< Defines Time Between Repetitions of Measurement Cycles. */ + uint32_t reserved24 : 8; + }; + uint32_t VALUE32; + }; +} CORE_Multi_Cycle_Repeat_Interval_t; + +/*@}*/ + +/** @defgroup Status General Status (Status) Register + * General Status (Status) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Status_Struct + *! \brief General Status Register bit field structure + * ========================================================================== */ +typedef struct CORE_Status_t { + union { + struct { + uint8_t reserved0 : 1; + uint8_t Alert_Active : 1; /**< Indicates One or More Sensors Alerts are Active */ + uint8_t Error : 1; /**< Indicates an Error */ + uint8_t Drdy : 1; /**< Indicates a New Sensor Result is Available to Be Read */ + uint8_t Cmd_Running : 1; /**< Indicates a Special Command is Active */ + uint8_t FIFO_Error : 1; /**< Indicates Error with FIFO */ + uint8_t reserved6 : 2; + }; + uint8_t VALUE8; + }; +} CORE_Status_t; + +/*@}*/ + +/** @defgroup Diagnostics_Status Diagnostics Status (Diagnostics_Status) Register + * Diagnostics Status (Diagnostics_Status) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Diagnostics_Status_Struct + *! \brief Diagnostics Status Register bit field structure + * ========================================================================== */ +typedef struct CORE_Diagnostics_Status_t { + union { + struct { + uint16_t Diag_Checksum_Error : 1; /**< Indicates Error on Internal Checksum Calculations */ + uint16_t Diag_Comms_Error : 1; /**< Indicates Error on Internal Device Communications */ + uint16_t Diag_Supply_Monitor_Error : 1; /**< Indicates Low Voltage on Internal Supply Voltages */ + uint16_t Diag_Supply_Cap_Error : 1; /**< Indicates Fault on Internal Supply Regulator Capacitor */ + uint16_t reserved4 : 8; + uint16_t Diag_Conversion_Error : 1; /**< Indicates Error During Internal ADC Conversions */ + uint16_t Diag_Calibration_Error : 1; /**< Indicates Error During Internal Device Calibrations */ + uint16_t reserved14 : 2; + }; + uint16_t VALUE16; + }; +} CORE_Diagnostics_Status_t; + +/*@}*/ + +/** @defgroup Channel_Alert_Status Alert Status Summary (Channel_Alert_Status) Register + * Alert Status Summary (Channel_Alert_Status) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Channel_Alert_Status_Struct + *! \brief Alert Status Summary Register bit field structure + * ========================================================================== */ +typedef struct CORE_Channel_Alert_Status_t { + union { + struct { + uint16_t Alert_Ch0 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch1 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch2 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch3 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch4 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch5 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch6 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch7 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch8 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch9 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch10 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch11 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch12 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch13 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch14 : 1; /**< Indicates Channel Alert is Active */ + uint16_t Alert_Ch15 : 1; /**< Indicates Channel Alert is Active */ + }; + uint16_t VALUE16; + }; +} CORE_Channel_Alert_Status_t; + +/*@}*/ + +/** @defgroup Alert_Status_2 Additional Alert Status Information (Alert_Status_2) Register + * Additional Alert Status Information (Alert_Status_2) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Alert_Status_2_Struct + *! \brief Additional Alert Status Information Register bit field structure + * ========================================================================== */ +typedef struct CORE_Alert_Status_2_t { + union { + struct { + uint16_t reserved0 : 1; + uint16_t LUT_Error : 1; /**< Indicates Error with One or More Look-Up-Tables */ + uint16_t Configuration_Error : 1; /**< Indicates Error with Programmed Configuration */ + uint16_t Temperature_Alert_Hi : 1; /**< Indicates Device Temperature High Alert */ + uint16_t Temperature_Alert_Lo : 1; /**< Indicates Device Temperature Low Alert */ + uint16_t Temperature_Alarm_Hi : 1; /**< Indicates Device Temperature High Alarm */ + uint16_t Temperature_Alarm_Lo : 1; /**< Indicates Device Temperature Low Alarm */ + uint16_t Ext_Flash_Error : 1; /**< Indicates with External Flash Memory */ + uint16_t reserved8 : 8; + }; + uint16_t VALUE16; + }; +} CORE_Alert_Status_2_t; + +/*@}*/ + +/** @defgroup Alert_Detail_Ch Detailed Error Information (Alert_Detail_Ch) Register + * Detailed Error Information (Alert_Detail_Ch) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Alert_Detail_Ch_Struct + *! \brief Detailed Error Information Register bit field structure + * ========================================================================== */ +typedef struct CORE_Alert_Detail_Ch_t { + union { + struct { + uint16_t Time_Out : 1; /**< Indicates Time-Out Error from Digital Sensor */ + uint16_t Under_Range : 1; /**< Indicates Channel Under-Range */ + uint16_t Over_Range : 1; /**< Indicates Channel Over-Range */ + uint16_t Low_Limit : 1; /**< Indicates Sensor Result is Less Than Low Limit */ + uint16_t High_Limit : 1; /**< Indicates Sensor Result is Greater Than High Limit */ + uint16_t Sensor_Open : 1; /**< Indicates Sensor Input is Open Circuit */ + uint16_t Ref_Detect : 1; /**< Indicates Whether ADC Reference is Valid */ + uint16_t Calibration_Invalid : 1; /**< Indicates Problem During Calibration of Channel */ + uint16_t Config_Err : 1; /**< Indicates Configuration Error on Channel */ + uint16_t LUT_Error_Ch : 1; /**< Indicates Error with Channel Look-Up-Table */ + uint16_t Under_Voltage : 1; /**< Indicates Channel Under-Voltage */ + uint16_t Over_Voltage : 1; /**< Indicates Channel Over-Voltage */ + uint16_t Correction_UnderRange : 1; /**< Indicates Result Less Than LUT/Equation Range */ + uint16_t Correction_OverRange : 1; /**< Indicates Result Larger Than LUT/Equation Range */ + uint16_t Sensor_Not_Ready : 1; /**< Indicates Digital Sensor Not Ready When Read */ + uint16_t Comp_Not_Ready : 1; /**< Indicates Compensation Channel Not Ready When Required */ + }; + uint16_t VALUE16; + }; +} CORE_Alert_Detail_Ch_t; + +/*@}*/ + +/** @defgroup Error_Code Code Indicating Source of Error (Error_Code) Register + * Code Indicating Source of Error (Error_Code) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Error_Code_Struct + *! \brief Code Indicating Source of Error Register bit field structure + * ========================================================================== */ +typedef struct CORE_Error_Code_t { + union { + struct { + uint16_t Error_Code : 16; /**< Code Indicating Type of Error */ + }; + uint16_t VALUE16; + }; +} CORE_Error_Code_t; + +/*@}*/ + +/** @defgroup Alert_Code Code Indicating Source of Alert (Alert_Code) Register + * Code Indicating Source of Alert (Alert_Code) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Alert_Code_Struct + *! \brief Code Indicating Source of Alert Register bit field structure + * ========================================================================== */ +typedef struct CORE_Alert_Code_t { + union { + struct { + uint16_t Alert_Code : 16; /**< Code Indicating Type of Alert */ + }; + uint16_t VALUE16; + }; +} CORE_Alert_Code_t; + +/*@}*/ + +/** @defgroup External_Reference1 External Reference Information (External_Reference1) Register + * External Reference Information (External_Reference1) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_External_Reference1_Struct + *! \brief External Reference Information Register bit field structure + * ========================================================================== */ +typedef struct CORE_External_Reference1_t { + union { + struct { + float Ext_Refin1_Value; /**< Refin1 Value */ + }; + float VALUE32; + }; +} CORE_External_Reference1_t; + +/*@}*/ + +/** @defgroup External_Reference2 External Reference Information (External_Reference2) Register + * External Reference Information (External_Reference2) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_External_Reference2_Struct + *! \brief External Reference Information Register bit field structure + * ========================================================================== */ +typedef struct CORE_External_Reference2_t { + union { + struct { + float Ext_Refin2_Value; /**< Refin2 Value */ + }; + float VALUE32; + }; +} CORE_External_Reference2_t; + +/*@}*/ + +/** @defgroup Diagnostics_Control Diagnostic Control (Diagnostics_Control) Register + * Diagnostic Control (Diagnostics_Control) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Diagnostics_Control_Diag_OSD_Freq + *! \brief Diagnostics Open Sensor Detect Frequency (Diag_OSD_Freq) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_DIAGNOSTICS_CONTROL_OCD_OFF = 0, /**< No Open-Circuit Detection During Measurement */ + CORE_DIAGNOSTICS_CONTROL_OCD_PER_1_CYCLE = 1, /**< Open-Circuit Detection Performed Once Per Measurement Cycle */ + CORE_DIAGNOSTICS_CONTROL_OCD_PER_100_CYCLES = 2, /**< Open-Circuit Detection Performed Once Per Hundred Measurement Cycles */ + CORE_DIAGNOSTICS_CONTROL_OCD_PER_1000_CYCLES = 3 /**< Open-Circuit Detection Performed Once Per Thousand Measurement Cycles */ +} CORE_Diagnostics_Control_Diag_OSD_Freq; + + +/* ========================================================================= + *! \enum CORE_Diagnostics_Control_Temperarure_Alarm_Action + *! \brief Determines Output in Response to Temperature Alarm (Temperarure_Alarm_Action) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_DIAGNOSTICS_CONTROL_TEMPERATURE_ALARM_NAN = 0, /**< Sensor Output Equals Not-A-Number in Response to Temperature Alarm */ + CORE_DIAGNOSTICS_CONTROL_TEMPERATURE_ALARM_OUTPUT_ACTIVE = 1 /**< Sensor Output is not Clamped to Not-A-Number in Response to Temperature Alarm */ +} CORE_Diagnostics_Control_Temperarure_Alarm_Action; + + +/* ========================================================================== + *! \struct CORE_Diagnostics_Control_Struct + *! \brief Diagnostic Control Register bit field structure + * ========================================================================== */ +typedef struct CORE_Diagnostics_Control_t { + union { + struct { + uint16_t Diag_Global_En : 1; /**< Diagnostics Global Enable */ + uint16_t Diag_Meas_En : 1; /**< Diagnostics Measure Enable */ + uint16_t Diag_OSD_Freq : 2; /**< Diagnostics Open Sensor Detect Frequency */ + uint16_t Temperarure_Alarm_Action : 1; /**< Determines Output in Response to Temperature Alarm */ + uint16_t reserved5 : 11; + }; + uint16_t VALUE16; + }; +} CORE_Diagnostics_Control_t; + +/*@}*/ + +/** @defgroup Data_FIFO FIFO Buffer of Sensor Results (Data_FIFO) Register + * FIFO Buffer of Sensor Results (Data_FIFO) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Data_FIFO_Struct + *! \brief FIFO Buffer of Sensor Results Register bit field structure + * ========================================================================== */ +typedef struct CORE_Data_FIFO_t { + union { + struct { + uint8_t Data_Fifo : 8; /**< Fifo Buffer of Sensor Results */ + }; + uint8_t VALUE8; + }; +} CORE_Data_FIFO_t; + +/*@}*/ + +/** @defgroup Debug_Code Additional Information on Source of Alert or Errors (Debug_Code) Register + * Additional Information on Source of Alert or Errors (Debug_Code) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Debug_Code_Struct + *! \brief Additional Information on Source of Alert or Errors Register bit field structure + * ========================================================================== */ +typedef struct CORE_Debug_Code_t { + union { + struct { + uint32_t Debug_Code : 32; /**< Additional Information on Source of Alert or Errors */ + }; + uint32_t VALUE32; + }; +} CORE_Debug_Code_t; + +/*@}*/ + +/** @defgroup FFT_Config FFT Configuration (FFT_Config) Register + * FFT Configuration (FFT_Config) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_FFT_Config_FFT_Num_Bins + *! \brief Indicates Number of Bins in FFT (FFT_Num_Bins) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_FFT_CONFIG_FFT_BINS_256 = 0, /**< FFT Size 256 */ + CORE_FFT_CONFIG_FFT_BINS_512 = 1, /**< FFT Size 512 */ + CORE_FFT_CONFIG_FFT_BINS_1024 = 2, /**< FFT Size 1024 */ + CORE_FFT_CONFIG_FFT_BINS_2048 = 3 /**< FFT Size 2048 */ +} CORE_FFT_Config_FFT_Num_Bins; + + +/* ========================================================================= + *! \enum CORE_FFT_Config_FFT_Window + *! \brief Indicates Window Type for FFT (FFT_Window) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_FFT_CONFIG_FFT_WINDOW_NONE = 0, /**< No Window */ + CORE_FFT_CONFIG_FFT_WINDOW_HANN = 1, /**< Hann Window */ + CORE_FFT_CONFIG_FFT_WINDOW_BLACKMANN_HARRIS = 2, /**< Blackman-Harris-Nuttall Window */ + CORE_FFT_CONFIG_FFT_WINDOW_TBD = 3 /**< Reserved */ +} CORE_FFT_Config_FFT_Window; + + +/* ========================================================================= + *! \enum CORE_FFT_Config_FFT_Output + *! \brief Indicates FFT Output Format (FFT_Output) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_FFT_CONFIG_FFT_OUTPUT_FULL = 0, /**< N/2-Term Amplitude Response */ + CORE_FFT_CONFIG_FFT_OUTPUT_MAX16 = 1, /**< Bin-Number and Amplitude of 16 Highest Peaks of Amplitude Response */ + CORE_FFT_CONFIG_FFT_OUTPUT_FULL_WITH_RAW = 2 /**< N/2-Term Amplitude Response Plus N Raw ADC Samples */ +} CORE_FFT_Config_FFT_Output; + + +/* ========================================================================= + *! \enum CORE_FFT_Config_FFT_Num_Channels + *! \brief Indicates Number of Channels for FFT (FFT_Num_Channels) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_FFT_CONFIG_FFT_CHANS_1 = 0, /**< One FFT Channel */ + CORE_FFT_CONFIG_FFT_CHANS_2 = 1, /**< Two FFT Channels */ + CORE_FFT_CONFIG_FFT_CHANS_3 = 2, /**< Three FFT Channels */ + CORE_FFT_CONFIG_FFT_CHANS_4 = 3 /**< Four FFT Channels */ +} CORE_FFT_Config_FFT_Num_Channels; + + +/* ========================================================================== + *! \struct CORE_FFT_Config_Struct + *! \brief FFT Configuration Register bit field structure + * ========================================================================== */ +typedef struct CORE_FFT_Config_t { + union { + struct { + uint32_t FFT_Num_Bins : 2; /**< Indicates Number of Bins in FFT */ + uint32_t FFT_Window : 2; /**< Indicates Window Type for FFT */ + uint32_t FFT_Output : 2; /**< Indicates FFT Output Format */ + uint32_t FFT_Num_Channels : 2; /**< Indicates Number of Channels for FFT */ + uint32_t reserved8 : 24; + }; + uint32_t VALUE32; + }; +} CORE_FFT_Config_t; + +/*@}*/ + +/** @defgroup Advanced_Sensor_Access Enables Access to Advanced Sensor Configuration (Advanced_Sensor_Access) Register + * Enables Access to Advanced Sensor Configuration (Advanced_Sensor_Access) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Advanced_Sensor_Access_Struct + *! \brief Enables Access to Advanced Sensor Configuration Register bit field structure + * ========================================================================== */ +typedef struct CORE_Advanced_Sensor_Access_t { + union { + struct { + uint16_t Advanced_Sensor_Access : 16; /**< Write Specific Key Value to Access Advanced Sensors */ + }; + uint16_t VALUE16; + }; +} CORE_Advanced_Sensor_Access_t; + +/*@}*/ + +/** @defgroup LUT_Select Read/Write Strobe (LUT_Select) Register + * Read/Write Strobe (LUT_Select) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_LUT_Select_LUT_RW + *! \brief Read or Write LUT Data (LUT_RW) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_LUT_SELECT_LUT_READ = 0, /**< Read Addressed LUT Data */ + CORE_LUT_SELECT_LUT_WRITE = 1 /**< Write Addressed LUT Data */ +} CORE_LUT_Select_LUT_RW; + + +/* ========================================================================== + *! \struct CORE_LUT_Select_Struct + *! \brief Read/Write Strobe Register bit field structure + * ========================================================================== */ +typedef struct CORE_LUT_Select_t { + union { + struct { + uint8_t reserved0 : 7; + uint8_t LUT_RW : 1; /**< Read or Write LUT Data */ + }; + uint8_t VALUE8; + }; +} CORE_LUT_Select_t; + +/*@}*/ + +/** @defgroup LUT_Offset Offset into Selected LUT (LUT_Offset) Register + * Offset into Selected LUT (LUT_Offset) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_LUT_Offset_Struct + *! \brief Offset into Selected LUT Register bit field structure + * ========================================================================== */ +typedef struct CORE_LUT_Offset_t { + union { + struct { + uint16_t LUT_Offset : 14; /**< Offset into Look-Up-Table */ + uint16_t reserved14 : 2; + }; + uint16_t VALUE16; + }; +} CORE_LUT_Offset_t; + +/*@}*/ + +/** @defgroup LUT_Data Data to Read/Write from Addressed LUT Entry (LUT_Data) Register + * Data to Read/Write from Addressed LUT Entry (LUT_Data) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_LUT_Data_Struct + *! \brief Data to Read/Write from Addressed LUT Entry Register bit field structure + * ========================================================================== */ +typedef struct CORE_LUT_Data_t { + union { + struct { + uint8_t LUT_Data : 8; /**< Data Byte to Write to / Read from Look-Up-Table */ + }; + uint8_t VALUE8; + }; +} CORE_LUT_Data_t; + +/*@}*/ + +/** @defgroup Ext_Flash_Index Start Position (Sample No.) for Retrieval of Ext. Flash Data (Ext_Flash_Index) Register + * Start Position (Sample No.) for Retrieval of Ext. Flash Data (Ext_Flash_Index) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Ext_Flash_Index_Struct + *! \brief Start Position (Sample No.) for Retrieval of Ext. Flash Data Register bit field structure + * ========================================================================== */ +typedef struct CORE_Ext_Flash_Index_t { + union { + struct { + uint32_t Ext_Flash_Index : 32; /**< Start Position (Sample No.) for Retrieval of Ext. Flash Data */ + }; + uint32_t VALUE32; + }; +} CORE_Ext_Flash_Index_t; + +/*@}*/ + +/** @defgroup Ext_Flash_Sample_Count Indicates How Many Samples Stored in External Flash (Ext_Flash_Sample_Count) Register + * Indicates How Many Samples Stored in External Flash (Ext_Flash_Sample_Count) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Ext_Flash_Sample_Count_Struct + *! \brief Indicates How Many Samples Stored in External Flash Register bit field structure + * ========================================================================== */ +typedef struct CORE_Ext_Flash_Sample_Count_t { + union { + struct { + uint32_t Ext_Flash_Sample_Count : 32; /**< Indicates How Many Samples Stored in External Flash */ + }; + uint32_t VALUE32; + }; +} CORE_Ext_Flash_Sample_Count_t; + +/*@}*/ + +/** @defgroup Ext_Flash_Data Data Read Back from External Flash (Ext_Flash_Data) Register + * Data Read Back from External Flash (Ext_Flash_Data) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Ext_Flash_Data_Struct + *! \brief Data Read Back from External Flash Register bit field structure + * ========================================================================== */ +typedef struct CORE_Ext_Flash_Data_t { + union { + struct { + uint8_t Ext_Flash_Data : 8; /**< Data Read Back from External Flash */ + }; + uint8_t VALUE8; + }; +} CORE_Ext_Flash_Data_t; + +/*@}*/ + +/** @defgroup Revision Hardware, Firmware Revision (Revision) Register + * Hardware, Firmware Revision (Revision) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Revision_Struct + *! \brief Hardware, Firmware Revision Register bit field structure + * ========================================================================== */ +typedef struct CORE_Revision_t { + union { + struct { + uint32_t Rev_Patch : 16; /**< Patch Revision Information */ + uint32_t Rev_Minor : 8; /**< Minor Revision Information */ + uint32_t Rev_Major : 8; /**< Major Revision Information */ + }; + uint32_t VALUE32; + }; +} CORE_Revision_t; + +/*@}*/ + +/** @defgroup Channel_Count Number of Channel Occurrences per Measurement Cycle (Channel_Count) Register + * Number of Channel Occurrences per Measurement Cycle (Channel_Count) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Channel_Count_Struct + *! \brief Number of Channel Occurrences per Measurement Cycle Register bit field structure + * ========================================================================== */ +typedef struct CORE_Channel_Count_t { + union { + struct { + uint8_t Channel_Count : 7; /**< How Many Times Channel Should Appear in One Cycle */ + uint8_t Channel_Enable : 1; /**< Enable Channel in Measurement Cycle */ + }; + uint8_t VALUE8; + }; +} CORE_Channel_Count_t; + +/*@}*/ + +/** @defgroup Channel_Options Position of Channel Within Sequence and Enable for FFT (Channel_Options) Register + * Position of Channel Within Sequence and Enable for FFT (Channel_Options) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Channel_Options_FFT_Enable_Ch + *! \brief Indicates Channel to Be Used for FFT (FFT_Enable_Ch) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_CHANNEL_OPTIONS_NO_FFT = 0, /**< FFT Will not be Performed on This Channel */ + CORE_CHANNEL_OPTIONS_DO_FFT = 1 /**< FFT Will be Performed on This Channel */ +} CORE_Channel_Options_FFT_Enable_Ch; + + +/* ========================================================================== + *! \struct CORE_Channel_Options_Struct + *! \brief Position of Channel Within Sequence and Enable for FFT Register bit field structure + * ========================================================================== */ +typedef struct CORE_Channel_Options_t { + union { + struct { + uint8_t Channel_Priority : 4; /**< Indicates Priority or Position of This Channel in Sequence */ + uint8_t reserved4 : 3; + uint8_t FFT_Enable_Ch : 1; /**< Indicates Channel to Be Used for FFT */ + }; + uint8_t VALUE8; + }; +} CORE_Channel_Options_t; + +/*@}*/ + +/** @defgroup Sensor_Type Sensor Select (Sensor_Type) Register + * Sensor Select (Sensor_Type) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Sensor_Type_Sensor_Type + *! \brief Sensor Type (Sensor_Type) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_T_DEF_L1 = 0, /**< Thermocouple T-Type Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_J_DEF_L1 = 1, /**< Thermocouple J-Type Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_K_DEF_L1 = 2, /**< Thermocouple K-Type Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_1_DEF_L2 = 8, /**< Thermocouple Sensor 1 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_2_DEF_L2 = 9, /**< Thermocouple Sensor 2 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_3_DEF_L2 = 10, /**< Thermocouple Sensor 3 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_4_DEF_L2 = 11, /**< Thermocouple Sensor 4 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_T_ADV_L1 = 16, /**< Thermocouple T-Type Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_J_ADV_L1 = 17, /**< Thermocouple J-Type Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_K_ADV_L1 = 18, /**< Thermocouple K-Type Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_1_ADV_L2 = 24, /**< Thermocouple Sensor 1 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_2_ADV_L2 = 25, /**< Thermocouple Sensor 2 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_3_ADV_L2 = 26, /**< Thermocouple Sensor 3 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMOCOUPLE_4_ADV_L2 = 27, /**< Thermocouple Sensor 4 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT100_DEF_L1 = 32, /**< RTD 2 Wire PT100 Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT1000_DEF_L1 = 33, /**< RTD 2 Wire PT1000 Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_1_DEF_L2 = 40, /**< RTD 2 Wire Sensor 1 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_2_DEF_L2 = 41, /**< RTD 2 Wire Sensor 2 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_3_DEF_L2 = 42, /**< RTD 2 Wire Sensor 3 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_4_DEF_L2 = 43, /**< RTD 2 Wire Sensor 4 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT100_ADV_L1 = 48, /**< RTD 2 Wire PT100 Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_PT1000_ADV_L1 = 49, /**< RTD 2 Wire PT1000 Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_1_ADV_L2 = 56, /**< RTD 2 Wire Sensor 1 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_2_ADV_L2 = 57, /**< RTD 2 Wire Sensor 2 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_3_ADV_L2 = 58, /**< RTD 2 Wire Sensor 3 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_2W_4_ADV_L2 = 59, /**< RTD 2 Wire Sensor 4 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT100_DEF_L1 = 64, /**< RTD 3 Wire PT100 Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT1000_DEF_L1 = 65, /**< RTD 3 Wire PT1000 Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_1_DEF_L2 = 72, /**< RTD 3 Wire Sensor 1 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_2_DEF_L2 = 73, /**< RTD 3 Wire Sensor 2 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_3_DEF_L2 = 74, /**< RTD 3 Wire Sensor 3 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_4_DEF_L2 = 75, /**< RTD 3 Wire Sensor 4 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT100_ADV_L1 = 80, /**< RTD 3 Wire PT100 Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_PT1000_ADV_L1 = 81, /**< RTD 3 Wire PT1000 Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_1_ADV_L2 = 88, /**< RTD 3 Wire Sensor 1 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_2_ADV_L2 = 89, /**< RTD 3 Wire Sensor 2 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_3_ADV_L2 = 90, /**< RTD 3 Wire Sensor 3 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_3W_4_ADV_L2 = 91, /**< RTD 3 Wire Sensor 4 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT100_DEF_L1 = 96, /**< RTD 4 Wire PT100 Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT1000_DEF_L1 = 97, /**< RTD 4 Wire PT1000 Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_1_DEF_L2 = 104, /**< RTD 4 Wire Sensor 1 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_2_DEF_L2 = 105, /**< RTD 4 Wire Sensor 2 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_3_DEF_L2 = 106, /**< RTD 4 Wire Sensor 3 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_4_DEF_L2 = 107, /**< RTD 4 Wire Sensor 4 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT100_ADV_L1 = 112, /**< RTD 4 Wire PT100 Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_PT1000_ADV_L1 = 113, /**< RTD 4 Wire PT1000 Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_1_ADV_L2 = 120, /**< RTD 4 Wire Sensor 1 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_2_ADV_L2 = 121, /**< RTD 4 Wire Sensor 2 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_3_ADV_L2 = 122, /**< RTD 4 Wire Sensor 3 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_RTD_4W_4_ADV_L2 = 123, /**< RTD 4 Wire Sensor 4 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_A_10K_DEF_L1 = 128, /**< Thermistor Type A 10kOhm Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_B_10K_DEF_L1 = 129, /**< Thermistor Type B 10kOhm Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_1_DEF_L2 = 136, /**< Thermistor Sensor 1 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_2_DEF_L2 = 137, /**< Thermistor Sensor 2 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_3_DEF_L2 = 138, /**< Thermistor Sensor 3 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_4_DEF_L2 = 139, /**< Thermistor Sensor 4 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_A_10K_ADV_L1 = 144, /**< Thermistor Type A 10kOhm Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_B_10K_ADV_L1 = 145, /**< Thermistor Type B 10kOhm Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_1_ADV_L2 = 152, /**< Thermistor Sensor 1 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_2_ADV_L2 = 153, /**< Thermistor Sensor 2 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_3_ADV_L2 = 154, /**< Thermistor Sensor 3 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_THERMISTOR_4_ADV_L2 = 155, /**< Thermistor Sensor 4 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_1_DEF_L2 = 168, /**< Bridge 4 Wire Sensor 1 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_2_DEF_L2 = 169, /**< Bridge 4 Wire Sensor 2 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_3_DEF_L2 = 170, /**< Bridge 4 Wire Sensor 3 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_4_DEF_L2 = 171, /**< Bridge 4 Wire Sensor 4 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_1_ADV_L2 = 184, /**< Bridge 4 Wire Sensor 1 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_2_ADV_L2 = 185, /**< Bridge 4 Wire Sensor 2 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_3_ADV_L2 = 186, /**< Bridge 4 Wire Sensor 2 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_4W_4_ADV_L2 = 187, /**< Bridge 4 Wire Sensor 2 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_1_DEF_L2 = 200, /**< Bridge 6 Wire Sensor 1 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_2_DEF_L2 = 201, /**< Bridge 6 Wire Sensor 2 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_3_DEF_L2 = 202, /**< Bridge 6 Wire Sensor 3 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_4_DEF_L2 = 203, /**< Bridge 6 Wire Sensor 4 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_1_ADV_L2 = 216, /**< Bridge 6 Wire Sensor 1 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_2_ADV_L2 = 217, /**< Bridge 6 Wire Sensor 2 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_3_ADV_L2 = 218, /**< Bridge 6 Wire Sensor 3 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_BRIDGE_6W_4_ADV_L2 = 219, /**< Bridge 6 Wire Sensor 4 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_DIODE_2C_TYPEA_DEF_L1 = 224, /**< Diode 2 Current Type A Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_DIODE_3C_TYPEA_DEF_L1 = 225, /**< Diode 3 Current Type A Sensor Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_DIODE_2C_1_DEF_L2 = 232, /**< Diode 2 Current Sensor 1 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_DIODE_3C_1_DEF_L2 = 233, /**< Diode 3 Current Sensor 1 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_DIODE_2C_TYPEA_ADV_L1 = 240, /**< Diode 2 Current Type A Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_DIODE_3C_TYPEA_ADV_L1 = 241, /**< Diode 3 Current Type A Sensor Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_DIODE_2C_1_ADV_L2 = 248, /**< Diode 2 Current Sensor 1 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_DIODE_3C_1_ADV_L2 = 249, /**< Diode 3 Current Sensor 1 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_MICROPHONE_A_DEF_L1 = 256, /**< Microphone With No External Amplifier Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_MICROPHONE_B_DEF_L1 = 257, /**< Microphone With External Amplifier Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_MICROPHONE_1_DEF_L2 = 264, /**< Microphone With No External Amplifier Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_MICROPHONE_2_DEF_L2 = 265, /**< Microphone With External Amplifier Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_MICROPHONE_A_ADV_L1 = 272, /**< Microphone With No External Amplifier Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_MICROPHONE_B_ADV_L1 = 273, /**< Microphone With External Amplifier Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_MICROPHONE_1_ADV_L2 = 278, /**< Microphone With No External Amplifier Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_MICROPHONE_2_ADV_L2 = 279, /**< Microphone With External Amplifier Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_VOLTAGE = 512, /**< Voltage Input */ + CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1 = 544, /**< Voltage Output Pressure Sensor A Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_B_DEF_L1 = 545, /**< Voltage Output Pressure Sensor B Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_1_DEF_L2 = 552, /**< Voltage Output Pressure Sensor 1 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_2_DEF_L2 = 553, /**< Voltage Output Pressure Sensor 2 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_A_ADV_L1 = 560, /**< Voltage Output Pressure Sensor A Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_B_ADV_L1 = 561, /**< Voltage Output Pressure Sensor B Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_1_ADV_L2 = 568, /**< Voltage Output Pressure Sensor 1 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_VOLTAGE_PRESSURE_2_ADV_L2 = 569, /**< Voltage Output Pressure Sensor 2 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_CURRENT = 768, /**< Current Input */ + CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_A_DEF_L1 = 800, /**< Current Output Pressure Sensor A Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_1_DEF_L2 = 808, /**< Current Output Pressure Sensor 1 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_2_DEF_L2 = 809, /**< Current Output Pressure Sensor 2 Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_A_ADV_L1 = 816, /**< Current Output Pressure Sensor A Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_1_ADV_L2 = 824, /**< Current Output Pressure Sensor 1 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_CURRENT_PRESSURE_2_ADV_L2 = 825, /**< Current Output Pressure Sensor 2 Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_DEF_L1 = 2048, /**< I2C Pressure Sensor A Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_DEF_L1 = 2049, /**< I2C Pressure Sensor B Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_DEF_L2 = 2056, /**< I2C Pressure Sensor A Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_DEF_L2 = 2057, /**< I2C Pressure Sensor B Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_ADV_L1 = 2064, /**< I2C Pressure Sensor A Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_ADV_L1 = 2065, /**< I2C Pressure Sensor B Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_A_ADV_L2 = 2072, /**< I2C Pressure Sensor A Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_I2C_PRESSURE_B_ADV_L2 = 2073, /**< I2C Pressure Sensor B Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_DEF_L1 = 2112, /**< I2C Humidity Sensor A Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_DEF_L1 = 2113, /**< I2C Humidity Sensor B Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_DEF_L2 = 2120, /**< I2C Humidity Sensor A Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_DEF_L2 = 2121, /**< I2C Humidity Sensor B Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_ADV_L1 = 2128, /**< I2C Humidity Sensor A Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_ADV_L1 = 2129, /**< I2C Humidity Sensor B Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_A_ADV_L2 = 2136, /**< I2C Humidity Sensor A Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_I2C_HUMIDITY_B_ADV_L2 = 2137, /**< I2C Humidity Sensor B Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_DEF_L1 = 2176, /**< I2C Ambient Light Sensor A Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_DEF_L2 = 2184, /**< I2C Ambient Light Sensor A Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_ADV_L1 = 2192, /**< I2C Ambient Light Sensor A Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_I2C_AMBIENTLIGHT_A_ADV_L2 = 2200, /**< I2C Ambient Light Sensor A Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_DEF_L1 = 3072, /**< SPI Pressure Sensor A Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_DEF_L2 = 3080, /**< SPI Pressure Sensor A Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_ADV_L1 = 3088, /**< SPI Pressure Sensor A Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_SPI_PRESSURE_A_ADV_L2 = 3096, /**< SPI Pressure Sensor A Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_DEF_L1 = 3136, /**< SPI Humidity Sensor A Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_DEF_L1 = 3137, /**< SPI Humidity Sensor B Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_DEF_L2 = 3144, /**< SPI Humidity Sensor A Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_DEF_L2 = 3145, /**< SPI Humidity Sensor B Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_ADV_L1 = 3152, /**< SPI Humidity Sensor A Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_ADV_L1 = 3153, /**< SPI Humidity Sensor B Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_A_ADV_L2 = 3160, /**< SPI Humidity Sensor A Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_SPI_HUMIDITY_B_ADV_L2 = 3161, /**< SPI Humidity Sensor B Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_DEF_L1 = 3200, /**< SPI Accelerometer Sensor A 3-Axis Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_DEF_L1 = 3201, /**< SPI Accelerometer Sensor B 3-Axis Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_DEF_L2 = 3208, /**< SPI Accelerometer Sensor A 3-Axis Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_DEF_L2 = 3209, /**< SPI Accelerometer Sensor B 3-Axis Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_ADV_L1 = 3216, /**< SPI Accelerometer Sensor A 3-Axis Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_ADV_L1 = 3217, /**< SPI Accelerometer Sensor B 3-Axis Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_ADV_L2 = 3224, /**< SPI Accelerometer Sensor A 3-Axis Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_ADV_L2 = 3225, /**< SPI Accelerometer Sensor B 3-Axis Advanced Level 2 */ + CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_DEF_L1 = 3584, /**< UART CO2 Sensor A Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_DEF_L1 = 3585, /**< UART CO2 Sensor B Defined Level 1 */ + CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_DEF_L2 = 3592, /**< UART CO2 Sensor A Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_DEF_L2 = 3593, /**< UART CO2 Sensor B Defined Level 2 */ + CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_ADV_L1 = 3600, /**< UART CO2 Sensor A Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_UART_CO2_B_ADV_L1 = 3601, /**< UART CO2 Sensor B Advanced Level 1 */ + CORE_SENSOR_TYPE_SENSOR_UART_CO2_A_ADV_L2 = 3608, /**< UART CO2 Sensor A Advanced Level 2 */ + CORE_CYCLE_TYPE_SENSOR_UART_CO2_B_ADV_L2 = 3609 /**< UART CO2 Sensor B Advanced Level 2 */ +} CORE_Sensor_Type_Sensor_Type; + + +/* ========================================================================== + *! \struct CORE_Sensor_Type_Struct + *! \brief Sensor Select Register bit field structure + * ========================================================================== */ +typedef struct CORE_Sensor_Type_t { + union { + struct { + uint16_t Sensor_Type : 12; /**< Sensor Type */ + uint16_t reserved12 : 4; + }; + uint16_t VALUE16; + }; +} CORE_Sensor_Type_t; + +/*@}*/ + +/** @defgroup Sensor_Details Sensor Details (Sensor_Details) Register + * Sensor Details (Sensor_Details) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Sensor_Details_Measurement_Units + *! \brief Units of Sensor Measurement (Measurement_Units) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_SENSOR_DETAILS_UNITS_UNSPECIFIED = 0, /**< Not Specified */ + CORE_SENSOR_DETAILS_UNITS_RESERVED = 1, /**< Reserved */ + CORE_SENSOR_DETAILS_UNITS_DEGC = 2, /**< Degrees C */ + CORE_SENSOR_DETAILS_UNITS_DEGF = 3 /**< Degrees F */ +} CORE_Sensor_Details_Measurement_Units; + + +/* ========================================================================= + *! \enum CORE_Sensor_Details_Reference_Select + *! \brief Reference Selection (Reference_Select) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_SENSOR_DETAILS_REF_INT = 0, /**< Internal Reference */ + CORE_SENSOR_DETAILS_REF_AVDD = 1, /**< AVDD */ + CORE_SENSOR_DETAILS_REF_VEXT1 = 2, /**< External Voltage on Refin1 */ + CORE_SENSOR_DETAILS_REF_VEXT2 = 3, /**< External Voltage on Refin2 */ + CORE_SENSOR_DETAILS_REF_RINT1 = 4, /**< Internal Resistor1 */ + CORE_SENSOR_DETAILS_REF_RINT2 = 5, /**< Internal Resistor2 */ + CORE_SENSOR_DETAILS_REF_REXT1 = 6, /**< External Resistor on Refin1 */ + CORE_SENSOR_DETAILS_REF_REXT2 = 7, /**< External Resistor on Refin2 */ + CORE_SENSOR_DETAILS_REF_EXC = 8 /**< Bridge Excitation Voltage */ +} CORE_Sensor_Details_Reference_Select; + + +/* ========================================================================= + *! \enum CORE_Sensor_Details_PGA_Gain + *! \brief PGA Gain (PGA_Gain) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_SENSOR_DETAILS_PGA_GAIN_1 = 0, /**< Gain of 1 */ + CORE_SENSOR_DETAILS_PGA_GAIN_2 = 1, /**< Gain of 2 */ + CORE_SENSOR_DETAILS_PGA_GAIN_4 = 2, /**< Gain of 4 */ + CORE_SENSOR_DETAILS_PGA_GAIN_8 = 3, /**< Gain of 8 */ + CORE_SENSOR_DETAILS_PGA_GAIN_16 = 4, /**< Gain of 16 */ + CORE_SENSOR_DETAILS_PGA_GAIN_32 = 5, /**< Gain of 32 */ + CORE_SENSOR_DETAILS_PGA_GAIN_64 = 6, /**< Gain of 64 */ + CORE_SENSOR_DETAILS_PGA_GAIN_128 = 7 /**< Gain of 128 */ +} CORE_Sensor_Details_PGA_Gain; + + +/* ========================================================================== + *! \struct CORE_Sensor_Details_Struct + *! \brief Sensor Details Register bit field structure + * ========================================================================== */ +typedef struct CORE_Sensor_Details_t { + union { + struct { + uint32_t Measurement_Units : 4; /**< Units of Sensor Measurement */ + uint32_t Compensation_Channel : 4; /**< Indicates Which Channel is Used to Compensate Sensor Result */ + uint32_t reserved8 : 8; + uint32_t Unity_LUT_Select : 1; /**< Selects Unity Transfer Function Instead of Sensor Default */ + uint32_t Do_Not_Publish : 1; /**< Do Not Publish Channel Result */ + uint32_t Reference_Buffer_Disable : 1; /**< Enable or Disable ADC Reference Buffer */ + uint32_t Vbias : 1; /**< Controls ADC Vbias Output */ + uint32_t Reference_Select : 4; /**< Reference Selection */ + uint32_t PGA_Gain : 3; /**< PGA Gain */ + uint32_t reserved27 : 1; + uint32_t Averaging : 3; /**< Number of ADC Results to Average */ + uint32_t Compensation_Disable : 1; /**< Indicates Compensation Data Should Not Be Used */ + }; + uint32_t VALUE32; + }; +} CORE_Sensor_Details_t; + +/*@}*/ + +/** @defgroup Channel_Excitation Excitation Current (Channel_Excitation) Register + * Excitation Current (Channel_Excitation) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Channel_Excitation_IOUT_Excitation_Current + *! \brief Current Source Value (IOUT_Excitation_Current) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_CHANNEL_EXCITATION_IEXC_OFF = 0, /**< Disabled */ + CORE_CHANNEL_EXCITATION_IEXC_50UA = 1, /**< 50 \mu;A */ + CORE_CHANNEL_EXCITATION_IEXC_100UA = 2, /**< 100 \mu;A */ + CORE_CHANNEL_EXCITATION_IEXC_250UA = 3, /**< 250 \mu;A */ + CORE_CHANNEL_EXCITATION_IEXC_500UA = 4, /**< 500 \mu;A */ + CORE_CHANNEL_EXCITATION_IEXC_750UA = 5, /**< 750 \mu;A */ + CORE_CHANNEL_EXCITATION_IEXC_1000UA = 6 /**< 1000 \mu;A */ +} CORE_Channel_Excitation_IOUT_Excitation_Current; + + +/* ========================================================================= + *! \enum CORE_Channel_Excitation_IOUT_Diode_Ratio + *! \brief Modify Current Ratios Used for Diode Sensor (IOUT_Diode_Ratio) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_CHANNEL_EXCITATION_IOUT_DIODE_DEFAULT = 0, /**< Default Excitation Current Ratios */ + CORE_CHANNEL_EXCITATION_IOUT_DIODE_MAX = 1 /**< Higher Excitation Current Ratios */ +} CORE_Channel_Excitation_IOUT_Diode_Ratio; + + +/* ========================================================================== + *! \struct CORE_Channel_Excitation_Struct + *! \brief Excitation Current Register bit field structure + * ========================================================================== */ +typedef struct CORE_Channel_Excitation_t { + union { + struct { + uint8_t IOUT_Excitation_Current : 3; /**< Current Source Value */ + uint8_t reserved3 : 2; + uint8_t IOUT_Diode_Ratio : 1; /**< Modify Current Ratios Used for Diode Sensor */ + uint8_t reserved6 : 1; + uint8_t IOUT_Dont_Swap_3Wire : 1; /**< Indicates 3-Wire Excitation Currents Should Not Be Swapped */ + }; + uint8_t VALUE8; + }; +} CORE_Channel_Excitation_t; + +/*@}*/ + +/** @defgroup Settling_Time Settling Time (Settling_Time) Register + * Settling Time (Settling_Time) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Settling_Time_Settling_Time_Units + *! \brief Units for Settling Time (Settling_Time_Units) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_SETTLING_TIME_MICROSECONDS = 0, /**< Micro-Seconds */ + CORE_SETTLING_TIME_MILLISECONDS = 1, /**< Milli-Seconds */ + CORE_SETTLING_TIME_SECONDS = 2 /**< Seconds */ +} CORE_Settling_Time_Settling_Time_Units; + + +/* ========================================================================== + *! \struct CORE_Settling_Time_Struct + *! \brief Settling Time Register bit field structure + * ========================================================================== */ +typedef struct CORE_Settling_Time_t { + union { + struct { + uint16_t Settling_Time : 14; /**< Settling Time to Allow When Switching to Channel */ + uint16_t Settling_Time_Units : 2; /**< Units for Settling Time */ + }; + uint16_t VALUE16; + }; +} CORE_Settling_Time_t; + +/*@}*/ + +/** @defgroup Filter_Select ADC Digital Filter Selection (Filter_Select) Register + * ADC Digital Filter Selection (Filter_Select) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Filter_Select_ADC_Filter_Type + *! \brief ADC Digital Filter Type (ADC_Filter_Type) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_FILTER_SELECT_FILTER_FIR_25SPS = 0, /**< FIR Filter 25 SPS */ + CORE_FILTER_SELECT_FILTER_FIR_20SPS = 1, /**< FIR Filter 20 SPS */ + CORE_FILTER_SELECT_FILTER_SINC4 = 2, /**< Sinc4 Filter */ + CORE_FILTER_SELECT_FILTER_TBD = 3 /**< TBD Filter */ +} CORE_Filter_Select_ADC_Filter_Type; + + +/* ========================================================================== + *! \struct CORE_Filter_Select_Struct + *! \brief ADC Digital Filter Selection Register bit field structure + * ========================================================================== */ +typedef struct CORE_Filter_Select_t { + union { + struct { + uint32_t ADC_FS : 11; /**< ADC Digital Filter Select */ + uint32_t ADC_Filter_Type : 5; /**< ADC Digital Filter Type */ + uint32_t reserved16 : 16; + }; + uint32_t VALUE32; + }; +} CORE_Filter_Select_t; + +/*@}*/ + +/** @defgroup High_Threshold_Limit High Threshold (High_Threshold_Limit) Register + * High Threshold (High_Threshold_Limit) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_High_Threshold_Limit_Struct + *! \brief High Threshold Register bit field structure + * ========================================================================== */ +typedef struct CORE_High_Threshold_Limit_t { + union { + struct { + float High_Threshold; /**< Upper Limit for Sensor Alert Comparison */ + }; + float VALUE32; + }; +} CORE_High_Threshold_Limit_t; + +/*@}*/ + +/** @defgroup Low_Threshold_Limit Low Threshold (Low_Threshold_Limit) Register + * Low Threshold (Low_Threshold_Limit) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Low_Threshold_Limit_Struct + *! \brief Low Threshold Register bit field structure + * ========================================================================== */ +typedef struct CORE_Low_Threshold_Limit_t { + union { + struct { + float Low_Threshold; /**< Lower Limit for Sensor Alert Comparison */ + }; + float VALUE32; + }; +} CORE_Low_Threshold_Limit_t; + +/*@}*/ + +/** @defgroup Sensor_Offset Sensor Offset Adjustment (Sensor_Offset) Register + * Sensor Offset Adjustment (Sensor_Offset) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Sensor_Offset_Struct + *! \brief Sensor Offset Adjustment Register bit field structure + * ========================================================================== */ +typedef struct CORE_Sensor_Offset_t { + union { + struct { + float Sensor_Offset; /**< Sensor Offset Adjustment */ + }; + float VALUE32; + }; +} CORE_Sensor_Offset_t; + +/*@}*/ + +/** @defgroup Sensor_Gain Sensor Gain Adjustment (Sensor_Gain) Register + * Sensor Gain Adjustment (Sensor_Gain) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Sensor_Gain_Struct + *! \brief Sensor Gain Adjustment Register bit field structure + * ========================================================================== */ +typedef struct CORE_Sensor_Gain_t { + union { + struct { + float Sensor_Gain; /**< Sensor Gain Adjustment */ + }; + float VALUE32; + }; +} CORE_Sensor_Gain_t; + +/*@}*/ + +/** @defgroup Alert_Code_Ch Per-Channel Detailed Alert-Code Information (Alert_Code_Ch) Register + * Per-Channel Detailed Alert-Code Information (Alert_Code_Ch) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Alert_Code_Ch_Struct + *! \brief Per-Channel Detailed Alert-Code Information Register bit field structure + * ========================================================================== */ +typedef struct CORE_Alert_Code_Ch_t { + union { + struct { + uint16_t Alert_Code_Ch : 16; /**< Per-Channel Code Indicating Type of Alert */ + }; + uint16_t VALUE16; + }; +} CORE_Alert_Code_Ch_t; + +/*@}*/ + +/** @defgroup Channel_Skip Indicates If Channel Will Skip Some Measurement Cycles (Channel_Skip) Register + * Indicates If Channel Will Skip Some Measurement Cycles (Channel_Skip) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Channel_Skip_Struct + *! \brief Indicates If Channel Will Skip Some Measurement Cycles Register bit field structure + * ========================================================================== */ +typedef struct CORE_Channel_Skip_t { + union { + struct { + uint16_t Channel_Skip : 8; /**< Indicates If Channel Will Skip Some Measurement Cycles */ + uint16_t reserved8 : 8; + }; + uint16_t VALUE16; + }; +} CORE_Channel_Skip_t; + +/*@}*/ + +/** @defgroup Sensor_Parameter Sensor Parameter Adjustment (Sensor_Parameter) Register + * Sensor Parameter Adjustment (Sensor_Parameter) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Sensor_Parameter_Struct + *! \brief Sensor Parameter Adjustment Register bit field structure + * ========================================================================== */ +typedef struct CORE_Sensor_Parameter_t { + union { + struct { + float Sensor_Parameter; /**< Sensor Parameter Adjustment */ + }; + float VALUE32; + }; +} CORE_Sensor_Parameter_t; + +/*@}*/ + +/** @defgroup Calibration_Parameter Calibration Parameter Value (Calibration_Parameter) Register + * Calibration Parameter Value (Calibration_Parameter) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Calibration_Parameter_Struct + *! \brief Calibration Parameter Value Register bit field structure + * ========================================================================== */ +typedef struct CORE_Calibration_Parameter_t { + union { + struct { + uint32_t Calibration_Parameter : 24; /**< Calibration Parameter Value */ + uint32_t Calibration_Parameter_Enable : 1; /**< Enables Use of Calibration_Parameter */ + uint32_t reserved25 : 7; + }; + uint32_t VALUE32; + }; +} CORE_Calibration_Parameter_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Config Digital Sensor Data Coding (Digital_Sensor_Config) Register + * Digital Sensor Data Coding (Digital_Sensor_Config) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Digital_Sensor_Config_Digital_Sensor_Coding + *! \brief Data Encoding of Sensor Result (Digital_Sensor_Coding) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_DIGITAL_SENSOR_CONFIG_CODING_NONE = 0, /**< None/Invalid */ + CORE_DIGITAL_SENSOR_CONFIG_CODING_UNIPOLAR = 1, /**< Unipolar */ + CORE_DIGITAL_SENSOR_CONFIG_CODING_TWOS_COMPL = 2, /**< Twos Complement */ + CORE_DIGITAL_SENSOR_CONFIG_CODING_OFFSET_BINARY = 3 /**< Offset Binary */ +} CORE_Digital_Sensor_Config_Digital_Sensor_Coding; + + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Config_Struct + *! \brief Digital Sensor Data Coding Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Config_t { + union { + struct { + uint16_t Digital_Sensor_Coding : 2; /**< Data Encoding of Sensor Result */ + uint16_t Digital_Sensor_Little_Endian : 1; /**< Data Endianness of Sensor Result */ + uint16_t Digital_Sensor_Left_Aligned : 1; /**< Data Alignment Within the Data Frame */ + uint16_t Digital_Sensor_Bit_Offset : 4; /**< Data Bit Offset, Relative to Alignment */ + uint16_t Digital_Sensor_Read_Bytes : 3; /**< Number of Bytes to Read from the Sensor */ + uint16_t Digital_Sensor_Data_Bits : 5; /**< Number of Relevant Data Bits */ + }; + uint16_t VALUE16; + }; +} CORE_Digital_Sensor_Config_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Address Sensor Address (Digital_Sensor_Address) Register + * Sensor Address (Digital_Sensor_Address) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Address_Struct + *! \brief Sensor Address Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Address_t { + union { + struct { + uint8_t Digital_Sensor_Address : 8; /**< I2C Address or Write Address Command for SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Address_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Num_Cmds Number of Configuration, Read Commands for Digital Sensors (Digital_Sensor_Num_Cmds) Register + * Number of Configuration, Read Commands for Digital Sensors (Digital_Sensor_Num_Cmds) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Num_Cmds_Struct + *! \brief Number of Configuration, Read Commands for Digital Sensors Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Num_Cmds_t { + union { + struct { + uint8_t Digital_Sensor_Num_Cfg_Cmds : 3; /**< Number of Configuration Commands for Digital Sensor */ + uint8_t reserved3 : 1; + uint8_t Digital_Sensor_Num_Read_Cmds : 3; /**< Number of Read Commands for Digital Sensor */ + uint8_t reserved7 : 1; + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Num_Cmds_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Comms Digital Sensor Communication Clock Configuration (Digital_Sensor_Comms) Register + * Digital Sensor Communication Clock Configuration (Digital_Sensor_Comms) Register. + * @{ + */ + +/* ========================================================================= + *! \enum CORE_Digital_Sensor_Comms_Digital_Sensor_Comms_En + *! \brief Enable Digital Sensor Comms Register Parameters (Digital_Sensor_Comms_En) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_DIGITAL_SENSOR_COMMS_DIGITAL_COMMS_DEFAULT = 0, /**< Default Parameters Used for Digital Sensor Communications */ + CORE_DIGITAL_SENSOR_COMMS_DIGITAL_COMMS_USER = 1 /**< User Supplied Parameters Used for Digital Sensor Communications */ +} CORE_Digital_Sensor_Comms_Digital_Sensor_Comms_En; + + +/* ========================================================================= + *! \enum CORE_Digital_Sensor_Comms_SPI_Clock + *! \brief Controls Clock Frequency for SPI Sensors (SPI_Clock) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_DIGITAL_SENSOR_COMMS_SPI_13MHZ = 0, /**< 13 MHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_6_5MHZ = 1, /**< 6.5 MHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_3_25MHZ = 2, /**< 3.25 MHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_1_625MHZ = 3, /**< 1.625 MHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_812KHZ = 4, /**< 812.5kHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_406KHZ = 5, /**< 406.2kHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_203KHZ = 6, /**< 203.1kHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_101KHZ = 7, /**< 101.5kHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_50KHZ = 8, /**< 50.8kHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_25KHZ = 9, /**< 25.4kHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_12KHZ = 10, /**< 12.7kHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_6KHZ = 11, /**< 6.3kHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_3KHZ = 12, /**< 3.2kHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_1_5KHZ = 13, /**< 1.58kHz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_793HZ = 14, /**< 793Hz */ + CORE_DIGITAL_SENSOR_COMMS_SPI_396HZ = 15 /**< 396Hz */ +} CORE_Digital_Sensor_Comms_SPI_Clock; + + +/* ========================================================================= + *! \enum CORE_Digital_Sensor_Comms_I2C_Clock + *! \brief Controls SCLK Frequency for I2C Sensors (I2C_Clock) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_DIGITAL_SENSOR_COMMS_I2C_100K = 0, /**< 100kHz SCL */ + CORE_DIGITAL_SENSOR_COMMS_I2C_400K = 1, /**< 400kHz SCL */ + CORE_DIGITAL_SENSOR_COMMS_I2C_RESERVED1 = 2, /**< Reserved */ + CORE_DIGITAL_SENSOR_COMMS_I2C_RESERVED2 = 3 /**< Reserved */ +} CORE_Digital_Sensor_Comms_I2C_Clock; + + +/* ========================================================================= + *! \enum CORE_Digital_Sensor_Comms_Uart_Baud + *! \brief Controls Baud Rate for UART Sensors (Uart_Baud) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_DIGITAL_SENSOR_COMMS_UART_115200 = 0, /**< 115200 bps */ + CORE_DIGITAL_SENSOR_COMMS_UART_57600 = 1, /**< 57600 bps */ + CORE_DIGITAL_SENSOR_COMMS_UART_38400 = 2, /**< 38400 bps */ + CORE_DIGITAL_SENSOR_COMMS_UART_19200 = 3, /**< 19200 bps */ + CORE_DIGITAL_SENSOR_COMMS_UART_9600 = 4, /**< 9600 bps */ + CORE_DIGITAL_SENSOR_COMMS_UART_4800 = 5, /**< 4800 bps */ + CORE_DIGITAL_SENSOR_COMMS_UART_2400 = 6, /**< 2400 bps */ + CORE_DIGITAL_SENSOR_COMMS_UART_1200 = 7 /**< 1200 bps */ +} CORE_Digital_Sensor_Comms_Uart_Baud; + + +/* ========================================================================= + *! \enum CORE_Digital_Sensor_Comms_SPI_Mode + *! \brief Configuration for Sensor SPI Protocol (SPI_Mode) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_0 = 0, /**< Clock Polarity = 0 Clock Phase = 0 */ + CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_1 = 1, /**< Clock Polarity = 0 Clock Phase = 1 */ + CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_2 = 2, /**< Clock Polarity = 1 Clock Phase = 0 */ + CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_3 = 3 /**< Clock Polarity = 1 Clock Phase = 1 */ +} CORE_Digital_Sensor_Comms_SPI_Mode; + + +/* ========================================================================= + *! \enum CORE_Digital_Sensor_Comms_Uart_Mode + *! \brief Configuration for Sensor UART Protocol (Uart_Mode) Enumerations + * ========================================================================= */ +typedef enum +{ + CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N1 = 0, /**< 8 Data Bits No Parity 1 Stop Bit */ + CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N2 = 1, /**< 8 Data Bits No Parity 2 Stop Bits */ + CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N3 = 2, /**< 8 Data Bits No Parity 3 Stop Bits */ + CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E1 = 4, /**< 8 Data Bits Even Parity 1 Stop Bit */ + CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E2 = 5, /**< 8 Data Bits Even Parity 2 Stop Bits */ + CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E3 = 6, /**< 8 Data Bits Even Parity 3 Stop Bits */ + CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O1 = 8, /**< 8 Data Bits Odd Parity 1 Stop Bit */ + CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O2 = 9, /**< 8 Data Bits Odd Parity 2 Stop Bits */ + CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O3 = 10 /**< 8 Data Bits Odd Parity 3 Stop Bits */ +} CORE_Digital_Sensor_Comms_Uart_Mode; + + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Comms_Struct + *! \brief Digital Sensor Communication Clock Configuration Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Comms_t { + union { + struct { + uint16_t Digital_Sensor_Comms_En : 1; /**< Enable Digital Sensor Comms Register Parameters */ + uint16_t SPI_Clock : 4; /**< Controls Clock Frequency for SPI Sensors */ + uint16_t I2C_Clock : 2; /**< Controls SCLK Frequency for I2C Sensors */ + uint16_t Uart_Baud : 3; /**< Controls Baud Rate for UART Sensors */ + uint16_t SPI_Mode : 2; /**< Configuration for Sensor SPI Protocol */ + uint16_t Uart_Mode : 4; /**< Configuration for Sensor UART Protocol */ + }; + uint16_t VALUE16; + }; +} CORE_Digital_Sensor_Comms_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Command1 Sensor Configuration Command1 (Digital_Sensor_Command1) Register + * Sensor Configuration Command1 (Digital_Sensor_Command1) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Command1_Struct + *! \brief Sensor Configuration Command1 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Command1_t { + union { + struct { + uint8_t Digital_Sensor_Command1 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Command1_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Command2 Sensor Configuration Command2 (Digital_Sensor_Command2) Register + * Sensor Configuration Command2 (Digital_Sensor_Command2) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Command2_Struct + *! \brief Sensor Configuration Command2 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Command2_t { + union { + struct { + uint8_t Digital_Sensor_Command2 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Command2_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Command3 Sensor Configuration Command3 (Digital_Sensor_Command3) Register + * Sensor Configuration Command3 (Digital_Sensor_Command3) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Command3_Struct + *! \brief Sensor Configuration Command3 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Command3_t { + union { + struct { + uint8_t Digital_Sensor_Command3 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Command3_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Command4 Sensor Configuration Command4 (Digital_Sensor_Command4) Register + * Sensor Configuration Command4 (Digital_Sensor_Command4) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Command4_Struct + *! \brief Sensor Configuration Command4 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Command4_t { + union { + struct { + uint8_t Digital_Sensor_Command4 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Command4_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Command5 Sensor Configuration Command5 (Digital_Sensor_Command5) Register + * Sensor Configuration Command5 (Digital_Sensor_Command5) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Command5_Struct + *! \brief Sensor Configuration Command5 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Command5_t { + union { + struct { + uint8_t Digital_Sensor_Command5 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Command5_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Command6 Sensor Configuration Command6 (Digital_Sensor_Command6) Register + * Sensor Configuration Command6 (Digital_Sensor_Command6) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Command6_Struct + *! \brief Sensor Configuration Command6 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Command6_t { + union { + struct { + uint8_t Digital_Sensor_Command6 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Command6_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Command7 Sensor Configuration Command7 (Digital_Sensor_Command7) Register + * Sensor Configuration Command7 (Digital_Sensor_Command7) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Command7_Struct + *! \brief Sensor Configuration Command7 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Command7_t { + union { + struct { + uint8_t Digital_Sensor_Command7 : 8; /**< Configuration Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Command7_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Read_Cmd1 Sensor Read Command1 (Digital_Sensor_Read_Cmd1) Register + * Sensor Read Command1 (Digital_Sensor_Read_Cmd1) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Read_Cmd1_Struct + *! \brief Sensor Read Command1 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Read_Cmd1_t { + union { + struct { + uint8_t Digital_Sensor_Read_Cmd1 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Read_Cmd1_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Read_Cmd2 Sensor Read Command2 (Digital_Sensor_Read_Cmd2) Register + * Sensor Read Command2 (Digital_Sensor_Read_Cmd2) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Read_Cmd2_Struct + *! \brief Sensor Read Command2 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Read_Cmd2_t { + union { + struct { + uint8_t Digital_Sensor_Read_Cmd2 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Read_Cmd2_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Read_Cmd3 Sensor Read Command3 (Digital_Sensor_Read_Cmd3) Register + * Sensor Read Command3 (Digital_Sensor_Read_Cmd3) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Read_Cmd3_Struct + *! \brief Sensor Read Command3 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Read_Cmd3_t { + union { + struct { + uint8_t Digital_Sensor_Read_Cmd3 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Read_Cmd3_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Read_Cmd4 Sensor Read Command4 (Digital_Sensor_Read_Cmd4) Register + * Sensor Read Command4 (Digital_Sensor_Read_Cmd4) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Read_Cmd4_Struct + *! \brief Sensor Read Command4 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Read_Cmd4_t { + union { + struct { + uint8_t Digital_Sensor_Read_Cmd4 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Read_Cmd4_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Read_Cmd5 Sensor Read Command5 (Digital_Sensor_Read_Cmd5) Register + * Sensor Read Command5 (Digital_Sensor_Read_Cmd5) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Read_Cmd5_Struct + *! \brief Sensor Read Command5 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Read_Cmd5_t { + union { + struct { + uint8_t Digital_Sensor_Read_Cmd5 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Read_Cmd5_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Read_Cmd6 Sensor Read Command6 (Digital_Sensor_Read_Cmd6) Register + * Sensor Read Command6 (Digital_Sensor_Read_Cmd6) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Read_Cmd6_Struct + *! \brief Sensor Read Command6 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Read_Cmd6_t { + union { + struct { + uint8_t Digital_Sensor_Read_Cmd6 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Read_Cmd6_t; + +/*@}*/ + +/** @defgroup Digital_Sensor_Read_Cmd7 Sensor Read Command7 (Digital_Sensor_Read_Cmd7) Register + * Sensor Read Command7 (Digital_Sensor_Read_Cmd7) Register. + * @{ + */ + +/* ========================================================================== + *! \struct CORE_Digital_Sensor_Read_Cmd7_Struct + *! \brief Sensor Read Command7 Register bit field structure + * ========================================================================== */ +typedef struct CORE_Digital_Sensor_Read_Cmd7_t { + union { + struct { + uint8_t Digital_Sensor_Read_Cmd7 : 8; /**< Per Conversion Command to Send to Digital I2C/SPI Sensor */ + }; + uint8_t VALUE8; + }; +} CORE_Digital_Sensor_Read_Cmd7_t; + +/*@}*/ + + +#if defined (__CC_ARM) +#pragma pop +#endif + +#endif +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw1001/admw1001_api.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,474 @@ +/* +Copyright 2018 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +Copyright 2017 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + ****************************************************************************** + * @file: adi_sense_api.h + * @brief: ADSNS1000 Host Library Application Programming Interface (API) + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW1001_API_H__ +#define __ADMW1001_API_H__ + + +#include "inc/admw_types.h" +#include "inc/admw_config_types.h" +#include "inc/admw_platform.h" +#include "inc/admw1001/admw1001_config.h" +#include "inc/admw1001/admw1001_lut_data.h" + +/*! @ingroup ADMW_Api */ + +/*! @defgroup ADMW1001_Api ADMW1001 Host Library API + * ADMW1001 device-specific API function prototypes. + * These are supplementary to the common ADMW Host Library API. + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Read one or more device registers at the specified register address. + * + * @param[in] hDevice ADMW1001 device context handle + * @param[in] nAddress Register map address to read from + * @param[out] pData Pointer to return the register map data + * @param[in] nLength Number of bytes of data to read from the register map + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Provides direct byte-level read access to the device register map. + * The size and format of the register(s) must be known. + * + * @note Reads from special "keyhole" or "FIFO" registers will be handled + * according to documentation for those registers. + */ +ADMW_RESULT admw1001_ReadRegister( + ADMW_DEVICE_HANDLE const hDevice, + uint16_t const nAddress, + void * const pData, + unsigned const nLength); + +/*! + * @brief Write one or more device registers at the specified register address. + * + * @param[in] hDevice ADISENSE device context handle + * @param[in] nAddress Register map address to read from + * @param[out] pData Pointer to return the register map data + * @param[in] nLength Number of bytes of data to read from the register map + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Provides direct byte-level write access to the device register map. + * The size and format of the register(s) must be known. + * + * @note Writes to read-only registers will be ignored by the device. + * @note Writes to special "keyhole" registers will be handled according to + * documentation for those registers. + */ +ADMW_RESULT admw1001_WriteRegister( + ADMW_DEVICE_HANDLE const hDevice, + uint16_t const nAddress, + void * const pData, + unsigned const nLength); + +/*! + * @brief Update power configuration settings on the device. + * + * @param[in] hDevice ADISENSE device context handle + * @param[in] pPowerConfig Power configuration details + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Translates configuration details provided into device-specific + * register settings and updates device configuration registers. + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetPowerConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_POWER_CONFIG *pPowerConfig); + +/*! + * @brief Update measurement configuration settings on the device. + * + * @param[in] hDevice ADISENSE device context handle + * @param[in] pMeasurementConfig Measurement configuration details + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Translates configuration details provided into device-specific + * register settings and updates device configuration registers. + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetMeasurementConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_MEASUREMENT_CONFIG *pMeasurementConfig); + +/*! + * @brief Update diagnostics configuration settings on the device. + * + * @param[in] hDevice ADISENSE device context handle + * @param[in] pDiagnosticsConfig Diagnostics configuration details + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Translates configuration details provided into device-specific + * register settings and updates device configuration registers. + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetDiagnosticsConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_DIAGNOSTICS_CONFIG *pDiagnosticsConfig); + +/*! + * @brief Update channel configuration settings for a specific channel. + * + * @param[in] hDevice ADISENSE device context handle + * @param[in] eChannelId Selects the channel to be updated + * @param[in] pChannelConfig Channel configuration details + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Translates configuration details provided into device-specific + * register settings and updates device configuration registers. + * Allows individual channel configuration details to be dynamically + * adjusted without rewriting the full device configuration. + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetChannelConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_CHANNEL_CONFIG *pChannelConfig); + +/*! + * @brief Update number of measurements-per-cycle for a specific channel. + * + * @param[in] hDevice ADISENSE device context handle + * @param[in] eChannelId Selects the channel to be updated + * @param[in] nMeasurementsPerCycle Specifies the number of measurements to be + * obtained from this channel in each + * measurement cycle. Set as 0 to disable the + * channel (omit from measurement cycle). + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Translates configuration details provided into device-specific + * register settings and updates device configuration registers. + * Allows individual channels to be dynamically enabled/disabled, and + * measurements-per-cycle to be adjusted. + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetChannelCount( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + uint32_t nMeasurementsPerCycle); + +/*! + * @brief Update priority level for a specific channel. + * + * @param[in] hDevice ADI Sense device context handle + * @param[in] eChannelId Selects the channel to be updated + * @param[in] ePriority Specifies the channel priority level + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Translates configuration details provided into device-specific + * register settings and updates device configuration registers. + * Allows individual channels to be dynamically re-prioritised. + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetChannelPriority( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_CHANNEL_PRIORITY ePriority); + +/*! + * @brief Update the measurement threshold limits for a specified channel. + * + * @param[in] hDevice ADISENSE device context handle + * @param[in] eChannelId Selects the channel to be updated + * @param[in] fHighThresholdLimit Optional maximum threshold value for each + * processed sample, to be checked prior to + * publishing. A channel ALERT condition is + * raised if the processed value is higher than + * this threshold. Set to NaN if not required. + * @param[in] fLowThresholdLimit Optional minimum threshold value for each + * processed sample, to be checked prior to + * publishing. A channel ALERT condition is + * raised if the processed value is lower than + * this threshold. Set to NaN if not required. + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Translates configuration details provided into device-specific + * register settings and updates device configuration registers. + * Allows individual channel thresholds to be dynamically adjusted. + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetChannelThresholdLimits( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + float32_t fHighThresholdLimit, + float32_t fLowThresholdLimit); + + +/*! + * @brief Set a sensor specific parameter for a specified channel. + * + * @param[in] hDevice ADI Sense device context handle + * @param[in] eChannelId Selects the channel to be updated + * @param[in] fSensorParam Sensor specific parameter + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Translates configuration details provided into device-specific + * register settings and updates device configuration registers. + * Allows optional sensor-specific parameter to be specified + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetSensorParameter( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + float32_t fSensorParam); +/*! + * @brief Update the extra settling time for a specified channel. + * + * @param[in] hDevice ADISENSE device context handle + * @param[in] eChannelId Selects the channel to be updated + * @param[in] nSettlingTime A minimum settling time is applied internally for + * each channel, based on the sensor type. However, + * additional settling time (microseconds) can + * optionally be specified here. Set to 0 if not + * required. + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Translates configuration details provided into device-specific + * register settings and updates device configuration registers. + * Allows individual channel settling times to be dynamically adjusted. + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetChannelSettlingTime( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + uint32_t nSettlingTime); + +#ifdef __V2_3_CFG_FMT__ +/*! + * @brief Enable access to advanced sensor configuration options. + * + * @param[in] hDevice ADISENSE device context handle + * @param[in] key Key to unlock advanced access + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details When the correct access key is provided, access to advanced sensor + * configuration options and use of advanced sensor types is enabled. + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetAdvancedAccess( + ADMW_DEVICE_HANDLE const hDevice, + ADMW1001_ADVANCED_ACCESS_KEY key); +#endif + +/*! + * @brief Assemble a list of separate Look-Up Tables into a single buffer + * + * @param[out] pLutBuffer Pointer to the Look-Up Table data buffer where + * the assembled Look-Up Table data will be placed + * @param[in] nLutBufferSize Allocated size, in bytes, of the output data buffer + * @param[in] nNumTables Number of tables to add to the Look-Up Table buffer + * @param[in] ppDesc Array of pointers to the table descriptors to be added + * @param[in] ppData Array of pointers to the table data to be added + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details This utiliity function fills the Look-up Table header fields; then + * walks through the array of individual table descriptor and data + * pointers provided, appending (copying) each one to the Look-Up Table + * data buffer. The length and crc16 fields of each table descriptor + * will be calculated and filled by this function, but other fields in + * the descriptor structure must be filled by the caller beforehand. + * + * @note The assembled LUT data buffer filled by this function can then be + * written to the device memory using @ref admw1001_SetLutData. + */ +ADMW_RESULT admw1001_AssembleLutData( + ADMW1001_LUT * pLutBuffer, + unsigned nLutBufferSize, + unsigned const nNumTables, + ADMW1001_LUT_DESCRIPTOR * const ppDesc[], + ADMW1001_LUT_TABLE_DATA * const ppData[]); + +/*! + * @brief Write Look-Up Table data to the device memory + * + * @param[in] hDevice ADISENSE device context handle + * @param[out] pLutData Pointer to the Look-Up Table data structure + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Validates the Look-Up Table data format and loads it into + * device memory via dedicated keyhole registers. + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetLutData( + ADMW_DEVICE_HANDLE const hDevice, + ADMW1001_LUT * const pLutData); + +/*! + * @brief Write Look-Up Table raw data to the device memory + * + * @param[in] hDevice ADISENSE device context handle + * @param[out] pLutData Pointer to the Look-Up Table raw data structure + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details This can be used instead of @ref admw1001_SetLutData for + * loading LUT data from the alternative raw data format. See + * @ref admw1001_SetLutData for more information. + * + * @note Settings are not applied until adi_sense_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw1001_SetLutDataRaw( + ADMW_DEVICE_HANDLE const hDevice, + ADMW1001_LUT_RAW * const pLutData); + +/*! + * @brief Get the number of samples available when DATAREADY status is asserted. + * + * @param[in] hDevice ADISENSE device context handle + * @param[in] eMeasurementMode Must be set to the same value used for @ref + * adi_sense_StartMeasurement(). + * @param[out] peOperatingMode Pointer to return the configured operating mode + * @param[out] peDataReadyMode Pointer to return the configured data publishing mode + * @param[out] pnSamplesPerDataready Pointer to return the calculated number of samples + * available when DATAREADY is asserted + * @param[out] pnSamplesPerCycle Pointer to return the calculated number of samples + * produced per measurement cycle + * @param[out] pnBytesPerSample Pointer to return the size, in bytes, of each sample + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Examines the current configuration settings in the device registers + * to calculate the number of samples available whenever the DATAREADY + * signal is asserted, along with other related information. This may + * be used to allocate buffers to store samples and to determine how + * many samples to retrieve whenever the DATAREADY status is asserted. + */ +ADMW_RESULT admw1001_GetDataReadyModeInfo( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_MEASUREMENT_MODE const eMeasurementMode, + ADMW1001_OPERATING_MODE * const peOperatingMode, + ADMW1001_DATAREADY_MODE * const peDataReadyMode, + uint32_t * const pnSamplesPerDataready, + uint32_t * const pnSamplesPerCycle, + uint8_t * const pnBytesPerSample); + +#ifdef __cplusplus +} +#endif + +/*! + * @} + */ + +#endif /* __ADMW1001_API_H__ */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw1001/admw1001_config.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,980 @@ +/* +Copyright 2018 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +Copyright (c) 2017 Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + - Modified versions of the software must be conspicuously marked as such. + - This software is licensed solely and exclusively for use with processors + manufactured by or for Analog Devices, Inc. + - This software may not be combined or merged with other code in any manner + that would cause the software to become subject to terms and conditions + which differ from those listed here. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights of one + or more patent holders. This license does not release you from the + requirement that you obtain separate licenses from these patent holders + to use this software. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL +PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + ****************************************************************************** + * @file: admw1001_config.h + * @brief: Configuration type definitions for ADMW1001. + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW1001_CONFIG_H__ +#define __ADMW1001_CONFIG_H__ + +#include "admw_platform.h" +#include "admw1001_sensor_types.h" + +/* Undefine for versions prior to V2.3. */ +#undef __V2_3_CFG_FMT__ + + +/*! @addtogroup ADMW1001_Api + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/*! Maximum length allowed for a digital sensor command */ +#define ADMW1001_SENSOR_COMMAND_MAX_LENGTH 7 + +/*! ADMW1001 channel priority options */ +typedef enum { + ADMW1001_CHANNEL_PRIORITY_0 = 0, + ADMW1001_CHANNEL_PRIORITY_1, + ADMW1001_CHANNEL_PRIORITY_2, + ADMW1001_CHANNEL_PRIORITY_3, + ADMW1001_CHANNEL_PRIORITY_4, + ADMW1001_CHANNEL_PRIORITY_5, + ADMW1001_CHANNEL_PRIORITY_6, + ADMW1001_CHANNEL_PRIORITY_7, + ADMW1001_CHANNEL_PRIORITY_8, + ADMW1001_CHANNEL_PRIORITY_9, + ADMW1001_CHANNEL_PRIORITY_10, + ADMW1001_CHANNEL_PRIORITY_11, + ADMW1001_CHANNEL_PRIORITY_12, + ADMW1001_CHANNEL_PRIORITY_13, + ADMW1001_CHANNEL_PRIORITY_14, + ADMW1001_CHANNEL_PRIORITY_15, + + ADMW1001_CHANNEL_PRIORITY_HIGHEST = ADMW1001_CHANNEL_PRIORITY_0, + ADMW1001_CHANNEL_PRIORITY_LOWEST = ADMW1001_CHANNEL_PRIORITY_15, +} ADMW1001_CHANNEL_PRIORITY; + +/*! ADMW1001 operating mode options */ +typedef enum { + ADMW1001_OPERATING_MODE_SINGLECYCLE = 0, + /*!< Executes a single measurement cycle and stops */ + ADMW1001_OPERATING_MODE_CONTINUOUS, + /*!< Continuously executes measurement cycles */ + ADMW1001_OPERATING_MODE_MULTICYCLE, + /*!< Executes a burst of measurement cycles, repeated at defined intervals */ +} ADMW1001_OPERATING_MODE; + +/*! ADMW1001 data ready mode options */ +typedef enum { + ADMW1001_DATAREADY_PER_CONVERSION = 0, + /*!< The DATAREADY signal is asserted after completion of each conversion + * - a single data sample only from the latest completed conversion is + * stored in this mode + */ + ADMW1001_DATAREADY_PER_CYCLE, + /*!< The DATAREADY signal is asserted after completion of each measurement + * cycle + * - data samples only from the lastest completed measurement cycle are + * stored in this mode + */ + ADMW1001_DATAREADY_PER_MULTICYCLE_BURST, + /*!< The DATAREADY signal is asserted after completion of each burst of + * measurement cycles + * - applicable only when @ref ADMW1001_OPERATING_MODE_MULTICYCLE + * is also selected + * - data samples only from the lastest completed burst of measurement + * cycles are stored in this mode + */ +} ADMW1001_DATAREADY_MODE; + +/*! ADMW1001 calibration mode options */ +typedef enum { + ADMW1001_NO_CALIBRATION = 0, + /*!< No full scale ADC calibration is performed after a latch command is sent. + */ + ADMW1001_DO_CALIBRATION, + /*!< Full scale ADC Calibration is performed after a latch command is sent. + */ +} ADMW1001_CALIBRATION_MODE; + +/*! ADMW1001 power mode options */ +typedef enum { + ADMW1001_POWER_MODE_LOW = 1, + /*!< Lowest ADC power consumption mode, with lowest conversion rate */ + ADMW1001_POWER_MODE_MID, + /*!< Medium ADC power consumption mode, with medium conversion rate */ + ADMW1001_POWER_MODE_FULL, + /*!< Highest ADC power consumption mode, with highest conversion rate */ +} ADMW1001_POWER_MODE; + +/*! ADMW1001 measurement cycle types */ +typedef enum +{ + ADMW1001_CYCLE_TYPE_SWITCH = 0, + /*!< Switch channels after every conversion */ + ADMW1001_CYCLE_TYPE_FULL = 1 + /*!< Perform full number of requested conversions on a channel + * consecutively before switching to the next channel */ +} ADMW1001_CYCLE_TYPE; + +#ifdef __V2_3_CFG_FMT__ +/*! ADMW1001 measurement analog filter settling options */ +typedef enum +{ + ADMW1001_FILTER_SETTLING_ALWAYS = 0, + /*!< Allow full settling time to elapse between every measurement from an analog sensor */ + ADMW1001_FILTER_SETTLING_FAST = 1 + /*!< Skip settling time between consecutive measurements from an analog sensor */ +} ADMW1001_FILTER_SETTLING; +#endif + +/*! ADMW1001 measurement unit options + * + * Optionally select a measurement unit for final conversion results. + * Currently applicable only to specific temperature sensor types. + */ +typedef enum { + ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED = 0, + /*!< No measurement unit specified */ + ADMW1001_MEASUREMENT_UNIT_CELSIUS, + /*!< Celsius temperature unit - applicable to temperature sensors only */ + ADMW1001_MEASUREMENT_UNIT_FAHRENHEIT, + /*!< Fahrenheit temperature unit - applicable to temperature sensors only */ +} ADMW1001_MEASUREMENT_UNIT; + +/*! ADMW1001 Open-Sensor Diagnostics frequency + * + * Select the per-cycle frequency at which open-sensor diagnostic + * checks should be performed. Open-sensor diagnostic checks typically require + * specific or time-consuming processing which cannot be executed while a + * measurement cycle is running. + * + * @note Open-sensor diagnostic checks, when performed, will add a delay to the + * start of the next measurement cycle. + */ +typedef enum { + ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED = 0, + /*!< No Open-Sensor Detection is performed */ + ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_CYCLE, + /*!< No Open-Sensor Detection is performed prior to each cycle */ + ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_100_CYCLES, + /*!< No Open-Sensor Detection is performed at intervals of 100 cycles */ + ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_1000_CYCLES, + /*!< No Open-Sensor Detection is performed at intervals of 1000 cycles */ +} ADMW1001_OPEN_SENSOR_DIAGNOSTICS; + +/*! ADMW1001 analog input signal amplification gain options + * + * @note applicable only to ADC analog sensor channels + */ +typedef enum { + ADMW1001_ADC_GAIN_1X = 0, + /*!< no amplification gain */ + ADMW1001_ADC_GAIN_2X, + /*!< x2 amplification gain */ + ADMW1001_ADC_GAIN_4X, + /*!< x4 amplification gain */ + ADMW1001_ADC_GAIN_8X, + /*!< x8 amplification gain */ + ADMW1001_ADC_GAIN_16X, + /*!< x16 amplification gain */ + ADMW1001_ADC_GAIN_32X, + /*!< x32 amplification gain */ + ADMW1001_ADC_GAIN_64X, + /*!< x64 amplification gain */ + ADMW1001_ADC_GAIN_128X, + /*!< x128 amplification gain */ +} ADMW1001_ADC_GAIN; + +/*! ADMW1001 analog sensor excitation current output level options + * + * @note applicable only to ADC analog sensor channels, and + * specific sensor types + */ +typedef enum { + ADMW1001_ADC_EXC_CURRENT_NONE = 0, + /*!< Excitation current disabled */ + ADMW1001_ADC_EXC_CURRENT_50uA, + /*!< 50uA excitation current enabled */ + ADMW1001_ADC_EXC_CURRENT_100uA, + /*!< 100uA excitation current */ + ADMW1001_ADC_EXC_CURRENT_250uA, + /*!< 250uA excitation current enabled */ + ADMW1001_ADC_EXC_CURRENT_500uA, + /*!< 500uA excitation current enabled */ + ADMW1001_ADC_EXC_CURRENT_750uA, + /*!< 750uA excitation current enabled */ + ADMW1001_ADC_EXC_CURRENT_1000uA, + /*!< 1mA excitation current enabled */ +} ADMW1001_ADC_EXC_CURRENT; + +/*! ADMW1001 analog sensor excitation current ratios used for diode sensor + * + * @note applicable only to a diode sensor + */ +typedef enum { + ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_DEFAULT = 0, + ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_MAX, +} ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO; + +/*! ADMW1001 analog reference selection options + * + * @note applicable only to ADC analog sensor channels, and + * specific sensor types + */ +typedef enum { + ADMW1001_ADC_REFERENCE_NONE = 0, + /*!< No reference is selected */ + + ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, + /*!< Internal reference resistor #1 (4320 ohms) is selected */ + ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_2, + /*!< Internal reference resistor #2 (10000 ohms) is selected */ + ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, + /*!< Internal ADC voltage reference (2.5V) is selected */ + ADMW1001_ADC_REFERENCE_VOLTAGE_AVDD, + /*!< Analag Supply Voltage AVDD reference (typically 3.3V) is selected */ + + ADMW1001_ADC_REFERENCE_RESISTOR_EXTERNAL_1, + /*!< External user-supplied reference resistor #1 is selected + * + * @note reference resistor value externalRef1Value must be specified + * (see @ref ADMW1001_MEASUREMENT_CONFIG) */ + ADMW1001_ADC_REFERENCE_RESISTOR_EXTERNAL_2, + /*!< External user-supplied reference resistor #2 is selected + * + * @note reference resistor value externalRef2Value must be specified + * (see @ref ADMW1001_MEASUREMENT_CONFIG) */ + ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_1, + /*!< External user-supplied reference voltage #1 is selected + * + * @note reference voltage value externalRef1Value must be specified + * (see @ref ADMW1001_MEASUREMENT_CONFIG) */ + ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_2, + /*!< External user-supplied reference voltage #2 is selected + * + * @note reference voltage value externalRef2Value must be specified + * (see @ref ADMW1001_MEASUREMENT_CONFIG) */ + ADMW1001_ADC_REFERENCE_BRIDGE_EXCITATION, + /*!< Bridge Excition Voltage is selected as reference + * + * @note this reference MUST be selected for 4/6-wire bridge sensor types + * (see @ref ADMW1001_ADC_SENSOR_TYPE) */ +} ADMW1001_ADC_REFERENCE_TYPE; + +/*! ADMW1001 analog filter selection options + * + * @note applicable only to ADC analog sensor channels + */ +typedef enum { + ADMW1001_ADC_FILTER_SINC4 = 1, + /*!< SINC4 filter + * + * @note The number of input samples to be averaged by the filter + * must be specified by fs (see @ref ADMW1001_ADC_FILTER_CONFIG). + * The fs value affects the output sample rate and settling times + * of the ADC */ + ADMW1001_ADC_FILTER_FIR_20SPS, + /*!< FIR post filter, producing a 20sps output sample rate */ + ADMW1001_ADC_FILTER_FIR_25SPS, + /*!< FIR post filter, producing a 25sps output sample rate */ +} ADMW1001_ADC_FILTER_TYPE; + +/*! ADMW1001 FFT sequence mode options + * + * @note applicable only for FFT measurement modes + */ +typedef enum { + ADMW1001_FFT_MODE_SINGLE = 0, + /*!< Performs a single sequence of FFTs on selected channels and stops */ + ADMW1001_FFT_MODE_CONTINUOUS, + /*!< Performs continuous sequences of FFTs on selected channels */ +} ADMW1001_FFT_MODE; + +/*! ADMW1001 FFT size options (number of bins) + * + * @note applicable only for FFT measurement modes + */ +typedef enum { + ADMW1001_FFT_SIZE_256 = 0, + /*!< 256 bins */ + ADMW1001_FFT_SIZE_512, + /*!< 512 bins */ + ADMW1001_FFT_SIZE_1024, + /*!< 1024 bins */ + ADMW1001_FFT_SIZE_2048, + /*!< 2048 bins */ +} ADMW1001_FFT_SIZE; + +/*! ADMW1001 FFT window type options + * + * @note applicable only for FFT measurement modes + */ +typedef enum { + ADMW1001_FFT_WINDOW_NONE = 0, + /*!< No Window */ + ADMW1001_FFT_WINDOW_HANN, + /*!< Hann Window */ + ADMW1001_FFT_WINDOW_BLACKMAN_HARRIS, + /*!< Blackman-Harris Window */ +} ADMW1001_FFT_WINDOW; + +/*! ADMW1001 FFT output format options + * + * @note applicable only for FFT measurement modes + */ +typedef enum { + ADMW1001_FFT_OUTPUT_FULL = 0, + /*!< N/2-Term Amplitude Response */ + ADMW1001_FFT_OUTPUT_FULL_WITH_RAW, + /**< N/2-Term Amplitude Response Plus N Raw ADC Samples */ + ADMW1001_FFT_OUTPUT_MAX16, + /*!< Bin-Number and Amplitude of 16 Highest Peaks of Amplitude Response */ +} ADMW1001_FFT_OUTPUT; + +/*! ADMW1001 I2C clock speed options + * + * @note applicable only for I2C sensors + */ +typedef enum +{ + ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K = 0, + /*!< 100kHz I2C clock speed */ + ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_400K, + /*!< 400kHz I2C clock speed */ +} ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED; + +/*! ADMW1001 UART baud rate options + * + * @note applicable only for UART sensors + */ +typedef enum +{ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_115200 = 0, + /*!< 115200 UART baud rate */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_57600, + /*!< 57600 UART baud rate */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_38400, + /*!< 38400 UART baud rate */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_19200, + /*!< 19200 UART baud rate */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_9600, + /*!< 9600 UART baud rate */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_4800, + /*!< 4800 UART baud rate */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_2400, + /*!< 2400 UART baud rate */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_1200, + /*!< 1200 UART baud rate */ +} ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE; + +/*! ADMW1001 UART line config options + * + * @note applicable only for UART sensors + */ +typedef enum +{ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N1 = 0, + /*!< UART line control 8 data bits / no parity / 1 stop bit */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N2, + /*!< UART line control 8 data bits / no parity / 2 stop bits */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N3, + /*!< UART line control 8 data bits / no parity / 3 stop bits */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E1, + /*!< UART line control 8 data bits / even parity / 1 stop bit */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E2, + /*!< UART line control 8 data bits / even parity / 2 stop bits */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E3, + /*!< UART line control 8 data bits / even parity / 3 stop bits */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O1, + /*!< UART line control 8 data bits / odd parity / 1 stop bit */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O2, + /*!< UART line control 8 data bits / odd parity / 2 stop bits */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O3, + /*!< UART line control 8 data bits / odd parity / 3 stop bits */ +} ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG; + +/*! ADMW1001 SPI mode options + * + * @note applicable only for SPI sensors + */ +typedef enum +{ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_0 = 0, + /*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 0 */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_1, + /*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 1 */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_2, + /*!< SPI mode 0 Clock Polarity = 1 Clock Phase = 0 */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_3, + /*!< SPI mode 0 Clock Polarity = 1 Clock Phase = 1 */ +} ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE; + +/*! ADMW1001 SPI clock speed options + * + * @note applicable only for SPI sensors + */ +typedef enum +{ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_13MHZ = 0, + /*!< SPI Clock Speed configured to 13MHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6_5MHZ, + /*!< SPI Clock Speed configured to 6.5MHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3_25MHZ, + /*!< SPI Clock Speed configured to 3.25MHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_625MHZ, + /*!< SPI Clock Speed configured to 1.625MHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_812KHZ, + /*!< SPI Clock Speed configured to 812kHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_406KHZ, + /*!< SPI Clock Speed configured to 406kHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_203KHZ, + /*!< SPI Clock Speed configured to 203kHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_101KHZ, + /*!< SPI Clock Speed configured to 101kHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_50KHZ, + /*!< SPI Clock Speed configured to 50kHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_25KHZ, + /*!< SPI Clock Speed configured to 25kHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_12KHZ, + /*!< SPI Clock Speed configured to 12kHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6KHZ, + /*!< SPI Clock Speed configured to 6kHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3KHZ, + /*!< SPI Clock Speed configured to 3kHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_5KHZ, + /*!< SPI Clock Speed configured to 1.5kHz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_793HZ, + /*!< SPI Clock Speed configured to 793hz */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_396HZ, + /*!< SPI Clock Speed configured to 396hz */ +} ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK; + +/*! ADMW1001 Power Configuration options */ +typedef struct { + ADMW1001_POWER_MODE powerMode; + /*!< Power mode selection */ +} ADMW1001_POWER_CONFIG; + +/*! ADMW1001 Multi-Cycle Configuration options + * + * @note required only when ADMW1001_OPERATING_MODE_MULTICYCLE is selected + * as the operatingMode (@ref ADMW1001_MEASUREMENT_CONFIG) + */ +typedef struct { + uint32_t cyclesPerBurst; + /*!< Number of cycles to complete for a single burst */ + uint32_t burstInterval; + /*!< Interval, in seconds, between each successive burst of cycles */ +} ADMW1001_MULTICYCLE_CONFIG; + +/*! ADMW1001 Measurement Configuration options */ +typedef struct { + ADMW1001_OPERATING_MODE operatingMode; + /*!< Operating mode - specifies how measurement cycles are scheduled */ + ADMW1001_DATAREADY_MODE dataReadyMode; + /*!< Data read mode - specifies how output samples are stored for reading */ + ADMW1001_CALIBRATION_MODE calibrationMode; + /*!< Calibration mode - specifies if adc calibration is performed after a latch command */ + ADMW1001_MULTICYCLE_CONFIG multiCycleConfig; + /*!< Multi-Cycle configuration - specifies how bursts of measurement cycles + * are scheduled. Applicable only when operatingMode is + * ADMW1001_OPERATING_MODE_MULTICYCLE + */ + uint32_t cycleInterval; + /*!< Cycle interval - specifies the time interval between the start of each + * successive measurement cycle. Applicable only when operatingMode is + * not ADMW1001_OPERATING_MODE_SINGLECYCLE + */ + ADMW1001_CYCLE_TYPE cycleType; + /*!< Cycle type - specifies how the channel list is traversed with each + * conversion during the cycle. + */ +#ifdef __V2_3_CFG_FMT__ + ADMW1001_FILTER_SETTLING filterSettling; + /*!< Analog filter settling - specifies the policy for settling time + * between consecutive measurements from an analog channel in a multi- + * channel configuration. Note that, in single analog channel + * configurations, settling time is always skipped between consecutive + * measurements in a measurement cycle. + */ +#endif + float32_t externalRef1Value; + /*!< Resistance/voltage value connected to external reference input #1. + * Applicable only if the selected reference type is + * ADMW1001_ADC_REFERENCE_RESISTOR_EXTERNAL_1 or + * ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_1 + * (see @ref ADMW1001_ADC_REFERENCE_TYPE) + */ + float32_t externalRef2Value; + /*!< Resistance/voltage value connected to external reference input #2. + * Applicable only if the selected reference type is + * ADMW1001_ADC_REFERENCE_RESISTOR_EXTERNAL_2 or + * ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_2 + * (see @ref ADMW1001_ADC_REFERENCE_TYPE) + */ + bool enableExternalFlash; + /*!< Enable the use of external flash memory for storage of samples. + */ +} ADMW1001_MEASUREMENT_CONFIG; + +/*! ADMW1001 ADC Excitation Current output configuration + * + * @note applicable only to ADC analog sensor channels, and + * specific sensor types + */ +typedef struct { + ADMW1001_ADC_EXC_CURRENT outputLevel; + /*!< Excitation current output level */ + ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO diodeRatio; + /*!< Excitation current output diode ratio */ +} ADMW1001_ADC_EXC_CURRENT_CONFIG; + +/*! ADMW1001 ADC Filter configuration + * + * @note applicable only to ADC analog sensor channels + */ +typedef struct { + ADMW1001_ADC_FILTER_TYPE type; + /*!< Filter type selection */ + uint32_t fs; + /*!< Number of input samples to accumulate and average in the filter. + * Applicable only when type is ADMW1001_ADC_FILTER_SINC4 */ +} ADMW1001_ADC_FILTER_CONFIG; + +/*! ADMW1001 ADC Referemce configuration + * + * @note applicable only to ADC analog sensor channels + */ +typedef struct { + ADMW1001_ADC_REFERENCE_TYPE type; + /*!< Filter type selection */ + bool disableBuffer; + /*!< Option to disable internal ADC reference buffer */ +} ADMW1001_ADC_REFERENCE_CONFIG; + +/*! ADMW1001 ADC analog channel configuration details + * + * @note applicable only to ADC analog sensor channels + */ +typedef struct { + ADMW1001_ADC_SENSOR_TYPE sensor; + /*!< Sensor type selection */ + ADMW1001_ADC_GAIN gain; + /*!< ADC Gain selection */ + ADMW1001_ADC_EXC_CURRENT_CONFIG current; + /*!< ADC Excitation Current configuration */ + ADMW1001_ADC_FILTER_CONFIG filter; + /*!< ADC Filter configuration */ + ADMW1001_ADC_REFERENCE_CONFIG reference; + /*!< ADC Reference configuration */ + bool enableVbias; + /*!< Option to enable internal ADC voltage bias */ +} ADMW1001_ADC_CHANNEL_CONFIG; + +/*! ADMW1001 digital sensor data encoding + * + * @note applicable only to SPI and I2C digital sensor channels + */ +typedef enum +{ + ADMW1001_DIGITAL_SENSOR_DATA_CODING_NONE, + /**< None/Invalid - data format is ignored if coding is set to this value */ + ADMW1001_DIGITAL_SENSOR_DATA_CODING_UNIPOLAR, + /**< Unipolar - unsigned integer values */ + ADMW1001_DIGITAL_SENSOR_DATA_CODING_TWOS_COMPLEMENT, + /**< Twos-complement - signed integer values */ + ADMW1001_DIGITAL_SENSOR_DATA_CODING_OFFSET_BINARY, + /**< Offset Binary - used to represent signed values with unsigned integers, + * with the mid-range value representing 0 */ +} ADMW1001_DIGITAL_SENSOR_DATA_CODING; + +/*! ADMW1001 digital sensor data format configuration + * + * @note applicable only to SPI and I2C digital sensor channels + */ +typedef struct { + ADMW1001_DIGITAL_SENSOR_DATA_CODING coding; + /**< Data Encoding of Sensor Result */ + bool littleEndian; + /**< Set as true if data format is little-endian, false otherwise */ + bool leftJustified; + /**< Set as true if data is left-justified in the data frame, false otherwise */ + uint8_t frameLength; + /**< Data frame length (number of bytes to read from the sensor) */ + uint8_t numDataBits; + /**< Number of relevant data bits to extract from the data frame */ + uint8_t bitOffset; + /**< Data bit offset, relative to data alignment within the data frame */ +} ADMW1001_DIGITAL_SENSOR_DATA_FORMAT; + +/*! ADMW1001 digital sensor command + * + * @note applicable only to SPI and I2C digital sensor channels + */ +typedef struct { + uint8_t command[ADMW1001_SENSOR_COMMAND_MAX_LENGTH]; + /*!< Optional command bytes to send to the device */ + uint8_t commandLength; + /*!< Number of valid command bytes. Set to 0 if unused */ +} ADMW1001_DIGITAL_SENSOR_COMMAND; + +/*! ADMW1001 digital sensor calibration param + * + * @note applicable only to digital sensor channels + */ +typedef struct { + uint32_t calibrationParam; + /*!< Independently established environmental variable used during calibration + * of a digital sensor. Used only if the sensor supports calibration + * and expects an environmental parameter + */ + bool enableCalibrationParam; + /*!< Allow Calibration_Parameter to be used during calibration of any digital sensor */ +} ADMW1001_DIGITAL_CALIBRATION_COMMAND; + +/*! ADMW1001 digital sensor communication config + * + * @note applicable only to digital sensor channels + */ +typedef struct { + bool useCustomCommsConfig; + /*!< Optional parameter to enable user digital communication settings */ + ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED i2cClockSpeed; + /*!< Optional parameter to configure specific i2c speed for i2c sensor */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE spiMode; + /*!< Optional parameter to configure specific spi mode for spi sensor */ + ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK spiClock; + /*!< Optional parameter to configure specific spi clock for spi sensor */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE uartBaudRate; + /*!< Optional parameter to configure specific uart baud rate for uart sensor */ + ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG uartLineConfig; + /*!< Optional parameter to configure specific uart line control for uart sensor */ +} ADMW1001_DIGITAL_SENSOR_COMMS; + +/*! ADMW1001 I2C digital channel configuration details + * + * @note applicable only to I2C digital sensor channels + */ +typedef struct { + ADMW1001_I2C_SENSOR_TYPE sensor; + /*!< Sensor type selection */ + uint32_t deviceAddress; + /*!< I2C device address (7-bit) */ + ADMW1001_DIGITAL_SENSOR_COMMAND configurationCommand; + /*!< Optional configuration command to send to the device at start-up. + * A default configuration command will be used if this is not specified. + * Applicable only to specific I2C sensor types. + */ + ADMW1001_DIGITAL_SENSOR_COMMAND dataRequestCommand; + /*!< Optional data request command to send to the device for each sample. + * A default data request command will be used if this is not specified. + * Applicable only to specific I2C sensor types. + */ + ADMW1001_DIGITAL_SENSOR_DATA_FORMAT dataFormat; + /*!< Optional data format configuration to parse/extract data from the device. + * A default data format will be used if this is not specified. + * Applicable only to specific I2C sensor types + */ + ADMW1001_DIGITAL_CALIBRATION_COMMAND digitalCalibrationParam; + /*!< This is used to supply an independently established environmental variable + * that must be used during calibration of a [digital] sensor which a) + * supports calibration and b) expects an environmental parameter. + * An example is a CO2 sensor, which may require the CO2 concentration level + * when performing a calibration + */ + ADMW1001_DIGITAL_SENSOR_COMMS configureComms; + /*!< Optional configuration to setup a user communication config. + * A default configuration will be used if this is not specified. + * Applicable only to specific I2C sensor types. + */ +} ADMW1001_I2C_CHANNEL_CONFIG; + +/*! ADMW1001 SPI digital channel configuration details + * + * @note applicable only to SPI digital sensor channels + */ +typedef struct { + ADMW1001_SPI_SENSOR_TYPE sensor; + /*!< Sensor type selection */ + ADMW1001_DIGITAL_SENSOR_COMMAND configurationCommand; + /*!< Optional configuration command to send to the device at start-up. + * A default configuration command will be used if this is not specified. + * Applicable only to specific SPI sensor types. + */ + ADMW1001_DIGITAL_SENSOR_COMMAND dataRequestCommand; + /*!< Optional data request command to send to the device for each sample. + * A default data request command will be used if this is not specified. + * Applicable only to specific SPI sensor types. + */ + ADMW1001_DIGITAL_SENSOR_DATA_FORMAT dataFormat; + /*!< Optional data format configuration to parse/extract data from the device. + * A default data format will be used if this is not specified. + * Applicable only to specific SPI sensor types + */ + ADMW1001_DIGITAL_CALIBRATION_COMMAND digitalCalibrationParam; + /*!< This is used to supply an independently established environmental variable + * that must be used during calibration of a [digital] sensor which a) + * supports calibration and b) expects an environmental parameter. + * An example is a CO2 sensor, which may require the CO2 concentration level + * when performing a calibration + */ + ADMW1001_DIGITAL_SENSOR_COMMS configureComms; + /*!< Optional configuration to setup a user communication config. + * A default configuration will be used if this is not specified. + * Applicable only to specific SPI sensor types. + */ +} ADMW1001_SPI_CHANNEL_CONFIG; + +/*! ADMW1001 UART digital channel configuration details + * + * @note applicable only to UART digital sensor channels + */ +typedef struct { + ADMW1001_UART_SENSOR_TYPE sensor; + /*!< Sensor type selection */ + ADMW1001_DIGITAL_CALIBRATION_COMMAND digitalCalibrationParam; + /*!< This is used to supply an independently established environmental variable + * that must be used during calibration of a [digital] sensor which a) + * supports calibration and b) expects an environmental parameter. + * An example is a CO2 sensor, which may require the CO2 concentration level + * when performing a calibration + */ + ADMW1001_DIGITAL_SENSOR_COMMS configureComms; + /*!< Optional configuration to setup a user communication config. + * A default configuration will be used if this is not specified. + * Applicable only to specific UART sensor types. + */ +} ADMW1001_UART_CHANNEL_CONFIG; + +/*! ADMW1001 Measurement Channel configuration details */ +typedef struct { + bool enableChannel; + /*!< Option to include this channel in normal measurement cycles */ + bool enableFFT; + /*!< Option to include this channel in FFT measurement cycles */ + bool disablePublishing; + /*!< Option to disable publishing of data samples from this channel. The + * channel may still be included in measurement cycles, but data samples + * obtained from this channel will not be published. This is typically + * used for channels which are required only as a compensation reference + * for another channel (e.g. Cold-Junction Compensation channels). + */ + ADMW1001_CHANNEL_ID compensationChannel; + /*!< Optional compensation channel. Set to ADMW1001_CHANNEL_ID_NONE if not + * required. Typically used for thermocouple sensors that require a + * separate measurement of the "cold-junction" temperature, which can be + * be provided by an RTD temperature sensor connected on a separate + * "compensation channel" */ + bool enableUnityLut; + /*!< Option to choose the LUT for calculations, this implies that the + * fundamental measurement for the sensor (typically mV or Ohms) + * would be returned as the measurement result. + */ + ADMW1001_MEASUREMENT_UNIT measurementUnit; + /*!< Optional measurement unit selection for conversion results. Applicable + * only for certain sensor types. Set to + * ADMW1001_MEASUREMENT_UNIT_DEFAULT if not applicable. + */ + float32_t lowThreshold; + /*!< Optional minimum threshold value for each processed sample, to be + * checked prior to publishing. A channel ALERT condition is raised + * if the processed value is lower than this threshold. Set to NaN + * if not required. + */ + float32_t highThreshold; + /*!< Optional maximum threshold value for each processed sample, to be + * checked prior to publishing. A channel ALERT condition is raised + * if the processed value is higher than this threshold. Set to NaN + * if not required. + */ + float32_t offsetAdjustment; + /*!< Optional offset adjustment value applied to each processed sample. + * Set to NaN or 0.0 if not required. + */ + float32_t gainAdjustment; + /*!< Optional gain adjustment value applied to each processed sample. + * Set to NaN or 1.0 if not required. + */ + float32_t sensorParameter; + /*!< Optional sensor parameter adjustment. + * Set to NaN or 0 if not required. + */ + uint32_t measurementsPerCycle; + /*!< The number of measurements to obtain from this channel within each + * cycle. Each enabled channel is measured in turn, until the number of + * measurements requested for the channel has been reached. A different + * number of measurements-per-cycle may be specified for each channel. + */ + uint32_t cycleSkipCount; + /*!< Optional number of cycles to skip, such that this channel is included + * in the sequence in only one of every (cycleSkipCount + 1) cycles that + * occur. If set to 0 (default), this channel is included in every cycle; + * if set to 1, this channel is included in every 2nd cycle; if set to 2, + * this channel is included in every 3rd cycle, and so on. + */ + uint32_t extraSettlingTime; + /*!< A minimum settling time is applied internally for each channel, based + * on the sensor type. However, additional settling time (microseconds) + * can optionally be specified. Set to 0 if not required. + */ + ADMW1001_CHANNEL_PRIORITY priority; + /*!< By default, channels are arranged in the measurement sequence based on + * ascending order of channel ID. However, a priority-level may be + * specified per channel to force a different ordering of the channels, + * with higher-priority channels appearing before lower-priority channels. + * Channels with equal priority are ordered by ascending order of channel + * ID. Lower numbers indicate higher priority, with 0 being the highest. + * Set to 0 if not required. + */ + union { + ADMW1001_ADC_CHANNEL_CONFIG adcChannelConfig; + /*!< ADC channel configuration - applicable only to ADC channels */ + ADMW1001_I2C_CHANNEL_CONFIG i2cChannelConfig; + /*!< I2C channel configuration - applicable only to I2C channels */ + ADMW1001_SPI_CHANNEL_CONFIG spiChannelConfig; + /*!< SPI channel configuration - applicable only to SPI channels */ + ADMW1001_UART_CHANNEL_CONFIG uartChannelConfig; + /*!< UART channel configuration - applicable only to UART channels */ + }; + /*!< Only one of adcChannelConfig, i2cChannelConfig, spiChannelConfig or + * uartChannelConfig is required, depending on the channel designation + * (analog, I2C, SPI or UART) + */ +} ADMW1001_CHANNEL_CONFIG; + +/*! ADMW1001 Diagnostics configuration details */ +typedef struct { + bool disableGlobalDiag; + /*!< Option to disable the following diagnostic checks on the ADC: + * - Reference Detection errors + * - Input under-/over-voltage errors + * - Calibration, Conversion and Saturation errors + */ + bool disableMeasurementDiag; + /*!< Option to disable additional checks per measurement channel: + * - High/low threshold limit violation + */ +#ifdef __V2_3_CFG_FMT__ + bool disableCriticalTempAbort; + /*!< Option to disable abort of measurement cycle if the operating + * temperature of the ADMW1001 has exceeded critical limits + */ +#endif + ADMW1001_OPEN_SENSOR_DIAGNOSTICS osdFrequency; + /*!< Option to enable Open-Circuit Detection at a selected cycle interval */ +} ADMW1001_DIAGNOSTICS_CONFIG; + +/*! ADMW1001 FFT Measurement Mode configuration options */ +typedef struct { + ADMW1001_FFT_MODE mode; + /*!< FFT sequence mode */ + ADMW1001_FFT_SIZE size; + /*!< FFT size selection */ + ADMW1001_FFT_WINDOW window; + /*!< FFT window type selection */ + ADMW1001_FFT_OUTPUT output; + /*!< FFT output type selection */ +} ADMW1001_FFT_CONFIG; + +#ifdef __V2_3_CFG_FMT__ +typedef uint16_t ADMW1001_ADVANCED_ACCESS_KEY; +#endif + +/*! ADMW1001 Device configuration details */ +typedef struct { + ADMW1001_POWER_CONFIG power; + /*!< Power configuration details */ + ADMW1001_MEASUREMENT_CONFIG measurement; + /*!< Measurement configuration details */ + ADMW1001_DIAGNOSTICS_CONFIG diagnostics; + /*!< Diagnostics configuration details */ + ADMW1001_FFT_CONFIG fft; + /*!< FFT configuration details */ + ADMW1001_CHANNEL_CONFIG channels[ADMW1001_MAX_CHANNELS]; + /*!< Channel-specific configuration details */ +#ifdef __V2_3_CFG_FMT__ + ADMW1001_ADVANCED_ACCESS_KEY advancedAccessKey; +#endif + /*!< Key to enable access to advanced sensor configuration options */ +} ADMW1001_CONFIG; + +#ifdef __cplusplus +} +#endif + +/*! + * @} + */ + +#endif /* __ADMW1001_CONFIG_H__ */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw1001/admw1001_host_comms.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,61 @@ +/* +Copyright (c) 2018 by ADI. This model is the confidential and +proprietary property of ADI and the possession or use of this +file requires a written license. +*/ +#ifndef __ADMW1001_HOST_COMMS_H__ +#define __ADMW1001_HOST_COMMS_H__ + +#include "admw_types.h" +/* + * The host is expected to transfer a 16-bit command, followed by data bytes, in 2 + * separate transfers delineated by the CS signal and a short delay in between. + * + * The 16-bit command contains a right-justified 11-bit register address (offset), + * and the remaining upper 5 bits are reserved as command bits assigned as follows: + * [15:11] 10000b = write command, 01000b = read command, anything else is invalid + * [10:0] register address (0-2047) + */ + +/* Register address space is limited to 2048 bytes (11 bit address) */ +#define ADMW1001_HOST_COMMS_CMD_MASK 0xF800 +#define ADMW1001_HOST_COMMS_ADR_MASK 0x07FF + +/* + * The following commands are currently supported, anything else is treated + * as an error + */ +#define ADMW1001_HOST_COMMS_WRITE_CMD 0x8000 +#define ADMW1001_HOST_COMMS_READ_CMD 0x4000 + +/* + * The following bytes are sent back to the host when a command is recieved, + * to be used by the host to verify that we were ready to receive the command. + */ +#define ADMW1001_HOST_COMMS_CMD_RESP_0 0xF0 +#define ADMW1001_HOST_COMMS_CMD_RESP_1 0xE1 + +/* + * The following minimum delay, in microseconds, must be inserted after each SPI + * transfer to allow time for it to be processed by the device + */ +#define ADMW1001_HOST_COMMS_XFER_DELAY (60) + +/*! ADMW1001 Sensor Result bit field structure */ +typedef struct _ADMW1001_Sensor_Result_t { + union { + struct { + float32_t Sensor_Result; /**< Linearized and compensated sensor result */ + uint32_t Channel_ID : 4; /**< Indicates which channel this result corresponds to */ + uint32_t Ch_Error : 1; /**< Indicates Error on channel */ + uint32_t Ch_Alert : 1; /**< Indicates Alert on channel */ + uint32_t Ch_Raw : 1; /**< Indicates if Raw sensor data field is valid */ + uint32_t Ch_Valid : 1; /**< Indicates if this Result structure is valid */ + uint32_t Raw_Sample : 24; /**< Raw sensor data value */ + }; + uint64_t VALUE64; + }; +} ADMW1001_Sensor_Result_t; + +#endif /* __ADMW1001_HOST_COMMS_H__ */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw1001/admw1001_lut_data.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,362 @@ +/* +Copyright 2017 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + ****************************************************************************** + * @file: + * @brief: Look-Up Table data-type definitions for ADSNS1000 API. + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW1001_LUT_DATA_H__ +#define __ADMW1001_LUT_DATA_H__ + +#include "admw_types.h" +#include "admw1001_sensor_types.h" + +//lint --e{38} suppress "offset of symbol" + +/*! @addtogroup ADMW1001_Api + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/*! LUT data validation signature */ +#define ADMW_LUT_SIGNATURE 0x4C555473 + +/*! LUT data CRC-16-CCITT seed value */ +#define ADMW_LUT_CRC_SEED 0x4153 + +/*! LUT maximum allowed size */ +#define ADMW_LUT_MAX_SIZE 10240U + +/*! Linearisation look-up table / co-efficient list geometry */ +typedef enum { + ADMW1001_LUT_GEOMETRY_RESERVED = 0x00, + /**< reserved - for internal use only */ + ADMW1001_LUT_GEOMETRY_COEFFS = 0x01, + /**< 1D/2D equation coefficient list */ + ADMW1001_LUT_GEOMETRY_NES_1D = 0x02, + /**< 1-dimensional not-equally-spaced look-up table */ + ADMW1001_LUT_GEOMETRY_NES_2D = 0x03, + /**< 2-dimensional not-equally-spaced look-up table */ + ADMW1001_LUT_GEOMETRY_ES_1D = 0x04, + /**< 1-dimensional equally-spaced look-up table */ + ADMW1001_LUT_GEOMETRY_ES_2D = 0x05, + /**< 2-dimensional equally-spaced look-up table */ +} ADMW1001_LUT_GEOMETRY; + +/*! Linearisation equation type */ +typedef enum { + ADMW1001_LUT_EQUATION_POLYN, + /**< Polynomial equation, typically used for Thermocouple and RTD + * linearisation */ + ADMW1001_LUT_EQUATION_POLYNEXP, + /**< Polynomial + exponential equation, typically used for Thermocouple + * inverse linearisation */ + ADMW1001_LUT_EQUATION_QUADRATIC, + /**< Quadratic linearisation equation, typically used for RTD + * linearisation */ + ADMW1001_LUT_EQUATION_STEINHART, + /**< Steinhart-Hart equation, typically used for Thermistor + * linearisation */ + ADMW1001_LUT_EQUATION_LOGARITHMIC, + /**< Beta-based logarithmic equation, typically used for Thermistor + * linearisation */ + ADMW1001_LUT_EQUATION_BIVARIATE_POLYN, + /**< Bi-variate polynomial equation, typically used for bridge pressure + * sensor linearisation + * @note 2nd-degree is the maximum currently supported + */ + ADMW1001_LUT_EQUATION_COUNT, + /**< Enum count value - for internal use only */ + ADMW1001_LUT_EQUATION_LUT, + /**< Hard-coded Look-Up Table - for internal use only */ +} ADMW1001_LUT_EQUATION; + +typedef enum { + ADMW1001_LUT_TC_DIRECTION_FORWARD, + /**< Thermocouple forward (mV to Celsius) linearisation + * Use this value by default for non-thermocouple sensors */ + ADMW1001_LUT_TC_DIRECTION_BACKWARD, + /**< Thermocouple inverse (Celsius to mV) linearisation */ + ADMW1001_LUT_TC_DIRECTION_COUNT, + /**< Enum count value - for internal use only */ +} ADMW1001_LUT_TC_DIRECTION; + +/*! Linearisation data vector format */ +typedef enum { + ADMW1001_LUT_DATA_TYPE_RESERVED = 0, + /**< Reserved - for internal use only */ + ADMW1001_LUT_DATA_TYPE_FLOAT32 = 1, + /**< Single-precision 32-bit floating-point */ + ADMW1001_LUT_DATA_TYPE_FLOAT64 = 2, + /**< Double-precision 64-bit floating-point */ +} ADMW1001_LUT_DATA_TYPE; + +/*! Struct for a list of coefficients to be used in an equation */ +typedef struct __attribute__((packed, aligned(4))){ + uint32_t nCoeffs; + /**< number of coefficients */ + float32_t rangeMin; + /**< look-up table range - minimum */ + float32_t rangeMax; + /**< look-up table range - maximum */ + float64_t coeffs[]; + /**< C99 flexible array: sorted by ascending exponent in polynomials */ +} ADMW1001_LUT_COEFF_LIST; + +/*! Struct for a 1-dimensional equally-spaced look-up table */ +typedef struct __attribute__((packed, aligned(4))){ + uint32_t nElements; + /**< number of elements. */ + float32_t initInputValue; + /**< initial input value, corresponding to first table element */ + float32_t inputValueIncrement; + /**< interval between successive input values */ + float32_t lut[]; + /**< C99 flexible array */ +} ADMW1001_LUT_1D_ES; + +/*! Struct for a 1-dimensional not-equally-spaced look-up table */ +typedef struct __attribute__((packed, aligned(4))){ + uint32_t nElements; + /**< number of elements of each array. */ + float32_t lut[]; + /**< C99 flexible array, first X's array then Y's array*/ +} ADMW1001_LUT_1D_NES; + +/*! Struct for a 2-dimensional equally-spaced look-up table */ +typedef struct __attribute__((packed, aligned(4))){ + uint16_t nElementsX; + /**< number of elements for input X. */ + uint16_t nElementsY; + /**< number of elements for input Y. */ + float32_t initInputValueX; + /**< initial X input value */ + float32_t inputValueIncrementX; + /**< interval between successive X input values */ + float32_t initInputValueY; + /**< initial Y input value */ + float32_t inputValueIncrementY; + /**< interval between successive Y input values */ + float32_t lut[]; + /**< C99 flexible array, Z matrix[y][x] */ +} ADMW1001_LUT_2D_ES; + +/*! Struct for a 2-dimensional not-equally-spaced look-up table */ +typedef struct __attribute__((packed, aligned(4))){ + uint16_t nElementsX; + /**< number of elements in array X. */ + uint16_t nElementsY; + /**< number of elements in array Y. */ + float32_t lut[]; + /**< C99 flexible array, Order: X's array, Y's array, Z matrix[y][x] */ +} ADMW1001_LUT_2D_NES; + +/*! Struct for a 2-dimensional list of coefficients to be used in a + * bi-variate polynomial equation */ +typedef struct __attribute__((packed, aligned(4))){ + uint32_t maxDegree; + /**< number of coefficients */ + float32_t rangeMinX; + /**< look-up table range - minimum X input value */ + float32_t rangeMaxX; + /**< look-up table range - maximum X input value */ + float32_t rangeMinY; + /**< look-up table range - minimum Y input value */ + float32_t rangeMaxY; + /**< look-up table range - maximum Y input value */ + float64_t coeffs[]; + /**< C99 flexible array: sorted by ascending X degree then sorted by + * ascending Y exponent */ +} ADMW1001_LUT_2D_POLYN_COEFF_LIST; + +/*! Macro to calculate the number of elements in + * a @ref ADMW1001_LUT_COEFF_LIST table */ +#define ADMW1001_LUT_COEFF_LIST_NELEMENTS(_t) \ + ((_t).nCoeffs) + +/*! Macro to calculate the number of elements in + * a @ref ADMW1001_LUT_1D_ES table */ +#define ADMW1001_LUT_1D_ES_NELEMENTS(_t) \ + ((_t).nElements) + +/*! Macro to calculate the number of elements in + * a @ref ADMW1001_LUT_1D_NES table */ +#define ADMW1001_LUT_1D_NES_NELEMENTS(_t) \ + ((_t).nElements * 2) + +/*! Macro to calculate the number of elements in + * a @ref ADMW1001_LUT_2D_ES table */ +#define ADMW1001_LUT_2D_ES_NELEMENTS(_t) \ + ((_t).nElementsX * (_t).nElementsX) + +/*! Macro to calculate the number of elements in + * a @ref ADMW1001_LUT_2D_NES table */ +#define ADMW1001_LUT_2D_NES_NELEMENTS(_t) \ + ((_t).nElementsX + (_t).nElementsY + ((_t).nElementsX * (_t).nElementsY)) + +/*! Macro to calculate the number of elements in + * a @ref ADMW1001_LUT_2D_POLYN_COEFF_LIST table */ +#define ADMW1001_LUT_2D_POLYN_COEFF_LIST_NELEMENTS(_t) \ + (((_t).maxDegree + 1) * ((_t).maxDegree + 2) / 2) + +/*! Macro to calculate the storage size in bytes of + * a @ref ADMW1001_LUT_COEFF_LIST table */ +#define ADMW1001_LUT_COEFF_LIST_SIZE(_t) \ + (sizeof(_t) + (sizeof(float64_t) * ADMW1001_LUT_COEFF_LIST_NELEMENTS(_t))) + +/*! Macro to calculate the storage size in bytes of + * a @ref ADMW1001_LUT_1D_ES table */ +#define ADMW1001_LUT_1D_ES_SIZE(_t) \ + (sizeof(_t) + (sizeof(float32_t) * ADMW1001_LUT_1D_ES_NELEMENTS(_t))) + +/*! Macro to calculate the storage size in bytes of + * a @ref ADMW1001_LUT_1D_NES table */ +#define ADMW1001_LUT_1D_NES_SIZE(_t) \ + (sizeof(_t) + (sizeof(float32_t) * ADMW1001_LUT_1D_NES_NELEMENTS(_t))) + +/*! Macro to calculate the storage size in bytes of + * a @ref ADMW1001_LUT_2D_ES table */ +#define ADMW1001_LUT_2D_ES_SIZE(_t) \ + (sizeof(_t) + (sizeof(float32_t) * ADMW1001_LUT_2D_ES_NELEMENTS(_t))) + +/*! Macro to calculate the storage size in bytes of + * a @ref ADMW1001_LUT_2D_NES table */ +#define ADMW1001_LUT_2D_NES_SIZE(_t) \ + (sizeof(_t) + (sizeof(float32_t) * ADMW1001_LUT_2D_NES_NELEMENTS(_t))) + +/*! Macro to calculate the storage size in bytes of + * a @ref ADMW1001_LUT_2D_POLYN_COEFF_LIST table */ +#define ADMW1001_LUT_2D_POLYN_COEFF_LIST_SIZE(_t) \ + (sizeof(_t) + (sizeof(float64_t) * ADMW1001_LUT_2D_POLYN_COEFF_LIST_NELEMENTS(_t))) + +/*! Look-Up Table descriptor */ +typedef union __attribute__((packed, aligned(4))) { + struct { + uint16_t geometry : 6; /**< ADMW1001_LUT_GEOMETRY */ + uint16_t equation : 6; /**< ADMW1001_LUT_EQUATION */ + uint16_t dir : 4; /**< ADMW1001_LUT_TC_DIRECTION */ + uint16_t sensor : 12; /**< ADMW1001_ADC_SENSOR_TYPE */ + uint16_t dataType : 4; /**< ADMW1001_LUT_DATA_TYPE */ + uint16_t length; /**< Length (bytes) of table data section + (excl. this header) */ + uint16_t crc16; /**< CRC-16-CCITT of the data */ + }; + uint64_t value64; +} ADMW1001_LUT_DESCRIPTOR; + +/*! Look-Up Table geometry-specific data structures */ +typedef union { + ADMW1001_LUT_COEFF_LIST coeffList; + /**< Data format for tables with ADMW1001_LUT_GEOMETRY_COEFFS geometry + * except where equation is ADMW1001_LUT_EQUATION_BIVARIATE_POLYN */ + ADMW1001_LUT_1D_ES lut1dEs; + /**< Data format for tables with ADMW1001_LUT_GEOMETRY_ES_1D geometry */ + ADMW1001_LUT_1D_NES lut1dNes; + /**< Data format for tables with ADMW1001_LUT_GEOMETRY_NES_1D geometry */ + ADMW1001_LUT_2D_ES lut2dEs; + /**< Data format for tables with ADMW1001_LUT_GEOMETRY_ES_2D geometry */ + ADMW1001_LUT_2D_NES lut2dNes; + /**< Data format for tables with ADMW1001_LUT_GEOMETRY_NES_2D geometry */ + ADMW1001_LUT_2D_POLYN_COEFF_LIST coeffList2d; + /**< Data format for tables with ADMW1001_LUT_GEOMETRY_COEFFS geometry + * and ADMW1001_LUT_EQUATION_BIVARIATE_POLYN equation */ +} ADMW1001_LUT_TABLE_DATA; + +/*! Look-Up Table structure */ +typedef struct __attribute__((packed, aligned(4))) { + ADMW1001_LUT_DESCRIPTOR descriptor; + /**< Look-Up Table descriptor */ + ADMW1001_LUT_TABLE_DATA data; + /**< Look-Up Table data */ +} ADMW1001_LUT_TABLE; + +/*! LUT data format versions */ +typedef struct __attribute__((packed, aligned(4))) { + uint8_t major; /*!< Major version number */ + uint8_t minor; /*!< Minor version number */ +} ADMW1001_LUT_VERSION; + +/*! LUT data header structure */ +typedef struct __attribute__((packed, aligned(4))) { + uint32_t signature; + /**< Hard-coded signature value (@ref ADMW1001_LUT_SIGNATURE) */ + ADMW1001_LUT_VERSION version; + /**< LUT data format version (@ref ADMW1001_LUT_VERSION) */ + uint16_t numTables; + /**< Total number of tables */ + uint32_t totalLength; + /**< Total length (in bytes) of all table descriptors and data + * (excluding this header) + * This, plus the header length, must not exceed ADMW1001_LUT_MAX_SIZE + */ +} ADMW1001_LUT_HEADER; + +/*! LUT data top-level structure */ +typedef struct __attribute__((packed, aligned(4))) { + ADMW1001_LUT_HEADER header; + /*!< LUT data top-level header structure */ + ADMW1001_LUT_TABLE tables[]; + /*!< Variable-length array of one-or-more look-up table structures */ +} ADMW1001_LUT; + +/*! Alternative top-level structure for raw LUT data representation + * + * @note This is intended to be used for encapsulating the storage of static + * LUT data declarations in C files. The rawTableData can be cast + * to the ADMW1001_LUT type for further parsing/processing. + */ +typedef struct __attribute__((packed, aligned(4))) { + ADMW1001_LUT_HEADER header; + /*!< LUT data top-level header structure */ + uint8_t rawTableData[]; + /*!< Variable-length byte array of look-up tables in raw binary format */ +} ADMW1001_LUT_RAW; + +#ifdef __cplusplus +} +#endif + +/*! + * @} + */ + +#endif /* __ADMW1001_LUT_DATA_H__ */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw1001/admw1001_sensor_types.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,1057 @@ +/* +Copyright 2017 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + ****************************************************************************** + * @file: + * @brief: Sensor type definitions for ADMW1001. + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW1001_SENSOR_TYPES_H__ +#define __ADMW1001_SENSOR_TYPES_H__ + +/*! @addtogroup ADMW1001_Api + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/*! ADMW1001 measurement channel identifiers */ +typedef enum { + ADMW1001_CHANNEL_ID_NONE = -1, + /*!< Used to indicate when no channel is selected (e.g. compensation channel) */ + + ADMW1001_CHANNEL_ID_CJC_0 = 0, + /*!< Cold-Juction Compensation channel #0 */ + ADMW1001_CHANNEL_ID_CJC_1, + /*!< Cold-Juction Compensation channel #1 */ + ADMW1001_CHANNEL_ID_SENSOR_0, + /*!< Analog Sensor channel #0 */ + ADMW1001_CHANNEL_ID_SENSOR_1, + /*!< Analog Sensor channel #1 */ + ADMW1001_CHANNEL_ID_SENSOR_2, + /*!< Analog Sensor channel #2 */ + ADMW1001_CHANNEL_ID_SENSOR_3, + /*!< Analog Sensor channel #3 */ + ADMW1001_CHANNEL_ID_VOLTAGE_0, + /*!< Analog 0-10V Voltage Sensor channel #0 */ + ADMW1001_CHANNEL_ID_CURRENT_0, + /*!< Analog 4-20mA Current Sensor channel #0 */ + ADMW1001_CHANNEL_ID_I2C_0, + /*!< Digital I2C Sensor channel #0 */ + ADMW1001_CHANNEL_ID_I2C_1, + /*!< Digital I2C Sensor channel #1 */ + ADMW1001_CHANNEL_ID_SPI_0, + /*!< Digital SPI Sensor channel #0 */ + ADMW1001_CHANNEL_ID_SPI_1, + /*!< Digital SPI Sensor channel #1 */ + ADMW1001_CHANNEL_ID_SPI_2, + /*!< Digital SPI Sensor channel #2 */ + ADMW1001_CHANNEL_ID_UART, + /*!< Digital UART Sensor channel #0 */ + + ADMW1001_MAX_CHANNELS, + /*!< Maximum number of measurement channels on ADMW1001 */ +} ADMW1001_CHANNEL_ID; + +/*! ADMW1001 analog sensor type options + * + * Select the sensor type that is connected to an ADC analog measurement + * channel. + * + * @note Some channels may only support a subset of the available sensor types + * below. + * + * @note The sensor type name may include a classification suffix: + * - _DEF_L1: pre-defined sensor using built-in linearisation data + * - _DEF_L2: pre-defined sensor using user-supplied linearisation data + * Where the suffix is absent, assume the _DEF_L1 classification above. + */ +typedef enum { + ADMW1001_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1 = 0, + /*!< Standard T-type Thermocouple temperature sensor with default + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1 = 1, + /*!< Standard J-type Thermocouple temperature sensor with default + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1 = 2, + /*!< Standard K-type Thermocouple temperature sensor with default + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_1_DEF_L2 = 8, + /*!< Standard thermocouple temperature sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_2_DEF_L2 = 9, + /*!< Standard thermocouple temperature sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_3_DEF_L2 = 10, + /*!< Standard thermocouple temperature sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_4_DEF_L2 = 11, + /*!< Standard thermocouple temperature sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_T_ADV_L1 = 16, + /*!< T-type thermocouple temperature sensor with default linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_J_ADV_L1 = 17, + /*!< T-type thermocouple temperature sensor with default linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_K_ADV_L1 = 18, + /*!< T-type thermocouple temperature sensor with default linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_1_ADV_L2 = 24, + /*!< Thermocouple temperature sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_2_ADV_L2 = 25, + /*!< Thermocouple temperature sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_3_ADV_L2 = 26, + /*!< Thermocouple temperature sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMOCOUPLE_4_ADV_L2 = 27, + /*!< Thermocouple temperature sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1 = 32, + /*!< Standard 2-wire PT100 RTD temperature sensor with default + * linearisation and default configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_PT1000_DEF_L1 = 33, + /*!< Standard 2-wire PT1000 RTD temperature sensor with default + * linearisation and default configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_1_DEF_L2 = 40, + /*!< 2-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_2_DEF_L2 = 41, + /*!< 2-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_3_DEF_L2 = 42, + /*!< 2-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_4_DEF_L2 = 43, + /*!< 2-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_ADV_L1 = 48, + /*!< Standard 2-wire PT100 RTD temperature sensor with default + * linearisation and advanced configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_PT1000_ADV_L1 = 49, + /*!< Standard 2-wire PT1000 RTD temperature sensor with default + * linearisation and advanced configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_1_ADV_L2 = 56, + /*!< 2-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_2_ADV_L2 = 57, + /*!< 2-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_3_ADV_L2 = 58, + /*!< 2-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_2WIRE_4_ADV_L2 = 59, + /*!< 2-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Cold-Juction Compensation and Analog Sensor channels + * only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_PT100_DEF_L1 = 64, + /*!< Standard 3-wire PT100 RTD temperature sensor with default + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_PT1000_DEF_L1 = 65, + /*!< Standard 3-wire PT1000 RTD temperature sensor with default + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_1_DEF_L2 = 72, + /*!< 3-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_2_DEF_L2 = 73, + /*!< 3-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_3_DEF_L2 = 74, + /*!< 3-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_4_DEF_L2 = 75, + /*!< 3-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_PT100_ADV_L1 = 80, + /*!< Standard 3-wire PT100 RTD temperature sensor with default + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_PT1000_ADV_L1 = 81, + /*!< Standard 3-wire PT1000 RTD temperature sensor with default + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_1_ADV_L2 = 88, + /*!< 3-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_2_ADV_L2 = 89, + /*!< 3-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_3_ADV_L2 = 90, + /*!< 3-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_3WIRE_4_ADV_L2 = 91, + /*!< 3-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_PT100_DEF_L1 = 96, + /*!< Standard 4-wire PT100 RTD temperature sensor with default + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_PT1000_DEF_L1 = 97, + /*!< Standard 4-wire PT1000 RTD temperature sensor with default + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_1_DEF_L2 = 104, + /*!< 4-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_2_DEF_L2 = 105, + /*!< 4-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_3_DEF_L2 = 106, + /*!< 4-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_4_DEF_L2 = 107, + /*!< 4-wire RTD temperature sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_PT100_ADV_L1 = 112, + /*!< Standard 4-wire PT100 RTD temperature sensor with default + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_PT1000_ADV_L1 = 113, + /*!< Standard 4-wire PT1000 RTD temperature sensor with default + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_1_ADV_L2 = 120, + /*!< 4-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_2_ADV_L2 = 121, + /*!< 4-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_3_ADV_L2 = 122, + /*!< 4-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_RTD_4WIRE_4_ADV_L2 = 123, + /*!< 4-wire RTD temperature sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_A_10K_DEF_L1 = 128, + /*!< Standard 10kOhm NTC Thermistor temperature sensor with Steinhart–Hart + * linearisation equation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_B_10K_DEF_L1 = 129, + /*!< Standard 10kOhm NTC Thermistor temperature sensor with Beta + * linearisation equation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_1_DEF_L2 = 136, + /*!< Thermistor sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_2_DEF_L2 = 137, + /*!< Thermistor sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_3_DEF_L2 = 138, + /*!< Thermistor sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_4_DEF_L2 = 139, + /*!< Thermistor sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_A_10K_ADV_L1 = 144, + /*!< 10kOhm NTC Thermistor temperature sensor with Steinhart–Hart + * linearisation equation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_B_10K_ADV_L1 = 145, + /*!< 10kOhm NTC Thermistor temperature sensor with Beta + * linearisation equation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_1_ADV_L2 = 152, + /*!< Thermistor sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_2_ADV_L2 = 153, + /*!< Thermistor sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_3_ADV_L2 = 154, + /*!< Thermistor sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_THERMISTOR_4_ADV_L2 = 155, + /*!< Thermistor sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_1_DEF_L2 = 168, + /*!< Standard 4-wire Bridge Transducer sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_2_DEF_L2 = 169, + /*!< Standard 4-wire Bridge Transducer sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_3_DEF_L2 = 170, + /*!< Standard 4-wire Bridge Transducer sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_4_DEF_L2 = 171, + /*!< Standard 4-wire Bridge Transducer sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_1_ADV_L2 = 184, + /*!< Standard 4-wire Bridge Transducer sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_2_ADV_L2 = 185, + /*!< Standard 4-wire Bridge Transducer sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_3_ADV_L2 = 186, + /*!< Standard 4-wire Bridge Transducer sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_4_ADV_L2 = 187, + /*!< Standard 4-wire Bridge Transducer sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_1_DEF_L2 = 200, + /*!< Standard 6-wire Bridge Transducer sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_2_DEF_L2 = 201, + /*!< Standard 6-wire Bridge Transducer sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_3_DEF_L2 = 202, + /*!< Standard 6-wire Bridge Transducer sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_4_DEF_L2 = 203, + /*!< Standard 6-wire Bridge Transducer sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_1_ADV_L2 = 216, + /*!< Standard 6-wire Bridge Transducer sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_2_ADV_L2 = 217, + /*!< Standard 6-wire Bridge Transducer sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_3_ADV_L2 = 218, + /*!< Standard 6-wire Bridge Transducer sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_4_ADV_L2 = 219, + /*!< Standard 6-wire Bridge Transducer sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + * @note Bridge Excition Voltage must be selected as reference + */ + ADMW1001_ADC_SENSOR_DIODE_2C_TYPEA_DEF_L1 = 224, + /*!< Standard Diode two current temperature sensor with default + * linearisation equation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_DIODE_3C_TYPEA_DEF_L1 = 225, + /*!< Standard Diode three current temperature sensor with default + * linearisation equation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_DIODE_2C_1_DEF_L2 = 232, + /*!< Standard Diode two current sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_DIODE_3C_1_DEF_L2 = 233, + /*!< Standard Diode three current sensor with user-defined linearisation and + * default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_DIODE_2C_TYPEA_ADV_L1 = 240, + /*!< Standard Diode two current temperature sensor with default + * linearisation equation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_DIODE_3C_TYPEA_ADV_L1 = 241, + /*!< Standard Diode three current sensor with default linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_DIODE_2C_1_ADV_L2 = 248, + /*!< Standard Diode two current sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_DIODE_3C_1_ADV_L2 = 249, + /*!< Standard Diode three current sensor with user-defined linearisation and + * advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_MICROPHONE_A_DEF_L1 = 256, + /*!< Generic microphone sensor without external amplifier, and with + * default linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_MICROPHONE_B_DEF_L1 = 257, + /*!< Generic microphone sensor with external amplifier and bias, and with + * default linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_MICROPHONE_1_DEF_L2 = 264, + /*!< Generic microphone sensor without external amplifier, and with + * user-defined linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_MICROPHONE_2_DEF_L2 = 265, + /*!< Generic microphone sensor with external amplifier and bias, and with + * user-defined linearisation and default configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_MICROPHONE_A_ADV_L1 = 272, + /*!< Generic microphone sensor without external amplifier, and with + * default linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_MICROPHONE_B_ADV_L1 = 273, + /*!< Generic microphone sensor with external amplifier and bias, and with + * default linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_MICROPHONE_1_ADV_L2 = 278, + /*!< Generic microphone sensor without external amplifier, and with + * user-defined linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_MICROPHONE_2_ADV_L2 = 279, + /*!< Generic microphone sensor with external amplifier and bias, and with + * user-defined linearisation and advanced configuration options + * + * @note For use with Analog Sensor channels only + */ + ADMW1001_ADC_SENSOR_VOLTAGE = 512, + /*!< Generic voltage sensor with no linearisation applied + * + * @note For use with Analog 0-10V Voltage Sensor channels only + */ + ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1 = 544, + /*!< Honeywell Pressure voltage sensor (HSCMRNN1.6BAAA3) with default + * linearisation and default configuration options + * + * @note For use with Analog 0-10V Voltage Sensor channels only + */ + ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_B_DEF_L1 = 545, + /*!< Amphenol Pressure voltage sensor (NPA-300B-015A) with default + * linearisation and default configuration options + * + * @note For use with Analog 0-10V Voltage Sensor channels only + */ + ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_1_DEF_L2 = 552, + /*!< Generic pressure voltage sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog 0-10V Voltage Sensor channels only + */ + ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_2_DEF_L2 = 553, + /*!< Generic pressure voltage sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog 0-10V Voltage Sensor channels only + */ + ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_A_ADV_L1 = 560, + /*!< Honeywell Pressure voltage sensor (HSCMRNN1.6BAAA3) with default + * linearisation and advanced configuration options + * + * @note For use with Analog 0-10V Voltage Sensor channels only + */ + ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_B_ADV_L1 = 561, + /*!< Amphenol Pressure voltage sensor (NPA-300B-015A) with default + * linearisation and advanced configuration options + * + * @note For use with Analog 0-10V Voltage Sensor channels only + */ + ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_1_ADV_L2 = 568, + /*!< Generic pressure voltage sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog 0-10V Voltage Sensor channels only + */ + ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_2_ADV_L2 = 569, + /*!< Generic pressure voltage sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog 0-10V Voltage Sensor channels only + */ + ADMW1001_ADC_SENSOR_CURRENT = 768, + /*!< Generic current sensor with no linearisation applied + * + * @note For use with Analog 4-20mA Current Sensor channels only + */ + ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1 = 800, + /*!< Honeywell Pressure current sensor (PX2CN2XX100PACH) with default + * linearisation and default configuration options + * + * @note For use with Analog 4-20mA Current Sensor channels only + */ + ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_1_DEF_L2 = 808, + /*!< Generic pressure current sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog 4-20mA Current Sensor channels only + */ + ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_2_DEF_L2 = 809, + /*!< Generic pressure current sensor with user-defined + * linearisation and default configuration options + * + * @note For use with Analog 4-20mA Current Sensor channels only + */ + ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_A_ADV_L1 = 816, + /*!< Honeywell Pressure current sensor (PX2CN2XX100PACH) with default + * linearisation and advanced configuration options + * + * @note For use with Analog 4-20mA Current Sensor channels only + */ + ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_1_ADV_L2 = 824, + /*!< Generic pressure current sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog 4-20mA Current Sensor channels only + */ + ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_2_ADV_L2 = 825, + /*!< Generic pressure current sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with Analog 4-20mA Current Sensor channels only + */ +} ADMW1001_ADC_SENSOR_TYPE; + +/*! ADMW1001 I2C digital sensor type options + * + * Select the sensor type that is connected to an I2C digital measurement + * channel. + * + * @note These are pre-defined sensors using built-in linearisation data + */ +typedef enum { + ADMW1001_I2C_SENSOR_HUMIDITY_A_DEF_L1 = 2112, + /*!< Honeywell HiH9000-series humidity sensor with default linearisation + * and default configuration options + * + * @note For use with I2C Digital Sensor channels only + */ + ADMW1001_I2C_SENSOR_HUMIDITY_B_DEF_L1 = 2113, + /*!< Sensirion SHT35-DIS-B humidity sensor with default linearisation + * and default configuration options + * + * @note For use with I2C Digital Sensor channels only + */ + ADMW1001_I2C_SENSOR_HUMIDITY_A_DEF_L2 = 2120, + /*!< Honeywell HiH9000-series humidity sensor with user-defined linearisation + * and default configuration options + * + * @note For use with I2C Digital Sensor channels only + */ + ADMW1001_I2C_SENSOR_HUMIDITY_B_DEF_L2 = 2121, + /*!< Sensirion SHT35-DIS-B humidity sensor with user-defined linearisation + * and default configuration options + * + * @note For use with I2C Digital Sensor channels only + */ + ADMW1001_I2C_SENSOR_HUMIDITY_A_ADV_L1 = 2128, + /*!< Honeywell HiH9000-series humidity sensor with default linearisation + * and advanced configuration options + * + * @note For use with I2C Digital Sensor channels only + */ + ADMW1001_I2C_SENSOR_HUMIDITY_B_ADV_L1 = 2129, + /*!< Sensirion SHT35-DIS-B humidity sensor with default linearisation + * and advanced configuration options + * + * @note For use with I2C Digital Sensor channels only + */ + ADMW1001_I2C_SENSOR_HUMIDITY_A_ADV_L2 = 2136, + /*!< Honeywell HiH9000-series humidity sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with I2C Digital Sensor channels only + */ + ADMW1001_I2C_SENSOR_HUMIDITY_B_ADV_L2 = 2137, + /*!< Sensirion SHT35-DIS-B humidity sensor with user-defined linearisation + * and advanced configuration options + * + * @note For use with I2C Digital Sensor channels only + */ + ADMW1001_I2C_SENSOR_AMBIENTLIGHT_A_DEF_L1 = 2176, + /*!< ON-Semiconductor NOA1305 ambient light sensor with default + * linearisation and default configuration options + * + * @note For use with I2C Digital Sensor channels only + */ + ADMW1001_I2C_SENSOR_AMBIENTLIGHT_A_DEF_L2 = 2184, + /*!< ON-Semiconductor NOA1305 ambient light sensor with user-defined + * linearisation and default configuration options + * + * @note For use with I2C Digital Sensor channels only + */ + ADMW1001_I2C_SENSOR_AMBIENTLIGHT_A_ADV_L1 = 2192, + /*!< ON-Semiconductor NOA1305 ambient light sensor with default + * linearisation and advanced configuration options + * + * @note For use with I2C Digital Sensor channels only + */ + ADMW1001_I2C_SENSOR_AMBIENTLIGHT_A_ADV_L2 = 2200, + /*!< ON-Semiconductor NOA1305 ambient light sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with I2C Digital Sensor channels only + */ +} ADMW1001_I2C_SENSOR_TYPE; + +/*! ADMW1001 SPI digital sensor type options + * + * Select the sensor type that is connected to an SPI digital measurement + * channel. + * + * @note These are pre-defined sensors using built-in linearisation data + */ +typedef enum { + ADMW1001_SPI_SENSOR_PRESSURE_A_DEF_L1 = 3072, + /*!< Honeywell HSCDRNN1.6BASA3 pressure sensor with default linearisation + * and default configuration options + * + * @note For use with SPI Digital Sensor channels only + */ + ADMW1001_SPI_SENSOR_PRESSURE_A_DEF_L2 = 3080, + /*!< Honeywell HSCDRNN1.6BASA3 pressure sensor with user-defined + * linearisation and default configuration options + * + * @note For use with SPI Digital Sensor channels only + */ + ADMW1001_SPI_SENSOR_PRESSURE_A_ADV_L1 = 3088, + /*!< Honeywell HSCDRNN1.6BASA3 pressure sensor with default linearisation + * and advanced configuration options + * + * @note For use with SPI Digital Sensor channels only + */ + ADMW1001_SPI_SENSOR_PRESSURE_A_ADV_L2 = 3096, + /*!< Honeywell HSCDRNN1.6BASA3 pressure sensor with user-defined + * linearisation and advanced configuration options + * + * @note For use with SPI Digital Sensor channels only + */ + ADMW1001_SPI_SENSOR_ACCELEROMETER_A_DEF_L1 = 3200, + /*!< Analog Devices ADxL362 3-axis accelerometer sensor with default + * linearisation and default configuration options(*) + * + * @note For use with SPI Digital Sensor channels only + * + * @note This sensor requires the use of 3 SPI Digital Sensor channels, with + * the sensor measurements from the X/Y/Z axes each output on a + * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) + */ + ADMW1001_SPI_SENSOR_ACCELEROMETER_B_DEF_L1 = 3201, + /*!< Analog Devices ADxL355 3-axis accelerometer sensor with default + * linearisation and default configuration options(*) + * + * @note For use with SPI Digital Sensor channels only + * + * @note This sensor requires the use of 3 SPI Digital Sensor channels, with + * the sensor measurements from the X/Y/Z axes each output on a + * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) + */ + ADMW1001_SPI_SENSOR_ACCELEROMETER_A_DEF_L2 = 3208, + /*!< Analog Devices ADxL362 3-axis accelerometer sensor with user-defined + * linearisation and default configuration options(*) + * + * @note For use with SPI Digital Sensor channels only + * + * @note This sensor requires the use of 3 SPI Digital Sensor channels, with + * the sensor measurements from the X/Y/Z axes each output on a + * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) + */ + ADMW1001_SPI_SENSOR_ACCELEROMETER_B_DEF_L2 = 3209, + /*!< Analog Devices ADxL355 3-axis accelerometer sensor with user-defined + * linearisation and default configuration options(*) + * + * @note For use with SPI Digital Sensor channels only + * + * @note This sensor requires the use of 3 SPI Digital Sensor channels, with + * the sensor measurements from the X/Y/Z axes each output on a + * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) + */ + ADMW1001_SPI_SENSOR_ACCELEROMETER_A_ADV_L1 = 3216, + /*!< Analog Devices ADxL362 3-axis accelerometer sensor with default + * linearisation and advanced configuration options(*) + * + * @note For use with SPI Digital Sensor channels only + * + * @note This sensor requires the use of 3 SPI Digital Sensor channels, with + * the sensor measurements from the X/Y/Z axes each output on a + * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) + */ + ADMW1001_SPI_SENSOR_ACCELEROMETER_B_ADV_L1 = 3217, + /*!< Analog Devices ADxL355 3-axis accelerometer sensor with default + * linearisation and advanced configuration options(*) + * + * @note For use with SPI Digital Sensor channels only + * + * @note This sensor requires the use of 3 SPI Digital Sensor channels, with + * the sensor measurements from the X/Y/Z axes each output on a + * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) + */ + ADMW1001_SPI_SENSOR_ACCELEROMETER_A_ADV_L2 = 3224, + /*!< Analog Devices ADxL362 3-axis accelerometer sensor with user-defined + * linearisation and advanced configuration options(*) + * + * @note For use with SPI Digital Sensor channels only + * + * @note This sensor requires the use of 3 SPI Digital Sensor channels, with + * the sensor measurements from the X/Y/Z axes each output on a + * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) + */ + ADMW1001_SPI_SENSOR_ACCELEROMETER_B_ADV_L2 = 3225, + /*!< Analog Devices ADxL355 3-axis accelerometer sensor with user-defined + * linearisation and advanced configuration options(*) + * + * @note For use with SPI Digital Sensor channels only + * + * @note This sensor requires the use of 3 SPI Digital Sensor channels, with + * the sensor measurements from the X/Y/Z axes each output on a + * seperate dedicated channel (SPI#0/SPI#1/SPI#2, respectively) + */ +} ADMW1001_SPI_SENSOR_TYPE; + +/*! ADMW1001 UART digital sensor type options + * + * Select the sensor type that is connected to an UART digital measurement + * channel. + * + * @note These are pre-defined sensors using built-in linearisation data + */ +typedef enum { + ADMW1001_UART_SENSOR_UART_CO2_A_DEF_L1 = 3584, + /*!< COZIR AMB 2,000 ppm CO2 Sensor with default linearisation + * and default configuration options + * + * @note For use with UART Digital Sensor channels only + */ + ADMW1001_UART_SENSOR_UART_CO2_B_DEF_L1 = 3585, + /*!< COZIR LP Miniature 5,000ppm CO2 Sensor with default linearisation + * and default configuration options + * + * @note For use with UART Digital Sensor channels only + */ + ADMW1001_UART_SENSOR_UART_CO2_A_DEF_L2 = 3592, + /*!< COZIR AMB 2,000 ppm CO2 Sensor with user-defined linearisation + * and default configuration options + * + * @note For use with UART Digital Sensor channels only + */ + ADMW1001_UART_SENSOR_UART_CO2_B_DEF_L2 = 3593, + /*!< COZIR LP Miniature 5,000ppm CO2 Sensor with user-defined linearisation + * and default configuration options + * + * @note For use with UART Digital Sensor channels only + */ + ADMW1001_UART_SENSOR_UART_CO2_A_ADV_L1 = 3600, + /*!< COZIR AMB 2,000 ppm CO2 Sensor with default linearisation + * and advanced configuration options + * + * @note For use with UART Digital Sensor channels only + */ + ADMW1001_UART_SENSOR_UART_CO2_B_ADV_L1 = 3601, + /*!< COZIR LP Miniature 5,000ppm CO2 Sensor with default linearisation + * and advanced configuration options + * + * @note For use with UART Digital Sensor channels only + */ + ADMW1001_UART_SENSOR_UART_CO2_A_ADV_L2 = 3608, + /*!< COZIR AMB 2,000 ppm CO2 Sensor with user-defined linearisation + * and advanced configuration options + * + * @note For use with UART Digital Sensor channels only + */ + ADMW1001_UART_SENSOR_UART_CO2_B_ADV_L2 = 3609, + /*!< COZIR LP Miniature 5,000ppm CO2 Sensor with user-defined linearisation + * and advanced configuration options + * + * @note For use with UART Digital Sensor channels only + */ +} ADMW1001_UART_SENSOR_TYPE; + +#ifdef __cplusplus +} +#endif + +/*! + * @} + */ + +#endif /* __ADMW1001_SENSOR_TYPES_H__ */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw_api.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,701 @@ +/* +Copyright 2017 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + ****************************************************************************** + * @file: admw_api.h + * @brief: ADMW Host Library Application Programming Interface (API) + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW_API_H__ +#define __ADMW_API_H__ + +#include "inc/admw_types.h" +#include "inc/admw_config_types.h" +#include "inc/admw_platform.h" +#include "inc/admw_gpio.h" +#include "inc/admw_spi.h" +#include "inc/admw_log.h" +#include "inc/admw_time.h" + +/*! @defgroup ADMW_Api ADMW Host Library API + * Host library API common to the ADMW product family. + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/*! The maximum number of channels supported by this API + * @note Specific ADMW products may implement a lower number of channels */ +#define ADMW_MAX_CHANNELS 16 + +/*! A handle used in all API functions to identify the ADMW device. */ +typedef void* ADMW_DEVICE_HANDLE; + +/*! Supported connection types for communication with the ADMW device. */ +typedef enum { + ADMW_CONNECTION_TYPE_SPI = 1, + /*!< Serial Peripheral Interface (SPI) connection type */ +} ADMW_CONNECTION_TYPE; + +/*! Connection details for communication with a ADMW device instance. */ +typedef struct { + ADMW_CONNECTION_TYPE type; + /*!< Connection type selection */ + ADMW_PLATFORM_SPI_CONFIG spi; + /*!< SPI connection parameters, required if SPI connection type is used */ + ADMW_PLATFORM_GPIO_CONFIG gpio; + /*!< GPIO connection parameters, for device reset and status I/O signals */ + ADMW_PLATFORM_LOG_CONFIG log; + /*!< Log interface connection parameters, for display/routing of log messages */ +} ADMW_CONNECTION; + +/*! Bit masks (flags) for the different device status indicators. */ +typedef enum { + ADMW_DEVICE_STATUS_BUSY = (1 << 0), + /*!< Indicates that a command is currently running on the device */ + ADMW_DEVICE_STATUS_DATAREADY = (1 << 1), + /*!< Indicates the availability of measurement data for retrieval */ + ADMW_DEVICE_STATUS_ERROR = (1 << 2), + /*!< Indicates that an error condition has been detected by the device */ + ADMW_DEVICE_STATUS_ALERT = (1 << 3), + /*!< Indicates that an alert condition has been detected by the device */ + ADMW_DEVICE_STATUS_FIFO_ERROR = (1 << 4), + /*!< Indicates that a FIFO error condition has been detected by the device */ + ADMW_DEVICE_STATUS_CONFIG_ERROR = (1 << 5), + /*!< Indicates that a configuration error condition has been detected by the device */ + ADMW_DEVICE_STATUS_LUT_ERROR = (1 << 6), + /*!< Indicates that a look-up table error condition has been detected by the device */ + ADMW_DEVICE_STATUS_EXT_FLASH_ERROR = (1 << 7), + /*!< Indicates that an external flash memory error condition has been detected by the device */ +} ADMW_DEVICE_STATUS_FLAGS; + +/*! Bit masks (flags) for the different diagnostics status indicators. */ +typedef enum { + ADMW_DIAGNOSTICS_STATUS_CHECKSUM_ERROR = (1 << 0), + /*!< Indicates Error on Internal Checksum Calculations */ + ADMW_DIAGNOSTICS_STATUS_COMMS_ERROR = (1 << 1), + /*!< Indicates Error on Internal Device Communications */ + ADMW_DIAGNOSTICS_STATUS_SUPPLY_MONITOR_ERROR = (1 << 2), + /*!< Indicates Low Voltage on Internal Supply Voltages */ + ADMW_DIAGNOSTICS_STATUS_SUPPLY_CAP_ERROR = (1 << 3), + /*!< Indicates Fault on Internal Supply Regulator Capacitor */ + ADMW_DIAGNOSTICS_STATUS_CONVERSION_ERROR = (1 << 8), + /*!< Indicates Error During Internal ADC Conversions */ + ADMW_DIAGNOSTICS_STATUS_CALIBRATION_ERROR = (1 << 9), + /*!< Indicates Error During Internal Device Calibrations */ +} ADMW_DIAGNOSTICS_STATUS_FLAGS; + +/*! Bit masks (flags) for the different channel alert indicators. */ +typedef enum { + ADMW_CHANNEL_ALERT_TIMEOUT = (1 << 0), + /*!< Indicates timeout condition detected on the channel */ + ADMW_CHANNEL_ALERT_UNDER_RANGE = (1 << 1), + /*!< Indicates raw sample under valid input range, possibly clamped */ + ADMW_CHANNEL_ALERT_OVER_RANGE = (1 << 2), + /*!< Indicates raw sample over valid input range, possibly clamped */ + ADMW_CHANNEL_ALERT_LOW_LIMIT = (1 << 3), + /*!< Indicates measurement result was below configured minimum threshold */ + ADMW_CHANNEL_ALERT_HIGH_LIMIT = (1 << 4), + /*!< Indicates measurement result was above configured maximum threshold */ + ADMW_CHANNEL_ALERT_SENSOR_OPEN = (1 << 5), + /*!< Indicates open circuit or mis-wire condition detected on the channel */ + ADMW_CHANNEL_ALERT_REF_DETECT = (1 << 6), + /*!< Indicates reference-detect error condition detected on the channel */ + ADMW_CHANNEL_ALERT_CONFIG_ERR = (1 << 7), + /*!< Indicates configuration error condition detected on the channel */ + ADMW_CHANNEL_ALERT_LUT_ERR = (1 << 8), + /*!< Indicates look-up table error condition detected on the channel */ + ADMW_CHANNEL_ALERT_SENSOR_NOT_READY = (1 << 9), + /*!< Indicates digital sensor not-ready error condition detected on the channel */ + ADMW_CHANNEL_ALERT_COMP_NOT_READY = (1 << 10), + /*!< Indicates compensation channel not-ready error condition detected on the channel */ + ADMW_CHANNEL_ALERT_LUT_UNDER_RANGE = (1 << 13), + /*!< Indicates raw sample was under the available LUT/equation range */ + ADMW_CHANNEL_ALERT_LUT_OVER_RANGE = (1 << 14), + /*!< Indicates raw sample was over the available LUT/equation range */ +} ADMW_CHANNEL_ALERT_FLAGS; + +/*! Status details retreived from the ADMW device. */ +typedef struct { + ADMW_DEVICE_STATUS_FLAGS deviceStatus; + /*!< General summary status information from the device */ + ADMW_DIAGNOSTICS_STATUS_FLAGS diagnosticsStatus; + /*!< Diagnostic error status information from the device */ + ADMW_CHANNEL_ALERT_FLAGS channelAlerts[ADMW_MAX_CHANNELS]; + /*!< Per-channel alert status information from the device */ + uint32_t errorCode; + /*!< Code identifying the last error signalled by the device */ + uint32_t alertCode; + /*!< Code identifying the last alert signalled by the device */ + uint32_t debugCode; + /*!< Supplementary code related to the last error/alert */ + uint32_t channelAlertCodes[ADMW_MAX_CHANNELS]; + /*!< Per-channel code identifying the last alert signalled for each channel */ +} ADMW_STATUS; + +/*! Data sample details retreived from the ADMW device. */ +typedef struct { + ADMW_DEVICE_STATUS_FLAGS status; + /*!< Device summary status snapshot when the sample was recorded */ + uint32_t channelId; + /*!< The measurement channel from which this sample was obtained */ + int32_t rawValue; + /*!< The raw (unprocessed) value obtained directly from the measurement + * channel, if available + */ + float32_t processedValue; + /*!< The processed value obtained from the measurement channel, as a final + * measurement value, following calibration and linearisation correction, + * and conversion into an appropriate unit of measurement. + */ +} ADMW_DATA_SAMPLE; + +/*! Measurement mode options for the ADMW device. + * @ref admw_StartMeasurement + */ +typedef enum { + ADMW_MEASUREMENT_MODE_HEALTHCHECK = 1, + /*!< In this mode, a special health-check measurement cycle is executed, + * carrying out a single conversion per channel with measurement + * diagnostics enabled, intended for use as a system health check. */ + ADMW_MEASUREMENT_MODE_NORMAL, + /*!< In this mode, normal measurement cycle(s) are executed and data samples + * are returned with raw measurement values included. */ + ADMW_MEASUREMENT_MODE_OMIT_RAW, + /*!< In this mode, normal measurement cycle(s) are executed and data samples + * are returned with raw measurement values omitted for efficiency. */ + ADMW_MEASUREMENT_MODE_FFT, + /*!< In this mode, FFT mode measurement cycle(s) are executed and data + * samples are returned based on FFT-specific configuration parameters. */ +} ADMW_MEASUREMENT_MODE; + +/*! Identifiers for the user configuration slots in persistent memory. */ +typedef enum { + ADMW_FLASH_CONFIG_1, + ADMW_FLASH_CONFIG_2, + ADMW_FLASH_CONFIG_3, + ADMW_FLASH_CONFIG_4, +} ADMW_USER_CONFIG_SLOT; + + +/****************************************************************************** + * ADMW High-Level API function prototypes + *****************************************************************************/ + +/*! + * @brief Open ADMW device handle and set up communication interface. + * + * @param[in] nDeviceIndex Zero-based index number identifying this device + * instance. Note that this will be used to + * retrieve a specific device configuration for + * this device (see @ref admw_SetConfig + * and @ref ADMW_CONFIG) + * @param[in] pConnectionInfo Host-specific connection details (e.g. SPI, GPIO) + * @param[out] phDevice Pointer to return an ADMW device handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * - #ADMW_NO_MEM Failed to allocate memory resources. + * - #ADMW_INVALID_DEVICE_NUM Invalid device index specified + * + * @details Configure and initialise the Log interface and the SPI/GPIO + * communication interface to the ADMW module. + */ +ADMW_RESULT admw_Open( + unsigned const nDeviceIndex, + ADMW_CONNECTION * const pConnectionInfo, + ADMW_DEVICE_HANDLE * const phDevice); + +/*! + * @brief Close ADMW device context and free resources. + * + * @param[in] hDevice ADMW device context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + */ +ADMW_RESULT admw_Close( + ADMW_DEVICE_HANDLE const hDevice); + +/*! + * @brief Get the current state of the specified GPIO input signal. + * + * @param[in] hDevice ADMW device context handle + * @param[in] ePinId GPIO pin to query + * @param[out] pbAsserted Pointer to return the state of the status signal GPIO pin + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * - #ADMW_INVALID_DEVICE_NUM Invalid GPIO pin specified. + * + * @details Sets *pbAsserted to true if the status signal is asserted, or false + * otherwise. + */ +ADMW_RESULT admw_GetGpioState( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_GPIO_PIN const ePinId, + bool * const pbAsserted); + +/*! + * @brief Register an application-defined callback function for GPIO interrupts + * + * @param[in] hDevice ADMW context handle (@ref admw_Open) + * @param[in] ePinId GPIO pin on which to enable/disable interrupts + * @param[in] callbackFunction Function to be called when an interrupt occurs. + * Specify NULL here to disable interrupts. + * @param[in] pCallbackParam Optional opaque parameter passed to the callback + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * - #ADMW_INVALID_DEVICE_NUM Invalid GPIO pin specified. + */ +ADMW_RESULT admw_RegisterGpioCallback( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_GPIO_PIN const ePinId, + ADMW_GPIO_CALLBACK const callbackFunction, + void * const pCallbackParam); + +/*! + * @brief Trigger a shut down of the device. + * + * @param[in] hDevice ADMW device context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Instructs the ADMW device to initiate a shut down, + * typically used to conserve power when the device is not + * in use. The device may be restarted by calling + * @ref admw_Reset(). Note that active configuration + * settings are not preserved during shutdown and must be + * reloaded after the device has become ready again. + * + * @note No other command must be running when this is called. + */ +ADMW_RESULT admw_Shutdown( + ADMW_DEVICE_HANDLE const hDevice); + +/*! + * @brief Reset the ADMW device. + * + * @param[in] hDevice ADMW device context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Trigger a hardware-reset of the ADMW device. + * + * @note The device may require several seconds before it is ready for use + * again. @ref admw_GetDeviceReadyState may be used to check if + * the device is ready. + */ +ADMW_RESULT admw_Reset( + ADMW_DEVICE_HANDLE const hDevice); + +/*! + * @brief Check if the device is ready, following power-up or a reset. + * + * @param[in] hDevice ADMW device context handle + * @param[out] pbReady Pointer to return true if the device is ready, or false + * otherwise + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details This function attempts to read a fixed-value device register via + * the communication interface. + */ +ADMW_RESULT admw_GetDeviceReadyState( + ADMW_DEVICE_HANDLE const hDevice, + bool * const pbReady); + +/*! + * @brief Obtain the product ID from the device. + * + * @param[in] hDevice ADMW device context handle + * @param[out] pProductId Pointer to return the product ID value + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Reads the product ID registers on the device and returns the value. + */ +ADMW_RESULT admw_GetProductID( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_PRODUCT_ID * const pProductId); + +/*! + * @brief Write full configuration settings to the device registers. + * + * @param[in] hDevice ADMW device context handle + * @param[out] pConfig Pointer to the configuration data structure + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Translates configuration details provided into device-specific + * register settings and updates device configuration registers. + * + * @note Settings are not applied until admw_ApplyConfigUpdates() is called + */ +ADMW_RESULT admw_SetConfig( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_CONFIG * const pConfig); + +/*! + * @brief Apply the configuration settings currently stored in device registers + * + * @param[in] hDevice ADMW device context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Instructs the ADMW device to reload and apply configuration + * from the device configuration registers. Changes to configuration + * registers are ignored by the device until this function is called. + * + * @note No other command must be running when this is called. + */ +ADMW_RESULT admw_ApplyConfigUpdates( + ADMW_DEVICE_HANDLE const hDevice); + +/*! + * @brief Store the configuration settings to persistent memory on the device. + * + * @param[in] hDevice ADMW device context handle + * @param[in] eSlotId User configuration slot in persistent memory + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Instructs the ADMW device to save the current contents of its + * device configuration registers to non-volatile memory. + * + * @note No other command must be running when this is called. + * @note Do not power down the device while this command is running. + */ +ADMW_RESULT admw_SaveConfig( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_USER_CONFIG_SLOT const eSlotId); + +/*! + * @brief Restore configuration settings from persistent memory on the device. + * + * @param[in] hDevice ADMW device context handle + * @param[in] eSlotId User configuration slot in persistent memory + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Instructs the ADMW device to restore the contents of its + * device configuration registers from non-volatile memory. + * + * @note No other command must be running when this is called. + */ +ADMW_RESULT admw_RestoreConfig( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_USER_CONFIG_SLOT const eSlotId); + +/*! + * @brief Erases the external flash memory. + * + * @param[in] hDevice ADMW device context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Sends the bulk erase instruction to the external flash + * device. All stored samples are deleted. + * It is a blocking operation and takes tens of seconds to + * complete. + * + * @note No other command must be running when this is called. + */ +ADMW_RESULT admw_EraseExternalFlash( + ADMW_DEVICE_HANDLE const hDevice); + +/*! + * @brief Gets the number of samples stored in the external flash + * memory. + * + * @param[in] hDevice ADMW device context handle + * @param[in] pSampleCount Address of the return value. + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @note No other command must be running when this is called. + */ +ADMW_RESULT admw_GetExternalFlashSampleCount( + ADMW_DEVICE_HANDLE const hDevice, + uint32_t * nSampleCount); + +// DEBUG - TO BE DELETED +ADMW_RESULT admw_SetExternalFlashIndex( + ADMW_DEVICE_HANDLE const hDevice, + uint32_t nStartIndex); + +/*! + * @brief Read measurement samples stored in the the external flash memory. + * + * @param[in] hDevice ADMW device context handle + * @param[out] pSamples Pointer to return a set of requested data + * samples. + * @param[in] nStartIndex Index of first sample to retrieve. + * @param[in] nBytesPerSample The size, in bytes, of each sample. + * @param[in] nRequested Number of requested data samples. + * @param[out] pnReturned Number of valid data samples successfully + * retrieved. + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Reads the status registers and extracts the relevant information + * to return to the caller. + * + */ +ADMW_RESULT admw_GetExternalFlashData( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_DATA_SAMPLE * const pSamples, + uint32_t const nIndex, + uint32_t const nRequested, + uint32_t * const pnReturned); + +/*! + * @brief Store the LUT data to persistent memory on the device. + * + * @param[in] hDevice ADMW device context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Instructs the ADMW device to save the current contents of its + * LUT data buffer, set using @ref admw_SetLutData, to + * non-volatile memory. + * + * @note No other command must be running when this is called. + * @note Do not power down the device while this command is running. + */ +ADMW_RESULT admw_SaveLutData( + ADMW_DEVICE_HANDLE const hDevice); + +/*! + * @brief Restore LUT data from persistent memory on the device. + * + * @param[in] hDevice ADMW device context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Instructs the ADMW device to restore the contents of its + * LUT data, previously stored with @ref admw_SaveLutData, from + * non-volatile memory. + * + * @note No other command must be running when this is called. + */ +ADMW_RESULT admw_RestoreLutData( + ADMW_DEVICE_HANDLE const hDevice); + +/*! + * @brief Start the measurement cycles on the device. + * + * @param[in] hDevice ADMW device context handle + * @param[in] eMeasurementMode Allows a choice of special modes for the + * measurement. See @ref ADMW_MEASUREMENT_MODE + * for further information. + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Instructs the ADMW device to start executing measurement cycles + * according to the current applied configuration settings. The + * DATAREADY status signal will be asserted whenever new measurement + * data is published, according to selected settings. + * Measurement cycles may be stopped by calling @ref + * admw_StopMeasurement. + * + * @note No other command must be running when this is called. + */ +ADMW_RESULT admw_StartMeasurement( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_MEASUREMENT_MODE const eMeasurementMode); + +/*! + * @brief Stop the measurement cycles on the device. + * + * @param[in] hDevice ADMW device context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Instructs the ADMW device to stop executing measurement cycles. + * The command may be delayed until the current conversion, if any, has + * been completed and published. + * + * @note To be used only if a measurement command is currently running. + */ +ADMW_RESULT admw_StopMeasurement( + ADMW_DEVICE_HANDLE const hDevice); + +/*! + * @brief Run built-in diagnostic checks on the device. + * + * @param[in] hDevice ADMW device context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Instructs the ADMW device to execute its built-in diagnostic + * tests, on any enabled measurement channels, according to the current + * applied configuration settings. Device status registers will be + * updated to indicate if any errors were detected by the diagnostics. + * + * @note No other command must be running when this is called. + */ +ADMW_RESULT admw_RunDiagnostics( + ADMW_DEVICE_HANDLE const hDevice); + +/*! + * @brief Run built-in calibration on the device. + * + * @param[in] hDevice ADMW device context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Instructs the ADMW device to execute its self-calibration + * routines, on any enabled measurement channels, according to the + * current applied configuration settings. Device status registers + * will be updated to indicate if any errors were detected. + * + * @note No other command must be running when this is called. + */ +ADMW_RESULT admw_RunCalibration( + ADMW_DEVICE_HANDLE const hDevice); + +/*! + * @brief Run built-in digital calibration on the device. + * + * @param[in] hDevice ADMW device context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Instructs the ADMW device to execute its calibration + * routines, on any enabled digital channels, according to the + * current applied configuration settings. Device status registers + * will be updated to indicate if any errors were detected. + * + * @note No other command must be running when this is called. + */ +ADMW_RESULT admw_RunDigitalCalibration( + ADMW_DEVICE_HANDLE const hDevice); + +/*! + * @brief Read the current status from the device registers. + * + * @param[in] hDevice ADMW device context handle + * @param[out] pStatus Pointer to return the status summary obtained from the + * device. + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Reads the status registers and extracts the relevant information + * to return to the caller. + * + * @note This may be called at any time, assuming the device is ready. + */ +ADMW_RESULT admw_GetStatus( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_STATUS * const pStatus); + +/*! + * @brief Read measurement data samples from the device registers. + * + * @param[in] hDevice ADMW device context handle + * @param[in] eMeasurementMode Must be set to the same value used for @ref + * admw_StartMeasurement(). + * @param[out] pSamples Pointer to return a set of requested data samples. + * @param[in] nBytesPerSample The size, in bytes, of each sample. + * @param[in] nRequested Number of requested data samples. + * @param[out] pnReturned Number of valid data samples successfully retrieved. + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Reads the status registers and extracts the relevant information + * to return to the caller. + * + * @note This is intended to be called only when the DATAREADY status signal + * is asserted. + */ +ADMW_RESULT admw_GetData( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_MEASUREMENT_MODE const eMeasurementMode, + ADMW_DATA_SAMPLE * const pSamples, + uint8_t const nBytesPerSample, + uint32_t const nRequested, + uint32_t * const pnReturned); + +/*! + * @brief Check if a command is currently running on the device. + * + * @param[in] hDevice ADMW device context handle + * @param[out] pbCommandRunning Pointer to return the command running status + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * + * @details Reads the device status register to check if a command is running. + */ +ADMW_RESULT admw_GetCommandRunningState( + ADMW_DEVICE_HANDLE hDevice, + bool *pbCommandRunning); + +#ifdef __cplusplus +} +#endif + +/*! + * @} + */ + +#endif /* __ADMW_API_H__ */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw_config_types.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,103 @@ +/* +Copyright (c) 2017 Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + - Modified versions of the software must be conspicuously marked as such. + - This software is licensed solely and exclusively for use with processors + manufactured by or for Analog Devices, Inc. + - This software may not be combined or merged with other code in any manner + that would cause the software to become subject to terms and conditions + which differ from those listed here. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights of one + or more patent holders. This license does not release you from the + requirement that you obtain separate licenses from these patent holders + to use this software. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL +PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + ****************************************************************************** + * @file: admw_config_types.h + * @brief: Type definitions for ADMW API. + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW_CONFIG_TYPES_H__ +#define __ADMW_CONFIG_TYPES_H__ + +#include "admw_platform.h" +#include "admw1001/admw1001_config.h" + +/*! @addtogroup ADMW_Api ADMW Host Library API + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/*! A list of supported product identifiers */ +typedef enum { + ADMW_PRODUCT_ID_ADMW1001 = 0x0020, + /*!< ADMW1001 */ +} ADMW_PRODUCT_ID; + +/*! ADISENSE Configuration schema version */ +typedef struct { + uint8_t major; /*!< Major version number */ + uint8_t minor; /*!< Minor version number */ +} ADMW_CONFIG_VERSION_ID; + +/*! ADISENSE UUID string length */ +#define ADMW_UUID_LEN 36 + +/*! ADISENSE global configuration details */ +typedef struct { + const char configUuid[ADMW_UUID_LEN]; + /*!< Optional unique identifier for this configuration */ + ADMW_CONFIG_VERSION_ID versionId; + /*!< Identifies the schema version for this configuration */ + ADMW_PRODUCT_ID productId; + /*!< Identify the product type for which this configuration is valid */ + union + { + ADMW1001_CONFIG admw1001; + /*!< ADMW1001 product configuration parameters. Used if productId + * selected is ADMW_PRODUCT_ID_ADMW1001 */ + }; + /*!< Product-specific configuration parameters, selected based on productId. + * @note Other product variants may be added here in the future */ +} ADMW_CONFIG; + +#ifdef __cplusplus +} +#endif + +/*! + * @} + */ + +#endif /* __ADMW_CONFIG_TYPES_H__ */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw_gpio.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,175 @@ +/* +Copyright 2019 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + ****************************************************************************** + * @file: admw_gpio.h + * @brief: ADMW OS-dependent wrapper layer for GPIO interface + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW_GPIO_H__ +#define __ADMW_GPIO_H__ + +#include "inc/admw_types.h" +#include "inc/admw_platform.h" + +/*! @ingroup ADMW_Host */ + +/*! @addtogroup ADMW_Gpio ADMW Host GPIO interface functions + * @{ + */ + +/*! GPIO pin identifiers */ +typedef enum +{ + ADMW_GPIO_PIN_RESET = 0, /*!< RESET GPIO output signal */ + ADMW_GPIO_PIN_ALERT_ERROR, /*!< ALERT GPIO input signal */ + ADMW_GPIO_PIN_DATAREADY, /*!< DATAREADY GPIO input signal */ +} ADMW_GPIO_PIN; + +/*! + * GPIO callback function signature + * + * @param[in] ePinId The GPIO pin which triggered the interrupt notification + * @param[in] pArg Optional opaque parameter to be passed to the callback + */ +typedef void (*ADMW_GPIO_CALLBACK)( + ADMW_GPIO_PIN ePinId, + void * pArg); + +/*! A handle used in all API functions to identify the GPIO interface context */ +typedef void* ADMW_GPIO_HANDLE; + +#ifdef __cplusplus +extern "C" +{ +#endif + +/*! + * @brief Open the SPI interface and allocate resources + * + * @param[in] pConfig Pointer to platform-specific GPIO interface details + * @param[out] phDevice Pointer to return a GPIO interface context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully + * - #ADMW_NO_MEM Failed to allocate memory for interface context + */ +ADMW_RESULT admw_GpioOpen( + ADMW_PLATFORM_GPIO_CONFIG * pConfig, + ADMW_GPIO_HANDLE * phDevice); + +/*! + * @brief Close GPIO interface and free resources + * + * @param[in] hDevice GPIO interface context handle (@ref admw_GpioOpen) + */ +void admw_GpioClose( + ADMW_GPIO_HANDLE hDevice); + +/*! + * @brief Get the state of the specified GPIO pin + * + * @param[in] hDevice GPIO interface context handle (@ref admw_GpioOpen) + * @param[in] ePinId GPIO pin to be read + * @param[out] pbState Pointer to return the state of the GPIO pin + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully + * - #ADMW_INVALID_DEVICE_NUM Invalid GPIO pin specified + */ +ADMW_RESULT admw_GpioGet( + ADMW_GPIO_HANDLE hDevice, + ADMW_GPIO_PIN ePinId, + bool * pbState); + +/*! + * @brief Set the state of the specified GPIO pin + * + * @param[in] hDevice GPIO interface context handle (@ref admw_GpioOpen) + * @param[in] ePinId GPIO pin to be set + * @param[in] bState The state to set for GPIO pin + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully + * - #ADMW_INVALID_DEVICE_NUM Invalid GPIO pin specified + */ +ADMW_RESULT admw_GpioSet( + ADMW_GPIO_HANDLE hDevice, + ADMW_GPIO_PIN ePinId, + bool bState); + +/*! + * @brief Enable interrupt notifications on the specified GPIO pin + * + * @param[in] hDevice GPIO interface context handle (@ref admw_GpioOpen) + * @param[in] ePinId GPIO pin on which to enable interrupt notifications + * @param[in] callback Callback function to invoke when the GPIO is asserted + * @param[in] arg Optional opaque parameter to be passed to the callback + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully + * - #ADMW_INVALID_DEVICE_NUM Invalid GPIO pin specified + */ +ADMW_RESULT admw_GpioIrqEnable( + ADMW_GPIO_HANDLE hDevice, + ADMW_GPIO_PIN ePinId, + ADMW_GPIO_CALLBACK callback, + void * arg); + +/*! + * @brief Disable interrupt notifications on the specified GPIO pin + * + * @param[in] hDevice GPIO interface context handle (@ref admw_GpioOpen) + * @param[in] ePinId GPIO pin on which to disable interrupt notifications + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully + * - #ADMW_INVALID_DEVICE_NUM Invalid GPIO pin specified + */ +ADMW_RESULT admw_GpioIrqDisable( + ADMW_GPIO_HANDLE hDevice, + ADMW_GPIO_PIN ePinId); + +#ifdef __cplusplus +} +#endif + +/*! + * @} + */ + +#endif /* __ADMW_GPIO_H__ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw_log.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,129 @@ +/* +Copyright 2019 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + ****************************************************************************** + * @file: admw_log.h + * @brief: ADMW OS-dependent wrapper layer for log functions + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW_LOG_H__ +#define __ADMW_LOG_H__ + +#include "inc/admw_types.h" + +/*! @ingroup ADMW_Host */ + +/*! @addtogroup ADMW_Log ADMW Host Logging functions + * @{ + */ + +/*! Macro function for logging an error message */ +#define ADMW_LOG_ERROR(...) \ + admw_Log(ADMW_LOG_LEVEL_ERROR, "[ERROR] " __VA_ARGS__) +/*! Macro function for logging a warning message */ +#define ADMW_LOG_WARN(...) \ + admw_Log(ADMW_LOG_LEVEL_WARN, "[WARN] " __VA_ARGS__) +/*! Macro function for logging an information message */ +#define ADMW_LOG_INFO(...) \ + admw_Log(ADMW_LOG_LEVEL_INFO, "[INFO] " __VA_ARGS__) +/*! Macro function for logging a debug message */ +#define ADMW_LOG_DEBUG(...) \ + admw_Log(ADMW_LOG_LEVEL_DEBUG, "[DEBUG] " __VA_ARGS__) + +/*! + * Log message priority levels + */ +typedef enum +{ + ADMW_LOG_LEVEL_ERROR = 0, /*!< Error message priority */ + ADMW_LOG_LEVEL_WARN, /*!< Warning message priority */ + ADMW_LOG_LEVEL_INFO, /*!< Information message priority */ + ADMW_LOG_LEVEL_DEBUG, /*!< Debug message priority */ +} ADMW_LOG_LEVEL; + + +#ifdef __cplusplus +extern "C" +{ +#endif + +/*! + * @brief Initialise the Log interface and allocate resources. + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * - #ADMW_NO_MEM Failed to allocate memory for device context. + */ +ADMW_RESULT admw_LogOpen( + ADMW_PLATFORM_LOG_CONFIG *pConfig); + +/*! + * @brief Close the Log interface and free resources. + */ +void admw_LogClose(void); + +/*! + * @brief Set the minimum priority level for the log messages. + * + * @param[in] maxLevel priority level + * + * @details Sets the log priority level. Messages with priority lower + that this level will not be passed to the log interface. + */ +void admw_LogLevel( + ADMW_LOG_LEVEL maxLevel); + +/*! + * @brief Print a log message to the platform log interface. + * + * @param[in] level Log message priority level + * @param[in] format Format string and variable argument list, if any + */ +void admw_Log( + ADMW_LOG_LEVEL level, + const char * format, + ...); + +#ifdef __cplusplus +} +#endif + +/*! + * @} + */ + +#endif /* __ADMW_LOG_H__ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw_platform.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,66 @@ +/* +Copyright (c) 2019 Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + - Modified versions of the software must be conspicuously marked as such. + - This software is licensed solely and exclusively for use with processors + manufactured by or for Analog Devices, Inc. + - This software may not be combined or merged with other code in any manner + that would cause the software to become subject to terms and conditions + which differ from those listed here. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights of one + or more patent holders. This license does not release you from the + requirement that you obtain separate licenses from these patent holders + to use this software. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL +PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + ****************************************************************************** + * @file: + * @brief: Platform-specific type definitions for ADMW API. + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW_PLATFORM_H__ +#define __ADMW_PLATFORM_H__ + +#include <stddef.h> +#include <stdint.h> +#include <stdbool.h> + +/*! @defgroup ADMW_Host ADMW Host Portability Layer */ + +typedef char char_t; +typedef float float32_t; +typedef double float64_t; + +#if defined (__MBED__) +#include "inc/mbed/admw_platform.h" +#else +#warning "Unknown host platform" +#endif + +#endif /* __ADMW_PLATFORM_H__ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw_spi.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,113 @@ +/* +Copyright 2019 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + ****************************************************************************** + * @file: admw_spi.h + * @brief: ADMW OS-dependent wrapper layer for SPI interface + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW_SPI_H__ +#define __ADMW_SPI_H__ + +#include "inc/admw_types.h" +#include "inc/admw_platform.h" + +/*! @ingroup ADMW_Host */ + +/*! @addtogroup ADMW_Spi ADMW Host SPI interface functions + * @{ + */ + +/*! A handle used in all API functions to identify the SPI interface context */ +typedef void * ADMW_SPI_HANDLE; + +#ifdef __cplusplus +extern "C" +{ +#endif + +/*! + * @brief Open the SPI interface and allocate resources + * + * @param[in] pConfig Pointer to platform-specific SPI interface details + * @param[out] phDevice Pointer to return a SPI interface context handle + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully + * - #ADMW_NO_MEM Failed to allocate memory for interface context + */ +ADMW_RESULT admw_SpiOpen( + ADMW_PLATFORM_SPI_CONFIG * pConfig, + ADMW_SPI_HANDLE * phDevice); + +/*! + * @brief Close SPI interface and free resources + * + * @param[in] hDevice SPI interface context handle (@ref admw_SpiOpen) + */ +void admw_SpiClose( + ADMW_SPI_HANDLE hDevice); + +/*! + * @brief Transfer data to slave device + * + * @param[in] hDevice SPI interface context handle (@ref admw_SpiOpen) + * @param[in] pTxData Transmit data buffer, or NULL for read-only transfers + * @param[in] pRxData Receive data buffer, or NULL for write-only transfers + * @param[in] nLength Number of bytes to transfer + * @param[in] bCsHold Leave the chip-select asserted when the transfer is done + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully + * - #ADMW_FAILURE Failed to complete SPI transfer + */ +ADMW_RESULT admw_SpiTransfer( + ADMW_SPI_HANDLE hDevice, + void * pTxData, + void * pRxData, + unsigned nLength, + bool bCsHold); + +#ifdef __cplusplus +} +#endif + +/*! + * @} + */ + +#endif /* __ADMW_API_H__ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw_time.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,75 @@ +/* +Copyright 2019 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + ****************************************************************************** + * @file: admw_time.h + * @brief: ADMW OS Dependant wrapper layer for time functions + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW_TIME_H__ +#define __ADMW_TIME_H__ + +#include "inc/admw_types.h" + +/*! @ingroup ADMW_Host */ + +/*! @addtogroup ADMW_Time ADMW Host Time functions + * @{ + */ + +#ifdef __cplusplus +extern "C" +{ +#endif + +/*! + * @brief Wait for a specified number of microseconds + * + * @param[in] microseconds Number of microseconds to wait + */ +void admw_TimeDelayUsec( + const unsigned microseconds); + +#ifdef __cplusplus +} +#endif + +/*! + * @} + */ + +#endif /* __ADMW_TIME_H__ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/admw_types.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,105 @@ +/* +Copyright 2019 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + ****************************************************************************** + * @file: admw_types.h + * @brief: Type definitions for ADMW API. + *----------------------------------------------------------------------------- + */ + +#ifndef __ADMW_TYPES_H__ +#define __ADMW_TYPES_H__ + +#include "admw_platform.h" + +/*! + ***************************************************************************** + * \enum ADMW_RESULT + * + * ADMW API Error Codes. #ADMW_SUCCESS is always zero + * The return value of all ADMW APIs returning #ADMW_RESULT + * should always be tested at the application level for success or failure. + * + *****************************************************************************/ +typedef enum +{ + /*! Generic success. */ + ADMW_SUCCESS, + /*! Generic Failure. */ + ADMW_FAILURE, + /*! Operation incomplete, call again */ + ADMW_INCOMPLETE, + /*! Device is already initialized. */ + ADMW_IN_USE, + /*! Invalid device handle. */ + ADMW_INVALID_HANDLE, + /*! Invalid device ID. */ + ADMW_INVALID_DEVICE_NUM, + /*! Device is uninitialized. */ + ADMW_ERR_NOT_INITIALIZED, + /*! NULL data pointer not allowed. */ + ADMW_INVALID_POINTER, + /*! Parameter is out of range. */ + ADMW_INVALID_PARAM, + /*! Unsupported mode of operation. */ + ADMW_UNSUPPORTED_MODE, + /*! Invalid operation */ + ADMW_INVALID_OPERATION, + /*! No data available, or buffer full */ + ADMW_NO_DATA, + /*! No buffer space available */ + ADMW_NO_SPACE, + /*! Square root of a negative number */ + ADMW_NEGATIVE_SQRT, + /*! Division by 0 or 0.0 */ + ADMW_DIVIDE_BY_ZERO, + /*! Invalid signature */ + ADMW_INVALID_SIGNATURE, + /*! Wrong size */ + ADMW_WRONG_SIZE, + /*! Sample Out of the dsp data limits */ + ADMW_OUT_OF_RANGE, + /*! Unable to operate with not a number */ + ADMW_NAN_FOUND, + /*! Timeout error */ + ADMW_TIMEOUT, + /*! Memory allocation error */ + ADMW_NO_MEM, + /*! CRC validation error */ + ADMW_CRC_ERROR, +} ADMW_RESULT; + +#endif /* __ADMW_TYPES_H__ */
--- a/inc/mbed/adi_sense_platform.h Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -Copyright (c) 2017 Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - Modified versions of the software must be conspicuously marked as such. - - This software is licensed solely and exclusively for use with processors - manufactured by or for Analog Devices, Inc. - - This software may not be combined or merged with other code in any manner - that would cause the software to become subject to terms and conditions - which differ from those listed here. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights of one - or more patent holders. This license does not release you from the - requirement that you obtain separate licenses from these patent holders - to use this software. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL -PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*! - ****************************************************************************** - * @file: - * @brief: mbed platform-specific type definitions for ADISENSE API. - *----------------------------------------------------------------------------- - */ - -#ifndef __ADI_SENSE_PLATFORM_MBED_H__ -#define __ADI_SENSE_PLATFORM_MBED_H__ - -/*! Maximum number of ADISENSE device instances supported on this platform */ -#define ADI_SENSE_PLATFORM_MAX_DEVICES 1 - -typedef struct { - int mosiPin; - int misoPin; - int sckPin; - int csPin; - int maxSpeedHz; -} ADI_SENSE_PLATFORM_SPI_CONFIG; - -typedef struct { - int resetPin; - int errorPin; - int alertPin; - int datareadyPin; -} ADI_SENSE_PLATFORM_GPIO_CONFIG; - -typedef struct { - int txPin; - int rxPin; - int baudRate; - bool disableLogs; -} ADI_SENSE_PLATFORM_LOG_CONFIG; - -#endif /* __ADI_SENSE_PLATFORM_MBED_H__ */ -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/mbed/admw_platform.h Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,75 @@ +/* +Copyright (c) 2017 Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + - Modified versions of the software must be conspicuously marked as such. + - This software is licensed solely and exclusively for use with processors + manufactured by or for Analog Devices, Inc. + - This software may not be combined or merged with other code in any manner + that would cause the software to become subject to terms and conditions + which differ from those listed here. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights of one + or more patent holders. This license does not release you from the + requirement that you obtain separate licenses from these patent holders + to use this software. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL +PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + ****************************************************************************** + * @file: + * @brief: mbed platform-specific type definitions for ADMW API. + *----------------------------------------------------------------------------- + */ + +#ifndef _PLATFORM_MBED_H__ +#define _PLATFORM_MBED_H__ + +/*! Maximum number of ADMW device instances supported on this platform */ +#define ADMW_PLATFORM_MAX_DEVICES 1 + +typedef struct { + int mosiPin; + int misoPin; + int sckPin; + int csPin; + int wakeupPin; + int maxSpeedHz; +} ADMW_PLATFORM_SPI_CONFIG; + +typedef struct { + int resetPin; + int alertErrorPin; + int datareadyPin; +} ADMW_PLATFORM_GPIO_CONFIG; + +typedef struct { + int txPin; + int rxPin; + int baudRate; + bool disableLogs; +} ADMW_PLATFORM_LOG_CONFIG; + +#endif /* _PLATFORM_MBED_H__ */
--- a/main.cpp Tue Jun 04 10:09:11 2019 +0000 +++ b/main.cpp Wed Jun 05 05:39:15 2019 +0000 @@ -73,67 +73,56 @@ * */ #include "mbed.h" -#include "adi_sense_api.h" -#include "adi_sense_1000/adi_sense_1000_api.h" -#include "adi_sense_log.h" +#include "admw_api.h" +#include "admw1001/admw1001_api.h" +#include "admw_log.h" #include "common/utils.h" #include "common/platform.h" -extern ADI_SENSE_CONFIG cjc0_thermistor_10k_ntc_config; -extern ADI_SENSE_CONFIG sensor0_rtd_2w_pt100_config; -extern ADI_SENSE_CONFIG sensor0_microphone_config; -extern ADI_SENSE_CONFIG sensor0_diode_2c_config; -extern ADI_SENSE_CONFIG sensor0_typeK_cjc0_config; -extern ADI_SENSE_CONFIG sensor1_rtd_3w_pt100_config; -extern ADI_SENSE_CONFIG sensor1_diode_3c_config; -extern ADI_SENSE_CONFIG sensor2_typeT_cjc0_config; -extern ADI_SENSE_CONFIG sensor2_bridge_6w_pressure_config; -extern ADI_SENSE_CONFIG sensor3_typeJ_cjc0_config; -extern ADI_SENSE_CONFIG sensor3_thermistor_10k_ntc_config; -extern ADI_SENSE_CONFIG voltage_honeywellPressure_config; -extern ADI_SENSE_CONFIG current_honeywellPressure_config; -extern ADI_SENSE_CONFIG i2c0_honeywellHumidicon_config; -extern ADI_SENSE_CONFIG i2c0_sensirionSHT3X_config; -extern ADI_SENSE_CONFIG i2c0_onsemiNOA1305_config; -extern ADI_SENSE_CONFIG spi0_honeywellTrustability_config; -extern ADI_SENSE_CONFIG spi0_adiAdxl362_config; -extern ADI_SENSE_CONFIG spi0_adiAdxl355_config; -extern ADI_SENSE_CONFIG uart_cozirCO2_config; -extern ADI_SENSE_CONFIG multichannel_continuous_config; -extern ADI_SENSE_CONFIG multichannel_multicycle_config; -extern ADI_SENSE_CONFIG multichannel_singlecycle_config; + + + +extern ADMW_CONFIG sensor0_typeK_cjc0_config; +extern ADMW_CONFIG sensor1_rtd_3w_pt100_config; +extern ADMW_CONFIG sensor2_typeT_cjc0_config; +extern ADMW_CONFIG sensor3_typeJ_cjc0_config; +extern ADMW_CONFIG i2c0_sensirionSHT3X_config; +extern ADMW_CONFIG spi0_adiAdxl362_config; +extern ADMW_CONFIG multichannel_continuous_config; +extern ADMW_CONFIG multichannel_multicycle_config; +extern ADMW_CONFIG multichannel_singlecycle_config; /* Change the following pointer to select any of the configurations above */ -static ADI_SENSE_CONFIG *pSelectedConfig = &sensor0_typeK_cjc0_config; +static ADMW_CONFIG *pSelectedConfig = &sensor0_typeK_cjc0_config; -static ADI_SENSE_CONNECTION connectionInfo = PLATFORM_CONNECTION_INFO; +static ADMW_CONNECTION connectionInfo = PLATFORM_CONNECTION_INFO; int main() { - ADI_SENSE_RESULT res; - ADI_SENSE_STATUS status; - ADI_SENSE_DEVICE_HANDLE hDevice; - ADI_SENSE_MEASUREMENT_MODE eMeasurementMode = ADI_SENSE_MEASUREMENT_MODE_NORMAL; + ADMW_RESULT res; + ADMW_STATUS status; + ADMW_DEVICE_HANDLE hDevice; + ADMW_MEASUREMENT_MODE eMeasurementMode = ADMW_MEASUREMENT_MODE_NORMAL; bool bDeviceReady; /* * Open an ADI Sense device instance. */ - res = adi_sense_Open(0, &connectionInfo, &hDevice); - if (res != ADI_SENSE_SUCCESS) + res = admw_Open(0, &connectionInfo, &hDevice); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to open device instance"); + ADMW_LOG_ERROR("Failed to open device instance"); return res; } /* * Reset the given ADI Sense device.... */ - ADI_SENSE_LOG_INFO("Resetting ADI Sense device, please wait..."); - res = adi_sense_Reset(hDevice); - if (res != ADI_SENSE_SUCCESS) + ADMW_LOG_INFO("Resetting ADI Sense device, please wait..."); + res = admw_Reset(hDevice); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to reset device"); + ADMW_LOG_ERROR("Failed to reset device"); return res; } /* @@ -141,43 +130,43 @@ */ do { wait_ms(100); - res = adi_sense_GetDeviceReadyState(hDevice, &bDeviceReady); - if (res != ADI_SENSE_SUCCESS) + res = admw_GetDeviceReadyState(hDevice, &bDeviceReady); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to get device ready-state"); + ADMW_LOG_ERROR("Failed to get device ready-state"); return res; } } while (! bDeviceReady); - ADI_SENSE_LOG_INFO("ADI Sense device ready"); + ADMW_LOG_INFO("ADI Sense device ready"); /* * Write configuration settings to the device registers. - * Settings are not applied until adi_sense_ApplyConfigUpdates() is called. + * Settings are not applied until admw_ApplyConfigUpdates() is called. */ - ADI_SENSE_LOG_INFO("Setting device configuration"); - res = adi_sense_SetConfig(hDevice, pSelectedConfig); - if (res != ADI_SENSE_SUCCESS) + ADMW_LOG_INFO("Setting device configuration"); + res = admw_SetConfig(hDevice, pSelectedConfig); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to set device configuration"); + ADMW_LOG_ERROR("Failed to set device configuration"); return res; } - res = adi_sense_ApplyConfigUpdates(hDevice); - if (res != ADI_SENSE_SUCCESS) + res = admw_ApplyConfigUpdates(hDevice); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to apply device configuration"); + ADMW_LOG_ERROR("Failed to apply device configuration"); return res; } /* * Check device status after updating the configuration */ - res = adi_sense_GetStatus(hDevice, &status); - if (res != ADI_SENSE_SUCCESS) + res = admw_GetStatus(hDevice, &status); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to retrieve device status"); + ADMW_LOG_ERROR("Failed to retrieve device status"); return res; } if (status.deviceStatus & - (ADI_SENSE_DEVICE_STATUS_ERROR | ADI_SENSE_DEVICE_STATUS_ALERT)) + (ADMW_DEVICE_STATUS_ERROR | ADMW_DEVICE_STATUS_ALERT)) { utils_printStatus(&status); } @@ -185,16 +174,16 @@ /* * Kick off the measurement cycle here */ - ADI_SENSE_LOG_INFO("Configuration completed, starting measurement cycles"); + ADMW_LOG_INFO("Configuration completed, starting measurement cycles"); utils_runMeasurement(hDevice, eMeasurementMode); /* * Clean up and exit */ - res = adi_sense_Close(hDevice); - if (res != ADI_SENSE_SUCCESS) + res = admw_Close(hDevice); + if (res != ADMW_SUCCESS) { - ADI_SENSE_LOG_ERROR("Failed to close device instance"); + ADMW_LOG_ERROR("Failed to close device instance"); return res; }
--- a/multichannel_continuous_config.c Tue Jun 04 10:09:11 2019 +0000 +++ b/multichannel_continuous_config.c Wed Jun 05 05:39:15 2019 +0000 @@ -39,196 +39,196 @@ * *****************************************************************************/ -#include "adi_sense_config_types.h" +#include "admw_config_types.h" -ADI_SENSE_CONFIG multichannel_continuous_config = { +ADMW_CONFIG multichannel_continuous_config = { .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { + .productId = ADMW_PRODUCT_ID_ADMW1001, + .admw1001 = { .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, + .powerMode = ADMW1001_POWER_MODE_FULL, }, .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, + .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, .cycleInterval = 5000000, }, .channels = { - [ADI_SENSE_1000_CHANNEL_ID_CJC_0] = { + [ADMW1001_CHANNEL_ID_CJC_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_CJC_1] = { + [ADMW1001_CHANNEL_ID_CJC_1] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_0] = { + [ADMW1001_CHANNEL_ID_SENSOR_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_1] = { + [ADMW1001_CHANNEL_ID_SENSOR_1] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_1, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_1, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_2] = { + [ADMW1001_CHANNEL_ID_SENSOR_2] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_0, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_0, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_3] = { + [ADMW1001_CHANNEL_ID_SENSOR_3] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_0, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_0, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true, }, }, - [ADI_SENSE_1000_CHANNEL_ID_VOLTAGE_0] = { + [ADMW1001_CHANNEL_ID_VOLTAGE_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_2X, + .sensor = ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1, + .gain = ADMW1001_ADC_GAIN_2X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_CURRENT_0] = { + [ADMW1001_CHANNEL_ID_CURRENT_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_2X, + .sensor = ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1, + .gain = ADMW1001_ADC_GAIN_2X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_I2C_0] = { + [ADMW1001_CHANNEL_ID_I2C_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, .measurementsPerCycle = 10, .extraSettlingTime = 36500, .i2cChannelConfig = { - .sensor = ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_DEF_L1, + .sensor = ADMW1001_I2C_SENSOR_HUMIDITY_A_DEF_L1, .deviceAddress = 0x27, }, },
--- a/multichannel_multicycle_config.c Tue Jun 04 10:09:11 2019 +0000 +++ b/multichannel_multicycle_config.c Wed Jun 05 05:39:15 2019 +0000 @@ -39,18 +39,18 @@ * *****************************************************************************/ -#include "adi_sense_config_types.h" +#include "admw_config_types.h" -ADI_SENSE_CONFIG multichannel_multicycle_config = { +ADMW_CONFIG multichannel_multicycle_config = { .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { + .productId = ADMW_PRODUCT_ID_ADMW1001, + .admw1001 = { .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, + .powerMode = ADMW1001_POWER_MODE_FULL, }, .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_MULTICYCLE_BURST, + .operatingMode = ADMW1001_OPERATING_MODE_MULTICYCLE, + .dataReadyMode = ADMW1001_DATAREADY_PER_MULTICYCLE_BURST, .cycleInterval = 3000000, .multiCycleConfig = { .cyclesPerBurst = 5, @@ -58,181 +58,181 @@ }, }, .channels = { - [ADI_SENSE_1000_CHANNEL_ID_CJC_0] = { + [ADMW1001_CHANNEL_ID_CJC_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_CJC_1] = { + [ADMW1001_CHANNEL_ID_CJC_1] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_0] = { + [ADMW1001_CHANNEL_ID_SENSOR_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_1] = { + [ADMW1001_CHANNEL_ID_SENSOR_1] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_1, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_1, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_2] = { + [ADMW1001_CHANNEL_ID_SENSOR_2] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_0, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_0, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_3] = { + [ADMW1001_CHANNEL_ID_SENSOR_3] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_0, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_0, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true, }, }, - [ADI_SENSE_1000_CHANNEL_ID_VOLTAGE_0] = { + [ADMW1001_CHANNEL_ID_VOLTAGE_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_2X, + .sensor = ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1, + .gain = ADMW1001_ADC_GAIN_2X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_CURRENT_0] = { + [ADMW1001_CHANNEL_ID_CURRENT_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_2X, + .sensor = ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1, + .gain = ADMW1001_ADC_GAIN_2X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_I2C_0] = { + [ADMW1001_CHANNEL_ID_I2C_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, .measurementsPerCycle = 10, .extraSettlingTime = 36500, .i2cChannelConfig = { - .sensor = ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_DEF_L1, + .sensor = ADMW1001_I2C_SENSOR_HUMIDITY_A_DEF_L1, .deviceAddress = 0x27, }, },
--- a/multichannel_singlecycle_config.c Tue Jun 04 10:09:11 2019 +0000 +++ b/multichannel_singlecycle_config.c Wed Jun 05 05:39:15 2019 +0000 @@ -39,195 +39,195 @@ * *****************************************************************************/ -#include "adi_sense_config_types.h" +#include "admw_config_types.h" -ADI_SENSE_CONFIG multichannel_singlecycle_config = { +ADMW_CONFIG multichannel_singlecycle_config = { .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { + .productId = ADMW_PRODUCT_ID_ADMW1001, + .admw1001 = { .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, + .powerMode = ADMW1001_POWER_MODE_FULL, }, .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CONVERSION, + .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, + .dataReadyMode = ADMW1001_DATAREADY_PER_CONVERSION, }, .channels = { - [ADI_SENSE_1000_CHANNEL_ID_CJC_0] = { + [ADMW1001_CHANNEL_ID_CJC_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_CJC_1] = { + [ADMW1001_CHANNEL_ID_CJC_1] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_0] = { + [ADMW1001_CHANNEL_ID_SENSOR_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_1] = { + [ADMW1001_CHANNEL_ID_SENSOR_1] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_1, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_1, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_2] = { + [ADMW1001_CHANNEL_ID_SENSOR_2] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_0, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_0, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_3] = { + [ADMW1001_CHANNEL_ID_SENSOR_3] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_0, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_0, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true, }, }, - [ADI_SENSE_1000_CHANNEL_ID_VOLTAGE_0] = { + [ADMW1001_CHANNEL_ID_VOLTAGE_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_2X, + .sensor = ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1, + .gain = ADMW1001_ADC_GAIN_2X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_CURRENT_0] = { + [ADMW1001_CHANNEL_ID_CURRENT_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_2X, + .sensor = ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1, + .gain = ADMW1001_ADC_GAIN_2X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_I2C_0] = { + [ADMW1001_CHANNEL_ID_I2C_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, .measurementsPerCycle = 10, .extraSettlingTime = 36500, .i2cChannelConfig = { - .sensor = ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_DEF_L1, + .sensor = ADMW1001_I2C_SENSOR_HUMIDITY_A_DEF_L1, .deviceAddress = 0x27, }, },
--- a/sensor0_diode_2c_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/*! - ****************************************************************************** - * @file: sensor0_diode_config.cpp - * @brief: - *----------------------------------------------------------------------------- - * -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG sensor0_diode_2c_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_0] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, - .measurementsPerCycle = 10, - .extraSettlingTime = 0, - .sensorParameter = 1.003, - .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_DIODE_2C_TYPEA_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_2X, - .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_50uA, - .diodeRatio = ADI_SENSE_1000_ADC_EXC_CURRENT_IOUT_DIODE_DEFAULT, - }, - .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, - }, - .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, - .disableBuffer = true, - }, - .enableVbias = false, - }, - }, - }, - }, -}; -
--- a/sensor0_microphone_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG sensor0_microphone_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_0] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementsPerCycle = 10, - .extraSettlingTime = 0, - .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_MICROPHONE_B_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_1X, - .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, - }, - .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, - .disableBuffer = true, - }, - .enableVbias = true, - }, - }, - }, - }, -}; -
--- a/sensor0_rtd-2w-pt100_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG sensor0_rtd_2w_pt100_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_0] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, - .measurementsPerCycle = 10, - .extraSettlingTime = 0, - .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, - .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_250uA, - }, - .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, - }, - .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, - .disableBuffer = false, - }, - .enableVbias = false, - }, - }, - }, - }, -}; -
--- a/sensor0_typeK_cjc0_config.c Tue Jun 04 10:09:11 2019 +0000 +++ b/sensor0_typeK_cjc0_config.c Wed Jun 05 05:39:15 2019 +0000 @@ -40,58 +40,58 @@ * @brief: *----------------------------------------------------------------------------- */ -#include "adi_sense_config_types.h" +#include "admw_config_types.h" -ADI_SENSE_CONFIG sensor0_typeK_cjc0_config = { +ADMW_CONFIG sensor0_typeK_cjc0_config = { .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { + .productId = ADMW_PRODUCT_ID_ADMW1001, + .admw1001 = { .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, + .powerMode = ADMW1001_POWER_MODE_FULL, }, .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, + .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, }, .channels = { - [ADI_SENSE_1000_CHANNEL_ID_CJC_0] = { + [ADMW1001_CHANNEL_ID_CJC_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_250uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_0] = { + [ADMW1001_CHANNEL_ID_SENSOR_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_0, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_0, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true,
--- a/sensor1_diode_3c_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/*! - ****************************************************************************** - * @file: sensor0_diode_config.cpp - * @brief: - *----------------------------------------------------------------------------- - * -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG sensor1_diode_3c_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_1] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, - .measurementsPerCycle = 10, - .extraSettlingTime = 0, - .sensorParameter = 1.003, - .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_DIODE_3C_TYPEA_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_2X, - .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_50uA, - .diodeRatio = ADI_SENSE_1000_ADC_EXC_CURRENT_IOUT_DIODE_DEFAULT, - }, - .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, - }, - .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, - .disableBuffer = true, - }, - .enableVbias = false, - }, - }, - }, - }, -}; -
--- a/sensor1_rtd-3w-pt100_config.c Tue Jun 04 10:09:11 2019 +0000 +++ b/sensor1_rtd-3w-pt100_config.c Wed Jun 05 05:39:15 2019 +0000 @@ -40,38 +40,38 @@ * @brief: *----------------------------------------------------------------------------- */ -#include "adi_sense_config_types.h" +#include "admw_config_types.h" -ADI_SENSE_CONFIG sensor1_rtd_3w_pt100_config = { +ADMW_CONFIG sensor1_rtd_3w_pt100_config = { .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { + .productId = ADMW_PRODUCT_ID_ADMW1001, + .admw1001 = { .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, + .powerMode = ADMW1001_POWER_MODE_FULL, }, .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, + .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, }, .channels = { - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_1] = { + [ADMW1001_CHANNEL_ID_SENSOR_1] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_3WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_250uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false,
--- a/sensor2_bridge-6w-pressure_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG sensor2_bridge_6w_pressure_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_2] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementsPerCycle = 10, - .extraSettlingTime = 0, - .enableUnityLut = true, - .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_1_DEF_L2, - .gain = ADI_SENSE_1000_ADC_GAIN_1X, - .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, - }, - .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_BRIDGE_EXCITATION, - .disableBuffer = false, - }, - .enableVbias = false, - }, - }, - }, - }, -}; -
--- a/sensor2_typeT_cjc0_config.c Tue Jun 04 10:09:11 2019 +0000 +++ b/sensor2_typeT_cjc0_config.c Wed Jun 05 05:39:15 2019 +0000 @@ -39,59 +39,58 @@ * @file: * @brief: *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" + */#include "admw_config_types.h" -ADI_SENSE_CONFIG sensor2_typeT_cjc0_config = { +ADMW_CONFIG sensor2_typeT_cjc0_config = { .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { + .productId = ADMW_PRODUCT_ID_ADMW1001, + .admw1001 = { .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, + .powerMode = ADMW1001_POWER_MODE_FULL, }, .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, + .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, }, .channels = { - [ADI_SENSE_1000_CHANNEL_ID_CJC_0] = { + [ADMW1001_CHANNEL_ID_CJC_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_250uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_2] = { + [ADMW1001_CHANNEL_ID_SENSOR_2] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_0, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_0, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true,
--- a/sensor3_thermistor-10k-ntc_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG sensor3_thermistor_10k_ntc_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_3] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, - .measurementsPerCycle = 10, - .extraSettlingTime = 0, - .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_A_10K_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_1X, - .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, - }, - .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_2, - .disableBuffer = true, - }, - .enableVbias = false, - }, - }, - }, - }, -}; -
--- a/sensor3_typeJ_cjc0_config.c Tue Jun 04 10:09:11 2019 +0000 +++ b/sensor3_typeJ_cjc0_config.c Wed Jun 05 05:39:15 2019 +0000 @@ -40,58 +40,60 @@ * @brief: *----------------------------------------------------------------------------- */ -#include "adi_sense_config_types.h" -ADI_SENSE_CONFIG sensor3_typeJ_cjc0_config = { + + #include "admw_config_types.h" + +ADMW_CONFIG sensor3_typeJ_cjc0_config = { .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { + .productId = ADMW_PRODUCT_ID_ADMW1001, + .admw1001 = { .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, + .powerMode = ADMW1001_POWER_MODE_FULL, }, .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, + .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, }, .channels = { - [ADI_SENSE_1000_CHANNEL_ID_CJC_0] = { + [ADMW1001_CHANNEL_ID_CJC_0] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_8X, + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, + .gain = ADMW1001_ADC_GAIN_8X, .current = { - .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_250uA, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, + .type = ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, .disableBuffer = false, }, .enableVbias = false, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SENSOR_3] = { + [ADMW1001_CHANNEL_ID_SENSOR_3] = { .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_0, - .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, + .compensationChannel = ADMW1001_CHANNEL_ID_CJC_0, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, .measurementsPerCycle = 10, .extraSettlingTime = 0, .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_32X, + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1, + .gain = ADMW1001_ADC_GAIN_32X, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, + .type = ADMW1001_ADC_FILTER_FIR_25SPS, }, .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, + .type = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, .disableBuffer = true, }, .enableVbias = true,
--- a/spi0_adiAdxl355_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -Copyright 2018 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG spi0_adiAdxl355_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - .cycleInterval = 1000000, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_SPI_0] = { - /* Accelerometer X-Axis (and common settings for physical channel) */ - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementsPerCycle = 10, - .extraSettlingTime = 1000, - .spiChannelConfig = { - .sensor = ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_B_DEF_L1, - }, - }, - [ADI_SENSE_1000_CHANNEL_ID_SPI_1] = { - /* Accelerometer Y-Axis (virtual channel) */ - .enableChannel = true, - }, - [ADI_SENSE_1000_CHANNEL_ID_SPI_2] = { - /* Accelerometer Z-Axis (virtual channel) */ - .enableChannel = true, - }, - }, - }, -}; -
--- a/spi0_adiAdxl362_config.c Tue Jun 04 10:09:11 2019 +0000 +++ b/spi0_adiAdxl362_config.c Wed Jun 05 05:39:15 2019 +0000 @@ -40,43 +40,43 @@ * @brief: *----------------------------------------------------------------------------- */ -#include "adi_sense_config_types.h" + #include "admw_config_types.h" -ADI_SENSE_CONFIG spi0_adiAdxl362_config = { +ADMW_CONFIG spi0_adiAdxl362_config = { .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { + .productId = ADMW_PRODUCT_ID_ADMW1001, + .admw1001 = { .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, + .powerMode = ADMW1001_POWER_MODE_FULL, }, .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, + .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, .cycleInterval = 1000000, }, .channels = { - [ADI_SENSE_1000_CHANNEL_ID_SPI_0] = { + [ADMW1001_CHANNEL_ID_SPI_0] = { /* Accelerometer X-Axis (and common settings for physical channel) */ .enableChannel = true, .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, + .compensationChannel = ADMW1001_CHANNEL_ID_NONE, .measurementsPerCycle = 10, .extraSettlingTime = 10000, /* Optional threshold limits applied to the processed measurement results */ .lowThreshold = -6.0, .highThreshold = 6.0, .spiChannelConfig = { - .sensor = ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_DEF_L1, + .sensor = ADMW1001_SPI_SENSOR_ACCELEROMETER_A_DEF_L1, }, }, - [ADI_SENSE_1000_CHANNEL_ID_SPI_1] = { + [ADMW1001_CHANNEL_ID_SPI_1] = { /* Accelerometer Y-Axis (virtual channel) */ .enableChannel = true, /* Optional threshold limits applied to the processed measurement results */ .lowThreshold = -6.0, .highThreshold = 6.0, }, - [ADI_SENSE_1000_CHANNEL_ID_SPI_2] = { + [ADMW1001_CHANNEL_ID_SPI_2] = { /* Accelerometer Z-Axis (virtual channel) */ .enableChannel = true, /* Optional adjustment applied to the processed measurement result */
--- a/spi0_honeywellTrustability_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG spi0_honeywellTrustability_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_SPI_0] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementsPerCycle = 10, - .extraSettlingTime = 8000, - .spiChannelConfig = { - .sensor = ADI_SENSE_1000_SPI_SENSOR_PRESSURE_A_DEF_L1, - }, - }, - }, - }, -}; -
--- a/src/adi_sense_1000.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3342 +0,0 @@ -/* -Copyright 2018 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/****************************************************************************** -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: ADISENSE API implementation for ADSNS1000 - *----------------------------------------------------------------------------- - */ - -#include <float.h> -#include <math.h> -#include <string.h> - -#include "adi_sense_platform.h" -#include "adi_sense_api.h" -#include "adi_sense_1000/adi_sense_1000_api.h" - -#include "adi_sense_1000/ADISENSE1000_REGISTERS_typedefs.h" -#include "adi_sense_1000/ADISENSE1000_REGISTERS.h" -#include "adi_sense_1000/adi_sense_1000_lut_data.h" -#include "adi_sense_1000/adi_sense_1000_host_comms.h" - -#include "crc16.h" - - -uint32_t getDataCnt = 0; - -/* - * The following macros are used to encapsulate the register access code - * to improve readability in the functions further below in this file - */ -#define STRINGIFY(name) #name - -/* Expand the full name of the reset value macro for the specified register */ -#define REG_RESET_VAL(_name) REG_ADISENSE_##_name##_RESET - -/* Checks if a value is outside the bounds of the specified register field */ -#define CHECK_REG_FIELD_VAL(_field, _val) \ - do { \ - uint32_t _mask = BITM_ADISENSE_##_field; \ - uint32_t _shift = BITP_ADISENSE_##_field; \ - if ((((_val) << _shift) & ~(_mask)) != 0) { \ - ADI_SENSE_LOG_ERROR("Value 0x%08X invalid for register field %s", \ - (uint32_t)(_val), \ - STRINGIFY(ADISENSE_##_field)); \ - return ADI_SENSE_INVALID_PARAM; \ - } \ - } while(false) - -/* - * Encapsulates the write to a specified register - * NOTE - this will cause the calling function to return on error - */ -#define WRITE_REG(_hdev, _val, _name, _type) \ - do { \ - ADI_SENSE_RESULT _res; \ - _type _regval = _val; \ - _res = adi_sense_1000_WriteRegister((_hdev), \ - REG_ADISENSE_##_name, \ - &_regval, sizeof(_regval)); \ - if (_res != ADI_SENSE_SUCCESS) \ - return _res; \ - } while(false) - -/* Wrapper macro to write a value to a uint32_t register */ -#define WRITE_REG_U32(_hdev, _val, _name) \ - WRITE_REG(_hdev, _val, _name, uint32_t) -/* Wrapper macro to write a value to a uint16_t register */ -#define WRITE_REG_U16(_hdev, _val, _name) \ - WRITE_REG(_hdev, _val, _name, uint16_t) -/* Wrapper macro to write a value to a uint8_t register */ -#define WRITE_REG_U8(_hdev, _val, _name) \ - WRITE_REG(_hdev, _val, _name, uint8_t) -/* Wrapper macro to write a value to a float32_t register */ -#define WRITE_REG_FLOAT(_hdev, _val, _name) \ - WRITE_REG(_hdev, _val, _name, float32_t) - -/* - * Encapsulates the read from a specified register - * NOTE - this will cause the calling function to return on error - */ -#define READ_REG(_hdev, _val, _name, _type) \ - do { \ - ADI_SENSE_RESULT _res; \ - _type _regval; \ - _res = adi_sense_1000_ReadRegister((_hdev), \ - REG_ADISENSE_##_name, \ - &_regval, sizeof(_regval)); \ - if (_res != ADI_SENSE_SUCCESS) \ - return _res; \ - _val = _regval; \ - } while(false) - -/* Wrapper macro to read a value from a uint32_t register */ -#define READ_REG_U32(_hdev, _val, _name) \ - READ_REG(_hdev, _val, _name, uint32_t) -/* Wrapper macro to read a value from a uint16_t register */ -#define READ_REG_U16(_hdev, _val, _name) \ - READ_REG(_hdev, _val, _name, uint16_t) -/* Wrapper macro to read a value from a uint8_t register */ -#define READ_REG_U8(_hdev, _val, _name) \ - READ_REG(_hdev, _val, _name, uint8_t) -/* Wrapper macro to read a value from a float32_t register */ -#define READ_REG_FLOAT(_hdev, _val, _name) \ - READ_REG(_hdev, _val, _name, float32_t) - -/* - * Wrapper macro to write an array of values to a uint8_t register - * NOTE - this is intended only for writing to a keyhole data register - */ -#define WRITE_REG_U8_ARRAY(_hdev, _arr, _len, _name) \ - do { \ - ADI_SENSE_RESULT _res; \ - _res = adi_sense_1000_WriteRegister(_hdev, \ - REG_ADISENSE_##_name, \ - _arr, _len); \ - if (_res != ADI_SENSE_SUCCESS) \ - return _res; \ - } while(false) - -/* - * Wrapper macro to read an array of values from a uint8_t register - * NOTE - this is intended only for reading from a keyhole data register - */ -#define READ_REG_U8_ARRAY(_hdev, _arr, _len, _name) \ - do { \ - ADI_SENSE_RESULT _res; \ - _res = adi_sense_1000_ReadRegister((_hdev), \ - REG_ADISENSE_##_name, \ - _arr, _len); \ - if (_res != ADI_SENSE_SUCCESS) \ - return _res; \ - } while(false) - -#define ADI_SENSE_1000_CHANNEL_IS_ADC(c) \ - ((c) >= ADI_SENSE_1000_CHANNEL_ID_CJC_0 && (c) <= ADI_SENSE_1000_CHANNEL_ID_CURRENT_0) - -#define ADI_SENSE_1000_CHANNEL_IS_ADC_CJC(c) \ - ((c) >= ADI_SENSE_1000_CHANNEL_ID_CJC_0 && (c) <= ADI_SENSE_1000_CHANNEL_ID_CJC_1) - -#define ADI_SENSE_1000_CHANNEL_IS_ADC_SENSOR(c) \ - ((c) >= ADI_SENSE_1000_CHANNEL_ID_SENSOR_0 && (c) <= ADI_SENSE_1000_CHANNEL_ID_SENSOR_3) - -#define ADI_SENSE_1000_CHANNEL_IS_ADC_VOLTAGE(c) \ - ((c) == ADI_SENSE_1000_CHANNEL_ID_VOLTAGE_0) - -#define ADI_SENSE_1000_CHANNEL_IS_ADC_CURRENT(c) \ - ((c) == ADI_SENSE_1000_CHANNEL_ID_CURRENT_0) - -#define ADI_SENSE_1000_CHANNEL_IS_VIRTUAL(c) \ - ((c) == ADI_SENSE_1000_CHANNEL_ID_SPI_1 || (c) == ADI_SENSE_1000_CHANNEL_ID_SPI_2) - -typedef struct -{ - unsigned nDeviceIndex; - ADI_SENSE_SPI_HANDLE hSpi; - ADI_SENSE_GPIO_HANDLE hGpio; -} ADI_SENSE_DEVICE_CONTEXT; - -static ADI_SENSE_DEVICE_CONTEXT gDeviceCtx[ADI_SENSE_PLATFORM_MAX_DEVICES]; - -/* - * Open an ADISENSE device instance. - */ -ADI_SENSE_RESULT adi_sense_Open( - unsigned const nDeviceIndex, - ADI_SENSE_CONNECTION * const pConnectionInfo, - ADI_SENSE_DEVICE_HANDLE * const phDevice) -{ - ADI_SENSE_DEVICE_CONTEXT *pCtx; - ADI_SENSE_RESULT eRet; - - if (nDeviceIndex >= ADI_SENSE_PLATFORM_MAX_DEVICES) - return ADI_SENSE_INVALID_DEVICE_NUM; - - pCtx = &gDeviceCtx[nDeviceIndex]; - pCtx->nDeviceIndex = nDeviceIndex; - - eRet = adi_sense_LogOpen(&pConnectionInfo->log); - if (eRet != ADI_SENSE_SUCCESS) - return eRet; - - eRet = adi_sense_GpioOpen(&pConnectionInfo->gpio, &pCtx->hGpio); - if (eRet != ADI_SENSE_SUCCESS) - return eRet; - - eRet = adi_sense_SpiOpen(&pConnectionInfo->spi, &pCtx->hSpi); - if (eRet != ADI_SENSE_SUCCESS) - return eRet; - - *phDevice = pCtx; - return ADI_SENSE_SUCCESS; -} - -/* - * Get the current state of the specified GPIO input signal. - */ -ADI_SENSE_RESULT adi_sense_GetGpioState( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_GPIO_PIN const ePinId, - bool * const pbAsserted) -{ - ADI_SENSE_DEVICE_CONTEXT *pCtx = hDevice; - - return adi_sense_GpioGet(pCtx->hGpio, ePinId, pbAsserted); -} - -/* - * Register an application-defined callback function for GPIO interrupts. - */ -ADI_SENSE_RESULT adi_sense_RegisterGpioCallback( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_GPIO_PIN const ePinId, - ADI_SENSE_GPIO_CALLBACK const callbackFunction, - void * const pCallbackParam) -{ - ADI_SENSE_DEVICE_CONTEXT *pCtx = hDevice; - - if (callbackFunction) - { - return adi_sense_GpioIrqEnable(pCtx->hGpio, ePinId, callbackFunction, - pCallbackParam); - } - else - { - return adi_sense_GpioIrqDisable(pCtx->hGpio, ePinId); - } -} - -/* - * Reset the specified ADISENSE device. - */ -ADI_SENSE_RESULT adi_sense_Reset( - ADI_SENSE_DEVICE_HANDLE const hDevice) -{ - ADI_SENSE_DEVICE_CONTEXT *pCtx = hDevice; - ADI_SENSE_RESULT eRet; - - /* Pulse the Reset GPIO pin low for a minimum of 4 microseconds */ - eRet = adi_sense_GpioSet(pCtx->hGpio, ADI_SENSE_GPIO_PIN_RESET, false); - if (eRet != ADI_SENSE_SUCCESS) - return eRet; - - adi_sense_TimeDelayUsec(4); - - eRet = adi_sense_GpioSet(pCtx->hGpio, ADI_SENSE_GPIO_PIN_RESET, true); - if (eRet != ADI_SENSE_SUCCESS) - return eRet; - - return ADI_SENSE_SUCCESS; -} - - -/*! - * @brief Get general status of ADISense module. - * - * @param[in] - * @param[out] pStatus : Pointer to CORE Status struct. - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - #ADI_SENSE_FAILURE If status register read fails. - * - * @details Read the general status register for the ADISense - * module. Indicates Error, Alert conditions, data ready - * and command running. - * - */ -ADI_SENSE_RESULT adi_sense_GetStatus( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_STATUS * const pStatus) -{ - ADI_ADISENSE_CORE_Status_t statusReg; - READ_REG_U8(hDevice, statusReg.VALUE8, CORE_STATUS); - - ADI_ADISENSE_CORE_Alert_Status_2_t alert2Reg; - READ_REG_U16(hDevice, alert2Reg.VALUE16, CORE_ALERT_STATUS_2); - - memset(pStatus, 0, sizeof(*pStatus)); - - if (!statusReg.Cmd_Running) /* Active-low, so invert it */ - pStatus->deviceStatus |= ADI_SENSE_DEVICE_STATUS_BUSY; - if (statusReg.Drdy) - pStatus->deviceStatus |= ADI_SENSE_DEVICE_STATUS_DATAREADY; - if (statusReg.FIFO_Error) - pStatus->deviceStatus |= ADI_SENSE_DEVICE_STATUS_FIFO_ERROR; - if (alert2Reg.Ext_Flash_Error) - pStatus->deviceStatus |= ADI_SENSE_DEVICE_STATUS_EXT_FLASH_ERROR; - if (statusReg.Alert_Active) - { - pStatus->deviceStatus |= ADI_SENSE_DEVICE_STATUS_ALERT; - - ADI_ADISENSE_CORE_Alert_Code_t alertCodeReg; - READ_REG_U16(hDevice, alertCodeReg.VALUE16, CORE_ALERT_CODE); - pStatus->alertCode = alertCodeReg.Alert_Code; - - ADI_ADISENSE_CORE_Channel_Alert_Status_t channelAlertStatusReg; - READ_REG_U16(hDevice, channelAlertStatusReg.VALUE16, - CORE_CHANNEL_ALERT_STATUS); - - for (unsigned i = 0; i < ADI_SENSE_1000_MAX_CHANNELS; i++) - { - if (channelAlertStatusReg.VALUE16 & (1 << i)) - { - ADI_ADISENSE_CORE_Alert_Code_Ch_t channelAlertCodeReg; - READ_REG_U16(hDevice, channelAlertCodeReg.VALUE16, CORE_ALERT_CODE_CHn(i)); - pStatus->channelAlertCodes[i] = channelAlertCodeReg.Alert_Code_Ch; - - ADI_ADISENSE_CORE_Alert_Detail_Ch_t alertDetailReg; - READ_REG_U16(hDevice, alertDetailReg.VALUE16, - CORE_ALERT_DETAIL_CHn(i)); - - if (alertDetailReg.Time_Out) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_TIMEOUT; - if (alertDetailReg.Under_Range) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_UNDER_RANGE; - if (alertDetailReg.Over_Range) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_OVER_RANGE; - if (alertDetailReg.Low_Limit) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_LOW_LIMIT; - if (alertDetailReg.High_Limit) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_HIGH_LIMIT; - if (alertDetailReg.Sensor_Open) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_SENSOR_OPEN; - if (alertDetailReg.Ref_Detect) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_REF_DETECT; - if (alertDetailReg.Config_Err) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_CONFIG_ERR; - if (alertDetailReg.LUT_Error_Ch) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_LUT_ERR; - if (alertDetailReg.Sensor_Not_Ready) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_SENSOR_NOT_READY; - if (alertDetailReg.Comp_Not_Ready) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_COMP_NOT_READY; - if (alertDetailReg.Correction_UnderRange) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_LUT_UNDER_RANGE; - if (alertDetailReg.Correction_OverRange) - pStatus->channelAlerts[i] |= ADI_SENSE_CHANNEL_ALERT_LUT_OVER_RANGE; - } - } - - if (alert2Reg.Configuration_Error) - pStatus->deviceStatus |= ADI_SENSE_DEVICE_STATUS_CONFIG_ERROR; - if (alert2Reg.LUT_Error) - pStatus->deviceStatus |= ADI_SENSE_DEVICE_STATUS_LUT_ERROR; - } - - if (statusReg.Error) - { - pStatus->deviceStatus |= ADI_SENSE_DEVICE_STATUS_ERROR; - - ADI_ADISENSE_CORE_Error_Code_t errorCodeReg; - READ_REG_U16(hDevice, errorCodeReg.VALUE16, CORE_ERROR_CODE); - pStatus->errorCode = errorCodeReg.Error_Code; - - ADI_ADISENSE_CORE_Diagnostics_Status_t diagStatusReg; - READ_REG_U16(hDevice, diagStatusReg.VALUE16, CORE_DIAGNOSTICS_STATUS); - - if (diagStatusReg.Diag_Checksum_Error) - pStatus->diagnosticsStatus |= ADI_SENSE_DIAGNOSTICS_STATUS_CHECKSUM_ERROR; - if (diagStatusReg.Diag_Comms_Error) - pStatus->diagnosticsStatus |= ADI_SENSE_DIAGNOSTICS_STATUS_COMMS_ERROR; - if (diagStatusReg.Diag_Supply_Monitor_Error) - pStatus->diagnosticsStatus |= ADI_SENSE_DIAGNOSTICS_STATUS_SUPPLY_MONITOR_ERROR; - if (diagStatusReg.Diag_Supply_Cap_Error) - pStatus->diagnosticsStatus |= ADI_SENSE_DIAGNOSTICS_STATUS_SUPPLY_CAP_ERROR; - if (diagStatusReg.Diag_Conversion_Error) - pStatus->diagnosticsStatus |= ADI_SENSE_DIAGNOSTICS_STATUS_CONVERSION_ERROR; - if (diagStatusReg.Diag_Calibration_Error) - pStatus->diagnosticsStatus |= ADI_SENSE_DIAGNOSTICS_STATUS_CALIBRATION_ERROR; - } - - if (statusReg.Alert_Active || statusReg.Error) - { - ADI_ADISENSE_CORE_Debug_Code_t debugCodeReg; - READ_REG_U32(hDevice, debugCodeReg.VALUE32, CORE_DEBUG_CODE); - pStatus->debugCode = debugCodeReg.Debug_Code; - } - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_GetCommandRunningState( - ADI_SENSE_DEVICE_HANDLE hDevice, - bool *pbCommandRunning) -{ - ADI_ADISENSE_CORE_Status_t statusReg; - - READ_REG_U8(hDevice, statusReg.VALUE8, CORE_STATUS); - - /* We should never normally see 0xFF here if the module is operational */ - if (statusReg.VALUE8 == 0xFF) - return ADI_SENSE_ERR_NOT_INITIALIZED; - - *pbCommandRunning = !statusReg.Cmd_Running; /* Active-low, so invert it */ - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT executeCommand( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_ADISENSE_CORE_Command_Special_Command const command, - bool const bWaitForCompletion) -{ - ADI_ADISENSE_CORE_Command_t commandReg; - bool bCommandRunning; - ADI_SENSE_RESULT eRet; - - /* - * Don't allow another command to be issued if one is already running, but - * make an exception for ADISENSE_CORE_COMMAND_NOP which can be used to - * request a running command to be stopped (e.g. continuous measurement) - */ - if (command != ADISENSE_CORE_COMMAND_NOP) - { - eRet = adi_sense_GetCommandRunningState(hDevice, &bCommandRunning); - if (eRet) - return eRet; - - if (bCommandRunning) - return ADI_SENSE_IN_USE; - } - - commandReg.Special_Command = command; - WRITE_REG_U8(hDevice, commandReg.VALUE8, CORE_COMMAND); - - if (bWaitForCompletion) - { - do { - /* Allow a minimum 50usec delay for status update before checking */ - adi_sense_TimeDelayUsec(50); - - eRet = adi_sense_GetCommandRunningState(hDevice, &bCommandRunning); - if (eRet) - return eRet; - } while (bCommandRunning); - } - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_Shutdown( - ADI_SENSE_DEVICE_HANDLE const hDevice) -{ - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_POWER_DOWN, false); -} - - -ADI_SENSE_RESULT adi_sense_ApplyConfigUpdates( - ADI_SENSE_DEVICE_HANDLE const hDevice) -{ - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_LATCH_CONFIG, true); -} - -/*! - * @brief Start a measurement cycle. - * - * @param[out] - * - * @return Status - * - #ADI_SENSE_SUCCESS Call completed successfully. - * - #ADI_SENSE_FAILURE - * - * @details Sends the latch config command. Configuration for channels in - * conversion cycle should be completed before this function. - * Channel enabled bit should be set before this function. - * Starts a conversion and configures the format of the sample. - * - */ -ADI_SENSE_RESULT adi_sense_StartMeasurement( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_MEASUREMENT_MODE const eMeasurementMode) -{ - switch (eMeasurementMode) - { - case ADI_SENSE_MEASUREMENT_MODE_HEALTHCHECK: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_SYSTEM_CHECK, false); - case ADI_SENSE_MEASUREMENT_MODE_NORMAL: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_CONVERT_WITH_RAW, false); - case ADI_SENSE_MEASUREMENT_MODE_OMIT_RAW: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_CONVERT, false); - case ADI_SENSE_MEASUREMENT_MODE_FFT: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_CONVERT_FFT, false); - default: - ADI_SENSE_LOG_ERROR("Invalid measurement mode %d specified", - eMeasurementMode); - return ADI_SENSE_INVALID_PARAM; - } -} - -/* - * Store the configuration settings to persistent memory on the device. - * The settings can be saved to 4 different flash memory areas (slots). - * No other command must be running when this is called. - * Do not power down the device while this command is running. - */ -ADI_SENSE_RESULT adi_sense_SaveConfig( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_USER_CONFIG_SLOT const eSlotId) -{ - switch (eSlotId) - { - case ADI_SENSE_FLASH_CONFIG_1: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_SAVE_CONFIG_1, true); - case ADI_SENSE_FLASH_CONFIG_2: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_SAVE_CONFIG_2, true); - case ADI_SENSE_FLASH_CONFIG_3: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_SAVE_CONFIG_3, true); - case ADI_SENSE_FLASH_CONFIG_4: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_SAVE_CONFIG_4, true); - default: - ADI_SENSE_LOG_ERROR("Invalid user config target slot %d specified", - eSlotId); - return ADI_SENSE_INVALID_PARAM; - } -} - -/* - * Restore the configuration settings from persistent memory on the device. - * No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_RestoreConfig( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_USER_CONFIG_SLOT const eSlotId) -{ - switch (eSlotId) - { - case ADI_SENSE_FLASH_CONFIG_1: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_LOAD_CONFIG_1, true); - case ADI_SENSE_FLASH_CONFIG_2: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_LOAD_CONFIG_2, true); - case ADI_SENSE_FLASH_CONFIG_3: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_LOAD_CONFIG_3, true); - case ADI_SENSE_FLASH_CONFIG_4: - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_LOAD_CONFIG_4, true); - default: - ADI_SENSE_LOG_ERROR("Invalid user config source slot %d specified", - eSlotId); - return ADI_SENSE_INVALID_PARAM; - } -} - -/* - * Erase the entire external flash memory. - * No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_EraseExternalFlash( - ADI_SENSE_DEVICE_HANDLE const hDevice) -{ - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_ERASE_EXTERNAL_FLASH, true); -} - -/* - * Read the number of samples stored in external flash memory. - * No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_GetExternalFlashSampleCount( - ADI_SENSE_DEVICE_HANDLE const hDevice, - uint32_t * nSampleCount) -{ - ADI_ADISENSE_CORE_Ext_Flash_Sample_Count_t nCount; - - READ_REG_U32(hDevice, nCount.VALUE32, CORE_EXT_FLASH_SAMPLE_COUNT); - - *nSampleCount = nCount.VALUE32; - - return ADI_SENSE_SUCCESS; -} - -// DEBUG - TO BE DELETED -ADI_SENSE_RESULT adi_sense_SetExternalFlashIndex( - ADI_SENSE_DEVICE_HANDLE const hDevice, - uint32_t nStartIndex) -{ - WRITE_REG_U32(hDevice, nStartIndex, CORE_EXT_FLASH_INDEX); - - return ADI_SENSE_SUCCESS; -} - -/* - * Read a set of data samples stored in the device external flash memory. - * This may be called at any time. - */ -ADI_SENSE_RESULT adi_sense_GetExternalFlashData( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_DATA_SAMPLE * const pSamples, - uint32_t const nStartIndex, - uint32_t const nRequested, - uint32_t * const pnReturned) -{ - ADI_SENSE_DEVICE_CONTEXT *pCtx = hDevice; - uint16_t command = ADI_SENSE_1000_HOST_COMMS_READ_CMD | - (REG_ADISENSE_CORE_EXT_FLASH_DATA & ADI_SENSE_1000_HOST_COMMS_ADR_MASK); - uint8_t commandData[2] = { - command >> 8, - command & 0xFF - }; - uint8_t commandResponse[2]; - unsigned nValidSamples = 0; - ADI_SENSE_RESULT eRet = ADI_SENSE_SUCCESS; - - /* Setup initial sample */ - WRITE_REG_U32(hDevice, nStartIndex, CORE_EXT_FLASH_INDEX); - - /* Send flash read command */ - do { - eRet = adi_sense_SpiTransfer(pCtx->hSpi, commandData, commandResponse, - sizeof(command), false); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to send read command for external flash"); - return eRet; - } - - adi_sense_TimeDelayUsec(ADI_SENSE_1000_HOST_COMMS_XFER_DELAY); - } while ((commandResponse[0] != ADI_SENSE_1000_HOST_COMMS_CMD_RESP_0) || - (commandResponse[1] != ADI_SENSE_1000_HOST_COMMS_CMD_RESP_1)); - - /* Read samples from external flash memory */ - for (unsigned i = 0; i < nRequested; i++) - { - ADI_SENSE_1000_Sensor_Result_t sensorResult; - bool bHoldCs = true; - - /* Keep the CS signal asserted for all but the last sample */ - if ((i + 1) == nRequested) - bHoldCs = false; - - eRet = adi_sense_SpiTransfer(pCtx->hSpi, NULL, (uint8_t *) (&sensorResult), - 8, bHoldCs); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to read data from external flash"); - return eRet; - } - - ADI_SENSE_DATA_SAMPLE *pSample = &pSamples[nValidSamples]; - - pSample->status = (ADI_SENSE_DEVICE_STATUS_FLAGS)0; - if (sensorResult.Ch_Error) - pSample->status |= ADI_SENSE_DEVICE_STATUS_ERROR; - if (sensorResult.Ch_Alert) - pSample->status |= ADI_SENSE_DEVICE_STATUS_ALERT; - - if (sensorResult.Ch_Raw) - pSample->rawValue = sensorResult.Raw_Sample; - else - pSample->rawValue = 0; - - pSample->channelId = sensorResult.Channel_ID; - pSample->processedValue = sensorResult.Sensor_Result; - - nValidSamples++; - } - *pnReturned = nValidSamples; - - adi_sense_TimeDelayUsec(ADI_SENSE_1000_HOST_COMMS_XFER_DELAY); - - return eRet; -} - - -/* - * Store the LUT data to persistent memory on the device. - * No other command must be running when this is called. - * Do not power down the device while this command is running. - */ -ADI_SENSE_RESULT adi_sense_SaveLutData( - ADI_SENSE_DEVICE_HANDLE const hDevice) -{ - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_SAVE_LUT, true); -} - -/* - * Restore the LUT data from persistent memory on the device. - * No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_RestoreLutData( - ADI_SENSE_DEVICE_HANDLE const hDevice) -{ - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_LOAD_LUT, true); -} - -/* - * Stop the measurement cycles on the device. - * To be used only if a measurement command is currently running. - */ -ADI_SENSE_RESULT adi_sense_StopMeasurement( - ADI_SENSE_DEVICE_HANDLE const hDevice) -{ - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_NOP, true); -} - -/* - * Run built-in diagnostic checks on the device. - * Diagnostics are executed according to the current applied settings. - * No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_RunDiagnostics( - ADI_SENSE_DEVICE_HANDLE const hDevice) -{ - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_RUN_DIAGNOSTICS, true); -} - -/* - * Run self-calibration routines on the device. - * Calibration is executed according to the current applied settings. - * No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_RunCalibration( - ADI_SENSE_DEVICE_HANDLE const hDevice) -{ - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_SELF_CALIBRATION, true); -} - -/* - * Run digital calibration routines on the device. - * Calibration is executed according to the current applied settings. - * No other command must be running when this is called. - */ -ADI_SENSE_RESULT adi_sense_RunDigitalCalibration( - ADI_SENSE_DEVICE_HANDLE const hDevice) -{ - return executeCommand(hDevice, ADISENSE_CORE_COMMAND_CALIBRATE_DIGITAL, true); -} - -/* - * Read a set of data samples from the device. - * This may be called at any time. - */ -ADI_SENSE_RESULT adi_sense_GetData( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_MEASUREMENT_MODE const eMeasurementMode, - ADI_SENSE_DATA_SAMPLE * const pSamples, - uint8_t const nBytesPerSample, - uint32_t const nRequested, - uint32_t * const pnReturned) -{ - ADI_SENSE_1000_Sensor_Result_t sensorResult; - ADI_SENSE_DEVICE_CONTEXT *pCtx = hDevice; - uint16_t command = ADI_SENSE_1000_HOST_COMMS_READ_CMD | - (REG_ADISENSE_CORE_DATA_FIFO & ADI_SENSE_1000_HOST_COMMS_ADR_MASK); - uint8_t commandData[2] = { - command >> 8, - command & 0xFF - }; - uint8_t commandResponse[2]; - unsigned nValidSamples = 0; - ADI_SENSE_RESULT eRet = ADI_SENSE_SUCCESS; - - do { - eRet = adi_sense_SpiTransfer(pCtx->hSpi, commandData, commandResponse, - sizeof(command), false); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to send read command for FIFO register"); - return eRet; - } - adi_sense_TimeDelayUsec(ADI_SENSE_1000_HOST_COMMS_XFER_DELAY); - } while ((commandResponse[0] != ADI_SENSE_1000_HOST_COMMS_CMD_RESP_0) || - (commandResponse[1] != ADI_SENSE_1000_HOST_COMMS_CMD_RESP_1)); - - for (unsigned i = 0; i < nRequested; i++) - { - bool bHoldCs = true; - - /* Keep the CS signal asserted for all but the last sample */ - if ((i + 1) == nRequested) - bHoldCs = false; - - getDataCnt++; - - eRet = adi_sense_SpiTransfer(pCtx->hSpi, NULL, &sensorResult, - nBytesPerSample, bHoldCs); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to read data from FIFO register"); - return eRet; - } - - if (! sensorResult.Ch_Valid) - { - /* - * Reading an invalid sample indicates that there are no - * more samples available or we've lost sync with the device. - * In the latter case, it might be recoverable, but return here - * to let the application check the device status and decide itself. - */ - eRet = ADI_SENSE_INCOMPLETE; - break; - } - - ADI_SENSE_DATA_SAMPLE *pSample = &pSamples[nValidSamples]; - - pSample->status = (ADI_SENSE_DEVICE_STATUS_FLAGS)0; - if (sensorResult.Ch_Error) - pSample->status |= ADI_SENSE_DEVICE_STATUS_ERROR; - if (sensorResult.Ch_Alert) - pSample->status |= ADI_SENSE_DEVICE_STATUS_ALERT; - - if (sensorResult.Ch_Raw) - pSample->rawValue = sensorResult.Raw_Sample; - else - pSample->rawValue = 0; - - pSample->channelId = sensorResult.Channel_ID; - pSample->processedValue = sensorResult.Sensor_Result; - - nValidSamples++; - - adi_sense_TimeDelayUsec(ADI_SENSE_1000_HOST_COMMS_XFER_DELAY); - } - *pnReturned = nValidSamples; - - return eRet; -} - -/* - * Close the given ADISENSE device. - */ -ADI_SENSE_RESULT adi_sense_Close( - ADI_SENSE_DEVICE_HANDLE const hDevice) -{ - ADI_SENSE_DEVICE_CONTEXT *pCtx = hDevice; - - adi_sense_GpioClose(pCtx->hGpio); - adi_sense_SpiClose(pCtx->hSpi); - adi_sense_LogClose(); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_WriteRegister( - ADI_SENSE_DEVICE_HANDLE hDevice, - uint16_t nAddress, - void *pData, - unsigned nLength) -{ - ADI_SENSE_RESULT eRet; - ADI_SENSE_DEVICE_CONTEXT *pCtx = hDevice; - uint16_t command = ADI_SENSE_1000_HOST_COMMS_WRITE_CMD | - (nAddress & ADI_SENSE_1000_HOST_COMMS_ADR_MASK); - uint8_t commandData[2] = { - command >> 8, - command & 0xFF - }; - uint8_t commandResponse[2]; - - do { - eRet = adi_sense_SpiTransfer(pCtx->hSpi, commandData, commandResponse, - sizeof(command), false); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to send write command for register %u", - nAddress); - return eRet; - } - - adi_sense_TimeDelayUsec(ADI_SENSE_1000_HOST_COMMS_XFER_DELAY); - } while ((commandResponse[0] != ADI_SENSE_1000_HOST_COMMS_CMD_RESP_0) || - (commandResponse[1] != ADI_SENSE_1000_HOST_COMMS_CMD_RESP_1)); - - eRet = adi_sense_SpiTransfer(pCtx->hSpi, pData, NULL, nLength, false); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to write data (%dB) to register %u", - nLength, nAddress); - return eRet; - } - - adi_sense_TimeDelayUsec(ADI_SENSE_1000_HOST_COMMS_XFER_DELAY); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_ReadRegister( - ADI_SENSE_DEVICE_HANDLE hDevice, - uint16_t nAddress, - void *pData, - unsigned nLength) -{ - ADI_SENSE_RESULT eRet; - ADI_SENSE_DEVICE_CONTEXT *pCtx = hDevice; - uint16_t command = ADI_SENSE_1000_HOST_COMMS_READ_CMD | - (nAddress & ADI_SENSE_1000_HOST_COMMS_ADR_MASK); - uint8_t commandData[2] = { - command >> 8, - command & 0xFF - }; - uint8_t commandResponse[2]; - - do { - eRet = adi_sense_SpiTransfer(pCtx->hSpi, commandData, commandResponse, - sizeof(command), false); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to send read command for register %u", - nAddress); - return eRet; - } - - adi_sense_TimeDelayUsec(ADI_SENSE_1000_HOST_COMMS_XFER_DELAY); - } while ((commandResponse[0] != ADI_SENSE_1000_HOST_COMMS_CMD_RESP_0) || - (commandResponse[1] != ADI_SENSE_1000_HOST_COMMS_CMD_RESP_1)); - - eRet = adi_sense_SpiTransfer(pCtx->hSpi, NULL, pData, nLength, false); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to read data (%uB) from register %u", - nLength, nAddress); - return eRet; - } - - adi_sense_TimeDelayUsec(ADI_SENSE_1000_HOST_COMMS_XFER_DELAY); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_GetDeviceReadyState( - ADI_SENSE_DEVICE_HANDLE const hDevice, - bool * const bReady) -{ - ADI_ADISENSE_SPI_Chip_Type_t chipTypeReg; - - READ_REG_U8(hDevice, chipTypeReg.VALUE8, SPI_CHIP_TYPE); - /* If we read this register successfully, assume the device is ready */ - *bReady = (chipTypeReg.VALUE8 == REG_ADISENSE_SPI_CHIP_TYPE_RESET); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_GetDataReadyModeInfo( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_MEASUREMENT_MODE const eMeasurementMode, - ADI_SENSE_1000_OPERATING_MODE * const peOperatingMode, - ADI_SENSE_1000_DATAREADY_MODE * const peDataReadyMode, - uint32_t * const pnSamplesPerDataready, - uint32_t * const pnSamplesPerCycle, - uint8_t * const pnBytesPerSample) -{ - unsigned nChannelsEnabled = 0; - unsigned nSamplesPerCycle = 0; - - ADI_ADISENSE_CORE_Mode_t modeReg; - READ_REG_U8(hDevice, modeReg.VALUE8, CORE_MODE); - - if ((eMeasurementMode == ADI_SENSE_MEASUREMENT_MODE_HEALTHCHECK) || - (modeReg.Conversion_Mode == ADISENSE_CORE_MODE_SINGLECYCLE)) - *peOperatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE; - else if (modeReg.Conversion_Mode == ADISENSE_CORE_MODE_MULTICYCLE) - *peOperatingMode = ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE; - else - *peOperatingMode = ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS; - - - /* FFT mode is quite different to the other modes: - * - Each FFT result produces a batch of samples - * - The size of the batch depends on selected FFT size and output config options - * - DATAREADY will fire for each FFT result (once per channel) - * - The size of the cycle depends on the number of channels enabled for FFT - */ - if (eMeasurementMode == ADI_SENSE_MEASUREMENT_MODE_FFT) - { - ADI_ADISENSE_CORE_FFT_Config_t fftConfigReg; - - unsigned nFftChannels; - unsigned nSamplesPerChannel; - - READ_REG_U32(hDevice, fftConfigReg.VALUE32, CORE_FFT_CONFIG); - - nFftChannels = fftConfigReg.FFT_Num_Channels + 1; - - if (fftConfigReg.FFT_Output == ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_MAX16) - { - nSamplesPerChannel = 16; - *pnBytesPerSample = 8; - } - else if (fftConfigReg.FFT_Output == ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_FULL) - { - nSamplesPerChannel = (256 << fftConfigReg.FFT_Num_Bins) >> 1; - *pnBytesPerSample = 5; - } - else if (fftConfigReg.FFT_Output == ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_FULL_WITH_RAW) - { - nSamplesPerChannel = (256 << fftConfigReg.FFT_Num_Bins); - *pnBytesPerSample = 8; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid FFT output format option %d configured", - fftConfigReg.FFT_Output); - return ADI_SENSE_INVALID_PARAM; - } - - *pnSamplesPerDataready = nSamplesPerChannel; - *pnSamplesPerCycle = nSamplesPerChannel * nFftChannels; - - *peDataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE; - - if (modeReg.FFT_Mode == ADISENSE_CORE_MODE_FFT_MODE_CONTINUOUS) - { - *peOperatingMode = ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS; - } - else - { - *peOperatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE; - } - } - else - { - if (eMeasurementMode == ADI_SENSE_MEASUREMENT_MODE_OMIT_RAW) - { - *pnBytesPerSample = 5; - } - else - { - *pnBytesPerSample = 8; - } - - for (ADI_SENSE_1000_CHANNEL_ID chId = ADI_SENSE_1000_CHANNEL_ID_CJC_0; - chId < ADI_SENSE_1000_MAX_CHANNELS; - chId++) - { - ADI_ADISENSE_CORE_Sensor_Details_t sensorDetailsReg; - ADI_ADISENSE_CORE_Channel_Count_t channelCountReg; - - if (ADI_SENSE_1000_CHANNEL_IS_VIRTUAL(chId)) - continue; - - READ_REG_U8(hDevice, channelCountReg.VALUE8, CORE_CHANNEL_COUNTn(chId)); - READ_REG_U32(hDevice, sensorDetailsReg.VALUE32, CORE_SENSOR_DETAILSn(chId)); - - if (channelCountReg.Channel_Enable && !sensorDetailsReg.Do_Not_Publish) - { - ADI_ADISENSE_CORE_Sensor_Type_t sensorTypeReg; - unsigned nActualChannels = 1; - - READ_REG_U16(hDevice, sensorTypeReg.VALUE16, CORE_SENSOR_TYPEn(chId)); - - if (chId == ADI_SENSE_1000_CHANNEL_ID_SPI_0) - { - /* Some sensors automatically generate samples on additional "virtual" channels - * so these channels must be counted as active when those sensors are selected - * and we use the count from the corresponding "physical" channel */ - if ((sensorTypeReg.Sensor_Type >= - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_DEF_L1) && - (sensorTypeReg.Sensor_Type <= - ADISENSE_CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_ADV_L2)) - nActualChannels += 2; - } - - nChannelsEnabled += nActualChannels; - if (eMeasurementMode == ADI_SENSE_MEASUREMENT_MODE_HEALTHCHECK) - /* Assume a single sample per channel in test mode */ - nSamplesPerCycle += nActualChannels; - else - nSamplesPerCycle += nActualChannels * - (channelCountReg.Channel_Count + 1); - } - } - - if (nChannelsEnabled == 0) - { - *pnSamplesPerDataready = 0; - *pnSamplesPerCycle = 0; - return ADI_SENSE_SUCCESS; - } - - *pnSamplesPerCycle = nSamplesPerCycle; - - if (modeReg.Drdy_Mode == ADISENSE_CORE_MODE_DRDY_PER_CONVERSION) - { - *pnSamplesPerDataready = 1; - } - else if (modeReg.Drdy_Mode == ADISENSE_CORE_MODE_DRDY_PER_CYCLE) - { - *pnSamplesPerDataready = nSamplesPerCycle; - } - else - { - /* Assume DRDY will be asserted after max. 1 cycle in test mode */ - if (eMeasurementMode == ADI_SENSE_MEASUREMENT_MODE_HEALTHCHECK) - { - *pnSamplesPerDataready = nSamplesPerCycle; - } - else - { - ADI_ADISENSE_CORE_Fifo_Num_Cycles_t fifoNumCyclesReg; - READ_REG_U8(hDevice, fifoNumCyclesReg.VALUE8, CORE_FIFO_NUM_CYCLES); - - *pnSamplesPerDataready = - nSamplesPerCycle * fifoNumCyclesReg.Fifo_Num_Cycles; - } - } - - if (modeReg.Drdy_Mode == ADISENSE_CORE_MODE_DRDY_PER_CONVERSION) - *peDataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CONVERSION; - else if (modeReg.Drdy_Mode == ADISENSE_CORE_MODE_DRDY_PER_CYCLE) - *peDataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE; - else - { - /* Assume DRDY will be asserted after max. 1 cycle in test mode */ - if (eMeasurementMode == ADI_SENSE_MEASUREMENT_MODE_HEALTHCHECK) - *peDataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE; - else - *peDataReadyMode = ADI_SENSE_1000_DATAREADY_PER_MULTICYCLE_BURST; - } - } - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_GetProductID( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_PRODUCT_ID *pProductId) -{ - ADI_ADISENSE_SPI_Product_ID_L_t productIdLoReg; - ADI_ADISENSE_SPI_Product_ID_H_t productIdHiReg; - - READ_REG_U8(hDevice, productIdLoReg.VALUE8, SPI_PRODUCT_ID_L); - READ_REG_U8(hDevice, productIdHiReg.VALUE8, SPI_PRODUCT_ID_H); - - *pProductId = (ADI_SENSE_PRODUCT_ID)((productIdHiReg.VALUE8 << 8) - | productIdLoReg.VALUE8); - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetPowerMode( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_POWER_MODE powerMode) -{ - ADI_ADISENSE_CORE_Power_Config_t powerConfigReg; - - if (powerMode == ADI_SENSE_1000_POWER_MODE_LOW) - { - powerConfigReg.Power_Mode_ADC = ADISENSE_CORE_POWER_CONFIG_ADC_LOW_POWER; - } - else if (powerMode == ADI_SENSE_1000_POWER_MODE_MID) - { - powerConfigReg.Power_Mode_ADC = ADISENSE_CORE_POWER_CONFIG_ADC_MID_POWER; - } - else if (powerMode == ADI_SENSE_1000_POWER_MODE_FULL) - { - powerConfigReg.Power_Mode_ADC = ADISENSE_CORE_POWER_CONFIG_ADC_FULL_POWER; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid power mode %d specified", powerMode); - return ADI_SENSE_INVALID_PARAM; - } - - WRITE_REG_U8(hDevice, powerConfigReg.VALUE8, CORE_POWER_CONFIG); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetPowerConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_POWER_CONFIG *pPowerConfig) -{ - ADI_SENSE_RESULT eRet; - - eRet = adi_sense_SetPowerMode(hDevice, pPowerConfig->powerMode); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set power mode"); - return eRet; - } - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetMode( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_OPERATING_MODE eOperatingMode, - ADI_SENSE_1000_DATAREADY_MODE eDataReadyMode, - ADI_SENSE_1000_CALIBRATION_MODE eCalibrationMode, - bool bEnableExtFlash) -{ - ADI_ADISENSE_CORE_Mode_t modeReg; - - modeReg.VALUE8 = REG_RESET_VAL(CORE_MODE); - - if (eOperatingMode == ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE) - { - modeReg.Conversion_Mode = ADISENSE_CORE_MODE_SINGLECYCLE; - } - else if (eOperatingMode == ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS) - { - modeReg.Conversion_Mode = ADISENSE_CORE_MODE_CONTINUOUS; - } - else if (eOperatingMode == ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE) - { - modeReg.Conversion_Mode = ADISENSE_CORE_MODE_MULTICYCLE; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid operating mode %d specified", - eOperatingMode); - return ADI_SENSE_INVALID_PARAM; - } - - if (eDataReadyMode == ADI_SENSE_1000_DATAREADY_PER_CONVERSION) - { - modeReg.Drdy_Mode = ADISENSE_CORE_MODE_DRDY_PER_CONVERSION; - } - else if (eDataReadyMode == ADI_SENSE_1000_DATAREADY_PER_CYCLE) - { - modeReg.Drdy_Mode = ADISENSE_CORE_MODE_DRDY_PER_CYCLE; - } - else if (eDataReadyMode == ADI_SENSE_1000_DATAREADY_PER_MULTICYCLE_BURST) - { - if (eOperatingMode != ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE) - { - ADI_SENSE_LOG_ERROR( - "Data-ready mode %d cannot be used with operating mode %d", - eDataReadyMode, eOperatingMode); - return ADI_SENSE_INVALID_PARAM; - } - else - { - modeReg.Drdy_Mode = ADISENSE_CORE_MODE_DRDY_PER_FIFO_FILL; - } - } - else - { - ADI_SENSE_LOG_ERROR("Invalid data-ready mode %d specified", eDataReadyMode); - return ADI_SENSE_INVALID_PARAM; - } - - if (eCalibrationMode == ADI_SENSE_1000_NO_CALIBRATION) - { - modeReg.Calibration_Method = ADISENSE_CORE_MODE_NO_CAL; - } - else if (eCalibrationMode == ADI_SENSE_1000_DO_CALIBRATION) - { - modeReg.Calibration_Method = ADISENSE_CORE_MODE_DO_CAL; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid calibration mode %d specified", - eCalibrationMode); - return ADI_SENSE_INVALID_PARAM; - } - - modeReg.Ext_Flash_Store = (bEnableExtFlash ? - ADISENSE_CORE_MODE_EXT_FLASH_USED : - ADISENSE_CORE_MODE_EXT_FLASH_NOT_USED); - - WRITE_REG_U8(hDevice, modeReg.VALUE8, CORE_MODE); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_SetCycleControl( - ADI_SENSE_DEVICE_HANDLE hDevice, - uint32_t nCycleInterval, - -#ifdef __V2_3_CFG_FMT__ - ADI_SENSE_1000_CYCLE_TYPE eCycleType, - ADI_SENSE_1000_FILTER_SETTLING eFilterSettling) -#else - ADI_SENSE_1000_CYCLE_TYPE eCycleType) -#endif -{ - ADI_ADISENSE_CORE_Cycle_Control_t cycleControlReg; - - cycleControlReg.VALUE16 = REG_RESET_VAL(CORE_CYCLE_CONTROL); - - if (nCycleInterval < (1 << 12)) - { - cycleControlReg.Cycle_Time_Units = ADISENSE_CORE_CYCLE_CONTROL_MICROSECONDS; - } - else if (nCycleInterval < (1000 * (1 << 12))) - { - cycleControlReg.Cycle_Time_Units = ADISENSE_CORE_CYCLE_CONTROL_MILLISECONDS; - nCycleInterval /= 1000; - } - else - { - cycleControlReg.Cycle_Time_Units = ADISENSE_CORE_CYCLE_CONTROL_SECONDS; - nCycleInterval /= 1000000; - } - - CHECK_REG_FIELD_VAL(CORE_CYCLE_CONTROL_CYCLE_TIME, nCycleInterval); - cycleControlReg.Cycle_Time = nCycleInterval; - - if (eCycleType == ADI_SENSE_1000_CYCLE_TYPE_SWITCH) - { - cycleControlReg.Cycle_Type = ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TYPE_SWITCH; - } - else if (eCycleType == ADI_SENSE_1000_CYCLE_TYPE_FULL) - { - cycleControlReg.Cycle_Type = ADISENSE_CORE_CYCLE_CONTROL_CYCLE_TYPE_FULL; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid cycle type %d specified", eCycleType); - return ADI_SENSE_INVALID_PARAM; - } - -#ifdef __V2_3_CFG_FMT__ - if (eFilterSettling == ADI_SENSE_1000_FILTER_SETTLING_ALWAYS) - { - cycleControlReg.Filter_Settling = ADISENSE_CORE_CYCLE_CONTROL_FILTER_SETTLING_SETTLED; - } - else if (eFilterSettling == ADI_SENSE_1000_FILTER_SETTLING_FAST) - { - cycleControlReg.Filter_Settling = ADISENSE_CORE_CYCLE_CONTROL_FILTER_SETTLING_FAST; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid filter settling option %d specified", eFilterSettling); - return ADI_SENSE_INVALID_PARAM; - } -#endif - - WRITE_REG_U16(hDevice, cycleControlReg.VALUE16, CORE_CYCLE_CONTROL); - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetMultiCycleConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_MULTICYCLE_CONFIG *pMultiCycleConfig) -{ - CHECK_REG_FIELD_VAL(CORE_FIFO_NUM_CYCLES_FIFO_NUM_CYCLES, - pMultiCycleConfig->cyclesPerBurst); - - WRITE_REG_U8(hDevice, pMultiCycleConfig->cyclesPerBurst, - CORE_FIFO_NUM_CYCLES); - - WRITE_REG_U32(hDevice, pMultiCycleConfig->burstInterval, - CORE_MULTI_CYCLE_REPEAT_INTERVAL); - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetExternalReferenceValues( - ADI_SENSE_DEVICE_HANDLE hDevice, - float32_t externalRef1Value, - float32_t externalRef2Value) -{ - WRITE_REG_FLOAT(hDevice, externalRef1Value, CORE_EXTERNAL_REFERENCE1); - WRITE_REG_FLOAT(hDevice, externalRef2Value, CORE_EXTERNAL_REFERENCE2); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetMeasurementConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_MEASUREMENT_CONFIG *pMeasConfig) -{ - ADI_SENSE_RESULT eRet; - - eRet = adi_sense_SetMode(hDevice, - pMeasConfig->operatingMode, - pMeasConfig->dataReadyMode, - pMeasConfig->calibrationMode, - pMeasConfig->enableExternalFlash); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set operating mode"); - return eRet; - } - - eRet = adi_sense_SetCycleControl(hDevice, - pMeasConfig->cycleInterval, - pMeasConfig->cycleType); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set cycle control"); - return eRet; - } - - if (pMeasConfig->operatingMode == ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE) - { - eRet = adi_sense_SetMultiCycleConfig(hDevice, - &pMeasConfig->multiCycleConfig); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set multi-cycle configuration"); - return eRet; - } - } - - eRet = adi_sense_SetExternalReferenceValues(hDevice, - pMeasConfig->externalRef1Value, - pMeasConfig->externalRef2Value); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set external reference values"); - return eRet; - } - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetDiagnosticsConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_DIAGNOSTICS_CONFIG *pDiagnosticsConfig) -{ - ADI_ADISENSE_CORE_Diagnostics_Control_t diagnosticsControlReg; - - diagnosticsControlReg.VALUE16 = REG_RESET_VAL(CORE_DIAGNOSTICS_CONTROL); - - if (pDiagnosticsConfig->disableGlobalDiag) - diagnosticsControlReg.Diag_Global_En = 0; - else - diagnosticsControlReg.Diag_Global_En = 1; - - if (pDiagnosticsConfig->disableMeasurementDiag) - diagnosticsControlReg.Diag_Meas_En = 0; - else - diagnosticsControlReg.Diag_Meas_En = 1; - - switch (pDiagnosticsConfig->osdFrequency) - { - case ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_DISABLED: - diagnosticsControlReg.Diag_OSD_Freq = ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_OFF; - break; - case ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_PER_CYCLE: - diagnosticsControlReg.Diag_OSD_Freq = ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_PER_1_CYCLE; - break; - case ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_PER_100_CYCLES: - diagnosticsControlReg.Diag_OSD_Freq = ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_PER_100_CYCLES; - break; - case ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_PER_1000_CYCLES: - diagnosticsControlReg.Diag_OSD_Freq = ADISENSE_CORE_DIAGNOSTICS_CONTROL_OCD_PER_1000_CYCLES; - break; - default: - ADI_SENSE_LOG_ERROR("Invalid open-sensor diagnostic frequency %d specified", - pDiagnosticsConfig->osdFrequency); - return ADI_SENSE_INVALID_PARAM; - } - - WRITE_REG_U16(hDevice, diagnosticsControlReg.VALUE16, CORE_DIAGNOSTICS_CONTROL); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetFftConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_FFT_CONFIG *pFftConfig, - ADI_SENSE_1000_CHANNEL_CONFIG *pChannels) -{ - ADI_ADISENSE_CORE_FFT_Config_t fftConfigReg; - ADI_ADISENSE_CORE_Mode_t modeReg; - uint32_t numFftChannels = 0; - - fftConfigReg.VALUE32 = REG_RESET_VAL(CORE_FFT_CONFIG); - - for (ADI_SENSE_1000_CHANNEL_ID id = ADI_SENSE_1000_CHANNEL_ID_CJC_0; - id < ADI_SENSE_1000_MAX_CHANNELS; - id++) - { - if (pChannels[id].enableFFT) - { - if (numFftChannels >= 4) /* TODO - temporary limit */ - { - ADI_SENSE_LOG_ERROR("Maximum limit of 4 FFT channels exceeded"); - return ADI_SENSE_INVALID_PARAM; - } - - numFftChannels++; - } - } - - if (numFftChannels > 0) - { - fftConfigReg.FFT_Num_Channels = numFftChannels - 1; - - switch (pFftConfig->size) - { - case ADI_SENSE_1000_FFT_SIZE_256: - fftConfigReg.FFT_Num_Bins = ADISENSE_CORE_FFT_CONFIG_FFT_BINS_256; - break; - case ADI_SENSE_1000_FFT_SIZE_512: - fftConfigReg.FFT_Num_Bins = ADISENSE_CORE_FFT_CONFIG_FFT_BINS_512; - break; - case ADI_SENSE_1000_FFT_SIZE_1024: - fftConfigReg.FFT_Num_Bins = ADISENSE_CORE_FFT_CONFIG_FFT_BINS_1024; - break; - case ADI_SENSE_1000_FFT_SIZE_2048: - fftConfigReg.FFT_Num_Bins = ADISENSE_CORE_FFT_CONFIG_FFT_BINS_2048; - break; - default: - ADI_SENSE_LOG_ERROR("Invalid FFT size option %d specified", - pFftConfig->size); - return ADI_SENSE_INVALID_PARAM; - } - - switch (pFftConfig->window) - { - case ADI_SENSE_1000_FFT_WINDOW_NONE: - fftConfigReg.FFT_Window = ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW_NONE; - break; - case ADI_SENSE_1000_FFT_WINDOW_HANN: - fftConfigReg.FFT_Window = ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW_HANN; - break; - case ADI_SENSE_1000_FFT_WINDOW_BLACKMAN_HARRIS: - fftConfigReg.FFT_Window = ADISENSE_CORE_FFT_CONFIG_FFT_WINDOW_BLACKMANN_HARRIS; - break; - default: - ADI_SENSE_LOG_ERROR("Invalid FFT window option %d specified", - pFftConfig->window); - return ADI_SENSE_INVALID_PARAM; - } - - switch (pFftConfig->output) - { - case ADI_SENSE_1000_FFT_OUTPUT_FULL: - fftConfigReg.FFT_Output = ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_FULL; - break; - case ADI_SENSE_1000_FFT_OUTPUT_MAX16: - fftConfigReg.FFT_Output = ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_MAX16; - break; - case ADI_SENSE_1000_FFT_OUTPUT_FULL_WITH_RAW: - fftConfigReg.FFT_Output = ADISENSE_CORE_FFT_CONFIG_FFT_OUTPUT_FULL_WITH_RAW; - break; - default: - ADI_SENSE_LOG_ERROR("Invalid FFT output format option %d specified", - pFftConfig->output); - return ADI_SENSE_INVALID_PARAM; - } - } - WRITE_REG_U32(hDevice, fftConfigReg.VALUE32, CORE_FFT_CONFIG); - - if (numFftChannels > 0) - { - READ_REG_U8(hDevice, modeReg.VALUE8, CORE_MODE); - - if (pFftConfig->mode == ADI_SENSE_1000_FFT_MODE_SINGLE) - { - modeReg.FFT_Mode = ADISENSE_CORE_MODE_FFT_MODE_SINGLE; - } - else if (pFftConfig->mode == ADI_SENSE_1000_FFT_MODE_CONTINUOUS) - { - modeReg.FFT_Mode = ADISENSE_CORE_MODE_FFT_MODE_CONTINUOUS; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid FFT mode %d specified", - pFftConfig->mode); - return ADI_SENSE_INVALID_PARAM; - } - - WRITE_REG_U8(hDevice, modeReg.VALUE8, CORE_MODE); - } - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetChannelCount( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - uint32_t nMeasurementsPerCycle) -{ - ADI_ADISENSE_CORE_Channel_Count_t channelCountReg; - - channelCountReg.VALUE8 = REG_RESET_VAL(CORE_CHANNEL_COUNTn); - - if (nMeasurementsPerCycle > 0) - { - nMeasurementsPerCycle -= 1; - - CHECK_REG_FIELD_VAL(CORE_CHANNEL_COUNT_CHANNEL_COUNT, - nMeasurementsPerCycle); - - channelCountReg.Channel_Enable = 1; - channelCountReg.Channel_Count = nMeasurementsPerCycle; - } - else - { - channelCountReg.Channel_Enable = 0; - } - - WRITE_REG_U8(hDevice, channelCountReg.VALUE8, CORE_CHANNEL_COUNTn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetChannelOptions( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_CHANNEL_PRIORITY ePriority, - bool bEnableFft) -{ - ADI_ADISENSE_CORE_Channel_Options_t channelOptionsReg; - - channelOptionsReg.VALUE8 = REG_RESET_VAL(CORE_CHANNEL_OPTIONSn); - - CHECK_REG_FIELD_VAL(CORE_CHANNEL_OPTIONS_CHANNEL_PRIORITY, ePriority); - channelOptionsReg.Channel_Priority = ePriority; - channelOptionsReg.FFT_Enable_Ch = bEnableFft ? 1 : 0; - - WRITE_REG_U8(hDevice, channelOptionsReg.VALUE8, CORE_CHANNEL_OPTIONSn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetChannelSkipCount( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - uint32_t nCycleSkipCount) -{ - ADI_ADISENSE_CORE_Channel_Skip_t channelSkipReg; - - channelSkipReg.VALUE16 = REG_RESET_VAL(CORE_CHANNEL_SKIPn); - - CHECK_REG_FIELD_VAL(CORE_CHANNEL_SKIP_CHANNEL_SKIP, nCycleSkipCount); - - channelSkipReg.Channel_Skip = nCycleSkipCount; - - WRITE_REG_U16(hDevice, channelSkipReg.VALUE16, CORE_CHANNEL_SKIPn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetChannelAdcSensorType( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_ADC_SENSOR_TYPE sensorType) -{ - ADI_ADISENSE_CORE_Sensor_Type_t sensorTypeReg; - - sensorTypeReg.VALUE16 = REG_RESET_VAL(CORE_SENSOR_TYPEn); - - /* Ensure that the sensor type is valid for this channel */ - switch(sensorType) - { - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_1_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_2_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_3_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_4_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_J_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_K_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_T_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_1_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_2_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_3_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_4_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_1_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_2_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_3_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_4_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_1_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_2_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_3_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_4_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_1_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_2_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_3_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_4_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_1_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_2_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_3_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_BRIDGE_6WIRE_4_ADV_L2: - if (! ADI_SENSE_1000_CHANNEL_IS_ADC_SENSOR(eChannelId)) - { - ADI_SENSE_LOG_ERROR( - "Invalid ADC sensor type %d specified for channel %d", - sensorType, eChannelId); - return ADI_SENSE_INVALID_PARAM; - } - break; - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT1000_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_1_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_2_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_3_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_4_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT1000_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_1_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_2_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_3_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_4_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_PT100_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_PT1000_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_1_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_2_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_3_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_4_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_PT100_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_PT1000_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_1_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_2_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_3_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_3WIRE_4_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_PT100_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_PT1000_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_1_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_2_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_3_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_4_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_PT100_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_PT1000_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_1_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_2_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_3_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_RTD_4WIRE_4_ADV_L2: - if (!ADI_SENSE_1000_CHANNEL_IS_ADC_CJC(eChannelId)) - { - ADI_SENSE_LOG_ERROR( - "Invalid ADC sensor type %d specified for channel %d", - sensorType, eChannelId); - return ADI_SENSE_INVALID_PARAM; - } - break; - case ADI_SENSE_1000_ADC_SENSOR_DIODE_2C_TYPEA_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_DIODE_3C_TYPEA_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_DIODE_2C_1_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_DIODE_3C_1_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_DIODE_2C_TYPEA_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_DIODE_3C_TYPEA_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_DIODE_2C_1_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_DIODE_3C_1_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_A_10K_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_B_10K_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_1_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_2_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_3_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_4_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_A_10K_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_B_10K_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_1_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_2_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_3_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_THERMISTOR_4_ADV_L2: - if (! (ADI_SENSE_1000_CHANNEL_IS_ADC_SENSOR(eChannelId) || - ADI_SENSE_1000_CHANNEL_IS_ADC_CJC(eChannelId))) - { - ADI_SENSE_LOG_ERROR( - "Invalid ADC sensor type %d specified for channel %d", - sensorType, eChannelId); - return ADI_SENSE_INVALID_PARAM; - } - break; - case ADI_SENSE_1000_ADC_SENSOR_VOLTAGE: - case ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_B_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_1_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_2_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_A_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_B_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_1_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_2_ADV_L2: - if (! ADI_SENSE_1000_CHANNEL_IS_ADC_VOLTAGE(eChannelId)) - { - ADI_SENSE_LOG_ERROR( - "Invalid ADC sensor type %d specified for channel %d", - sensorType, eChannelId); - return ADI_SENSE_INVALID_PARAM; - } - break; - case ADI_SENSE_1000_ADC_SENSOR_CURRENT: - case ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1: - case ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_1_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_2_DEF_L2: - case ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_A_ADV_L1: - case ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_1_ADV_L2: - case ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_2_ADV_L2: - if (! ADI_SENSE_1000_CHANNEL_IS_ADC_CURRENT(eChannelId)) - { - ADI_SENSE_LOG_ERROR( - "Invalid ADC sensor type %d specified for channel %d", - sensorType, eChannelId); - return ADI_SENSE_INVALID_PARAM; - } - break; - default: - ADI_SENSE_LOG_ERROR("Invalid/unsupported ADC sensor type %d specified", - sensorType); - return ADI_SENSE_INVALID_PARAM; - } - - sensorTypeReg.Sensor_Type = sensorType; - - WRITE_REG_U16(hDevice, sensorTypeReg.VALUE16, CORE_SENSOR_TYPEn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetChannelAdcSensorDetails( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_CHANNEL_CONFIG *pChannelConfig) -/* - * TODO - it would be nice if the general- vs. ADC-specific sensor details could be split into separate registers - * General details: - * - Measurement_Units - * - Compensation_Channel - * - CJC_Publish (if "CJC" was removed from the name) - * ADC-specific details: - * - PGA_Gain - * - Reference_Select - * - Reference_Buffer_Disable - * - Vbias - */ -{ - ADI_SENSE_1000_ADC_CHANNEL_CONFIG *pAdcChannelConfig = &pChannelConfig->adcChannelConfig; - ADI_SENSE_1000_ADC_REFERENCE_CONFIG *pRefConfig = &pAdcChannelConfig->reference; - ADI_ADISENSE_CORE_Sensor_Details_t sensorDetailsReg; - - sensorDetailsReg.VALUE32 = REG_RESET_VAL(CORE_SENSOR_DETAILSn); - - switch(pChannelConfig->measurementUnit) - { - case ADI_SENSE_1000_MEASUREMENT_UNIT_FAHRENHEIT: - sensorDetailsReg.Measurement_Units = ADISENSE_CORE_SENSOR_DETAILS_UNITS_DEGF; - break; - case ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS: - sensorDetailsReg.Measurement_Units = ADISENSE_CORE_SENSOR_DETAILS_UNITS_DEGC; - break; - case ADI_SENSE_1000_MEASUREMENT_UNIT_UNSPECIFIED: - sensorDetailsReg.Measurement_Units = ADISENSE_CORE_SENSOR_DETAILS_UNITS_UNSPECIFIED; - break; - default: - ADI_SENSE_LOG_ERROR("Invalid measurement unit %d specified", - pChannelConfig->measurementUnit); - return ADI_SENSE_INVALID_PARAM; - } - - if (pChannelConfig->compensationChannel == ADI_SENSE_1000_CHANNEL_ID_NONE) - { - sensorDetailsReg.Compensation_Disable = 1; - sensorDetailsReg.Compensation_Channel = 0; - } - else - { - sensorDetailsReg.Compensation_Disable = 0; - sensorDetailsReg.Compensation_Channel = pChannelConfig->compensationChannel; - } - - switch(pRefConfig->type) - { - case ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1: - sensorDetailsReg.Reference_Select = ADISENSE_CORE_SENSOR_DETAILS_REF_RINT1; - break; - case ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_2: - sensorDetailsReg.Reference_Select = ADISENSE_CORE_SENSOR_DETAILS_REF_RINT2; - break; - case ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL: - sensorDetailsReg.Reference_Select = ADISENSE_CORE_SENSOR_DETAILS_REF_INT; - break; - case ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_AVDD: - sensorDetailsReg.Reference_Select = ADISENSE_CORE_SENSOR_DETAILS_REF_AVDD; - break; - case ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_EXTERNAL_1: - sensorDetailsReg.Reference_Select = ADISENSE_CORE_SENSOR_DETAILS_REF_REXT1; - break; - case ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_EXTERNAL_2: - sensorDetailsReg.Reference_Select = ADISENSE_CORE_SENSOR_DETAILS_REF_REXT2; - break; - case ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_EXTERNAL_1: - sensorDetailsReg.Reference_Select = ADISENSE_CORE_SENSOR_DETAILS_REF_VEXT1; - break; - case ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_EXTERNAL_2: - sensorDetailsReg.Reference_Select = ADISENSE_CORE_SENSOR_DETAILS_REF_VEXT2; - break; - case ADI_SENSE_1000_ADC_REFERENCE_BRIDGE_EXCITATION: - sensorDetailsReg.Reference_Select = ADISENSE_CORE_SENSOR_DETAILS_REF_EXC; - break; - default: - ADI_SENSE_LOG_ERROR("Invalid ADC reference type %d specified", - pRefConfig->type); - return ADI_SENSE_INVALID_PARAM; - } - - switch(pAdcChannelConfig->gain) - { - case ADI_SENSE_1000_ADC_GAIN_1X: - sensorDetailsReg.PGA_Gain = ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_1; - break; - case ADI_SENSE_1000_ADC_GAIN_2X: - sensorDetailsReg.PGA_Gain = ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_2; - break; - case ADI_SENSE_1000_ADC_GAIN_4X: - sensorDetailsReg.PGA_Gain = ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_4; - break; - case ADI_SENSE_1000_ADC_GAIN_8X: - sensorDetailsReg.PGA_Gain = ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_8; - break; - case ADI_SENSE_1000_ADC_GAIN_16X: - sensorDetailsReg.PGA_Gain = ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_16; - break; - case ADI_SENSE_1000_ADC_GAIN_32X: - sensorDetailsReg.PGA_Gain = ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_32; - break; - case ADI_SENSE_1000_ADC_GAIN_64X: - sensorDetailsReg.PGA_Gain = ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_64; - break; - case ADI_SENSE_1000_ADC_GAIN_128X: - sensorDetailsReg.PGA_Gain = ADISENSE_CORE_SENSOR_DETAILS_PGA_GAIN_128; - break; - default: - ADI_SENSE_LOG_ERROR("Invalid ADC gain %d specified", - pAdcChannelConfig->gain); - return ADI_SENSE_INVALID_PARAM; - } - - if (pAdcChannelConfig->enableVbias) - sensorDetailsReg.Vbias = 1; - else - sensorDetailsReg.Vbias = 0; - - if (pAdcChannelConfig->reference.disableBuffer) - sensorDetailsReg.Reference_Buffer_Disable = 1; - else - sensorDetailsReg.Reference_Buffer_Disable = 0; - - if (pChannelConfig->disablePublishing) - sensorDetailsReg.Do_Not_Publish = 1; - else - sensorDetailsReg.Do_Not_Publish = 0; - - if (pChannelConfig->enableUnityLut) - sensorDetailsReg.Unity_LUT_Select = 1; - else - sensorDetailsReg.Unity_LUT_Select = 0; - - WRITE_REG_U32(hDevice, sensorDetailsReg.VALUE32, CORE_SENSOR_DETAILSn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetChannelAdcFilter( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_ADC_FILTER_CONFIG *pFilterConfig) -{ - ADI_ADISENSE_CORE_Filter_Select_t filterSelectReg; - - filterSelectReg.VALUE32 = REG_RESET_VAL(CORE_FILTER_SELECTn); - - if (pFilterConfig->type == ADI_SENSE_1000_ADC_FILTER_SINC4) - { - filterSelectReg.ADC_Filter_Type = ADISENSE_CORE_FILTER_SELECT_FILTER_SINC4; - filterSelectReg.ADC_FS = pFilterConfig->fs; - } - else if (pFilterConfig->type == ADI_SENSE_1000_ADC_FILTER_FIR_20SPS) - { - filterSelectReg.ADC_Filter_Type = ADISENSE_CORE_FILTER_SELECT_FILTER_FIR_20SPS; - } - else if (pFilterConfig->type == ADI_SENSE_1000_ADC_FILTER_FIR_25SPS) - { - filterSelectReg.ADC_Filter_Type = ADISENSE_CORE_FILTER_SELECT_FILTER_FIR_25SPS; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid ADC filter type %d specified", - pFilterConfig->type); - return ADI_SENSE_INVALID_PARAM; - } - - WRITE_REG_U32(hDevice, filterSelectReg.VALUE32, CORE_FILTER_SELECTn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetChannelAdcCurrentConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_ADC_EXC_CURRENT_CONFIG *pCurrentConfig) -{ - ADI_ADISENSE_CORE_Channel_Excitation_t channelExcitationReg; - - channelExcitationReg.VALUE8 = REG_RESET_VAL(CORE_CHANNEL_EXCITATIONn); - - if (pCurrentConfig->outputLevel == ADI_SENSE_1000_ADC_EXC_CURRENT_NONE) - { - channelExcitationReg.IOUT_Excitation_Current = ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_OFF; - } - else - { - if (pCurrentConfig->outputLevel == ADI_SENSE_1000_ADC_EXC_CURRENT_50uA) - channelExcitationReg.IOUT_Excitation_Current = ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_50UA; - else if (pCurrentConfig->outputLevel == ADI_SENSE_1000_ADC_EXC_CURRENT_100uA) - channelExcitationReg.IOUT_Excitation_Current = ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_100UA; - else if (pCurrentConfig->outputLevel == ADI_SENSE_1000_ADC_EXC_CURRENT_250uA) - channelExcitationReg.IOUT_Excitation_Current = ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_250UA; - else if (pCurrentConfig->outputLevel == ADI_SENSE_1000_ADC_EXC_CURRENT_500uA) - channelExcitationReg.IOUT_Excitation_Current = ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_500UA; - else if (pCurrentConfig->outputLevel == ADI_SENSE_1000_ADC_EXC_CURRENT_750uA) - channelExcitationReg.IOUT_Excitation_Current = ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_750UA; - else if (pCurrentConfig->outputLevel == ADI_SENSE_1000_ADC_EXC_CURRENT_1000uA) - channelExcitationReg.IOUT_Excitation_Current = ADISENSE_CORE_CHANNEL_EXCITATION_IEXC_1000UA; - else - { - ADI_SENSE_LOG_ERROR("Invalid ADC excitation current %d specified", - pCurrentConfig->outputLevel); - return ADI_SENSE_INVALID_PARAM; - } - } - - if (pCurrentConfig->diodeRatio == ADI_SENSE_1000_ADC_EXC_CURRENT_IOUT_DIODE_DEFAULT) - { - channelExcitationReg.IOUT_Diode_Ratio = 0; - } - else - { - channelExcitationReg.IOUT_Diode_Ratio = 1; - } - - WRITE_REG_U8(hDevice, channelExcitationReg.VALUE8, CORE_CHANNEL_EXCITATIONn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_SetAdcChannelConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_CHANNEL_CONFIG *pChannelConfig) -{ - ADI_SENSE_RESULT eRet; - ADI_SENSE_1000_ADC_CHANNEL_CONFIG *pAdcChannelConfig = - &pChannelConfig->adcChannelConfig; - - eRet = adi_sense_SetChannelAdcSensorType(hDevice, eChannelId, - pAdcChannelConfig->sensor); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set ADC sensor type for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetChannelAdcSensorDetails(hDevice, eChannelId, - pChannelConfig); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set ADC sensor details for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetChannelAdcFilter(hDevice, eChannelId, - &pAdcChannelConfig->filter); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set ADC filter for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetChannelAdcCurrentConfig(hDevice, eChannelId, - &pAdcChannelConfig->current); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set ADC current for channel %d", - eChannelId); - return eRet; - } - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetChannelDigitalSensorDetails( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_CHANNEL_CONFIG *pChannelConfig) -{ - ADI_ADISENSE_CORE_Sensor_Details_t sensorDetailsReg; - - sensorDetailsReg.VALUE32 = REG_RESET_VAL(CORE_SENSOR_DETAILSn); - - if (pChannelConfig->compensationChannel == ADI_SENSE_1000_CHANNEL_ID_NONE) - { - sensorDetailsReg.Compensation_Disable = 1; - sensorDetailsReg.Compensation_Channel = 0; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid compensation channel specified for digital sensor"); - return ADI_SENSE_INVALID_PARAM; - } - - if (pChannelConfig->measurementUnit == ADI_SENSE_1000_MEASUREMENT_UNIT_UNSPECIFIED) - { - sensorDetailsReg.Measurement_Units = ADISENSE_CORE_SENSOR_DETAILS_UNITS_UNSPECIFIED; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid measurement unit specified for digital channel"); - return ADI_SENSE_INVALID_PARAM; - } - - if (pChannelConfig->disablePublishing) - sensorDetailsReg.Do_Not_Publish = 1; - else - sensorDetailsReg.Do_Not_Publish = 0; - - if (pChannelConfig->enableUnityLut) - sensorDetailsReg.Unity_LUT_Select = 1; - else - sensorDetailsReg.Unity_LUT_Select = 0; - - sensorDetailsReg.Vbias = 0; - sensorDetailsReg.Reference_Buffer_Disable = 1; - - WRITE_REG_U32(hDevice, sensorDetailsReg.VALUE32, CORE_SENSOR_DETAILSn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetDigitalSensorCommands( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND *pConfigCommand, - ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND *pDataRequestCommand) -{ - ADI_ADISENSE_CORE_Digital_Sensor_Num_Cmds_t numCmdsReg; - - numCmdsReg.VALUE8 = REG_RESET_VAL(CORE_DIGITAL_SENSOR_NUM_CMDSn); - - CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_CFG_CMDS, - pConfigCommand->commandLength); - CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_READ_CMDS, - pDataRequestCommand->commandLength); - - numCmdsReg.Digital_Sensor_Num_Cfg_Cmds = pConfigCommand->commandLength; - numCmdsReg.Digital_Sensor_Num_Read_Cmds = pDataRequestCommand->commandLength; - - WRITE_REG_U8(hDevice, numCmdsReg.VALUE8, - CORE_DIGITAL_SENSOR_NUM_CMDSn(eChannelId)); - - /* - * NOTE - the fall-through cases in the switch statement below are - * intentional, so temporarily disable related compiler warnings which may - * be produced here by GCC - */ -#ifndef __CC_ARM -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" -#endif - - switch (pConfigCommand->commandLength) - { - case 7: - WRITE_REG_U8(hDevice, pConfigCommand->command[6], - CORE_DIGITAL_SENSOR_COMMAND7n(eChannelId)); - case 6: - WRITE_REG_U8(hDevice, pConfigCommand->command[5], - CORE_DIGITAL_SENSOR_COMMAND6n(eChannelId)); - case 5: - WRITE_REG_U8(hDevice, pConfigCommand->command[4], - CORE_DIGITAL_SENSOR_COMMAND5n(eChannelId)); - case 4: - WRITE_REG_U8(hDevice, pConfigCommand->command[3], - CORE_DIGITAL_SENSOR_COMMAND4n(eChannelId)); - case 3: - WRITE_REG_U8(hDevice, pConfigCommand->command[2], - CORE_DIGITAL_SENSOR_COMMAND3n(eChannelId)); - case 2: - WRITE_REG_U8(hDevice, pConfigCommand->command[1], - CORE_DIGITAL_SENSOR_COMMAND2n(eChannelId)); - case 1: - WRITE_REG_U8(hDevice, pConfigCommand->command[0], - CORE_DIGITAL_SENSOR_COMMAND1n(eChannelId)); - case 0: - default: - break; - }; - - switch (pDataRequestCommand->commandLength) - { - case 7: - WRITE_REG_U8(hDevice, pDataRequestCommand->command[6], - CORE_DIGITAL_SENSOR_READ_CMD7n(eChannelId)); - case 6: - WRITE_REG_U8(hDevice, pDataRequestCommand->command[5], - CORE_DIGITAL_SENSOR_READ_CMD6n(eChannelId)); - case 5: - WRITE_REG_U8(hDevice, pDataRequestCommand->command[4], - CORE_DIGITAL_SENSOR_READ_CMD5n(eChannelId)); - case 4: - WRITE_REG_U8(hDevice, pDataRequestCommand->command[3], - CORE_DIGITAL_SENSOR_READ_CMD4n(eChannelId)); - case 3: - WRITE_REG_U8(hDevice, pDataRequestCommand->command[2], - CORE_DIGITAL_SENSOR_READ_CMD3n(eChannelId)); - case 2: - WRITE_REG_U8(hDevice, pDataRequestCommand->command[1], - CORE_DIGITAL_SENSOR_READ_CMD2n(eChannelId)); - case 1: - WRITE_REG_U8(hDevice, pDataRequestCommand->command[0], - CORE_DIGITAL_SENSOR_READ_CMD1n(eChannelId)); - case 0: - default: - break; - }; - - /* Re-enable the implicit-fallthrough warning */ -#ifndef __CC_ARM -#pragma GCC diagnostic pop -#endif - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetDigitalSensorFormat( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_DIGITAL_SENSOR_DATA_FORMAT *pDataFormat) -{ - ADI_ADISENSE_CORE_Digital_Sensor_Config_t sensorConfigReg; - - sensorConfigReg.VALUE16 = REG_RESET_VAL(CORE_DIGITAL_SENSOR_CONFIGn); - - if (pDataFormat->coding != ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_NONE) - { - if (pDataFormat->frameLength == 0) - { - ADI_SENSE_LOG_ERROR("Invalid frame length specified for digital sensor data format"); - return ADI_SENSE_INVALID_PARAM; - } - if (pDataFormat->numDataBits == 0) - { - ADI_SENSE_LOG_ERROR("Invalid frame length specified for digital sensor data format"); - return ADI_SENSE_INVALID_PARAM; - } - - CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_READ_BYTES, - pDataFormat->frameLength - 1); - CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_DATA_BITS, - pDataFormat->numDataBits - 1); - CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_BIT_OFFSET, - pDataFormat->bitOffset); - - sensorConfigReg.Digital_Sensor_Read_Bytes = pDataFormat->frameLength - 1; - sensorConfigReg.Digital_Sensor_Data_Bits = pDataFormat->numDataBits - 1; - sensorConfigReg.Digital_Sensor_Bit_Offset = pDataFormat->bitOffset; - sensorConfigReg.Digital_Sensor_Left_Aligned = pDataFormat->leftJustified ? 1 : 0; - sensorConfigReg.Digital_Sensor_Little_Endian = pDataFormat->littleEndian ? 1 : 0; - - switch (pDataFormat->coding) - { - case ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_UNIPOLAR: - sensorConfigReg.Digital_Sensor_Coding = ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_UNIPOLAR; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_TWOS_COMPLEMENT: - sensorConfigReg.Digital_Sensor_Coding = ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_TWOS_COMPL; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_OFFSET_BINARY: - sensorConfigReg.Digital_Sensor_Coding = ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_OFFSET_BINARY; - break; - default: - ADI_SENSE_LOG_ERROR("Invalid coding specified for digital sensor data format"); - return ADI_SENSE_INVALID_PARAM; - } - } - else - { - sensorConfigReg.Digital_Sensor_Coding = ADISENSE_CORE_DIGITAL_SENSOR_CONFIG_CODING_NONE; - } - - WRITE_REG_U16(hDevice, sensorConfigReg.VALUE16, - CORE_DIGITAL_SENSOR_CONFIGn(eChannelId)); - - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetDigitalCalibrationParam( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_DIGITAL_CALIBRATION_COMMAND *pCalibrationParam) -{ - ADI_ADISENSE_CORE_Calibration_Parameter_t calibrationParamReg; - - calibrationParamReg.VALUE32 = REG_RESET_VAL(CORE_CALIBRATION_PARAMETERn); - - if (pCalibrationParam->enableCalibrationParam == false) - calibrationParamReg.Calibration_Parameter_Enable = 0; - else - calibrationParamReg.Calibration_Parameter_Enable = 1; - - CHECK_REG_FIELD_VAL(CORE_CALIBRATION_PARAMETER_CALIBRATION_PARAMETER, - pCalibrationParam->calibrationParam); - - calibrationParamReg.Calibration_Parameter = pCalibrationParam->calibrationParam; - - WRITE_REG_U32(hDevice, calibrationParamReg.VALUE32, - CORE_CALIBRATION_PARAMETERn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetChannelI2cSensorType( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_I2C_SENSOR_TYPE sensorType) -{ - ADI_ADISENSE_CORE_Sensor_Type_t sensorTypeReg; - - sensorTypeReg.VALUE16 = REG_RESET_VAL(CORE_SENSOR_TYPEn); - - /* Ensure that the sensor type is valid for this channel */ - switch(sensorType) - { - case ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_DEF_L1: - case ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_B_DEF_L1: - case ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_DEF_L2: - case ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_B_DEF_L2: - case ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_ADV_L1: - case ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_B_ADV_L1: - case ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_ADV_L2: - case ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_B_ADV_L2: - case ADI_SENSE_1000_I2C_SENSOR_AMBIENTLIGHT_A_DEF_L1: - case ADI_SENSE_1000_I2C_SENSOR_AMBIENTLIGHT_A_DEF_L2: - case ADI_SENSE_1000_I2C_SENSOR_AMBIENTLIGHT_A_ADV_L1: - case ADI_SENSE_1000_I2C_SENSOR_AMBIENTLIGHT_A_ADV_L2: - sensorTypeReg.Sensor_Type = sensorType; - break; - default: - ADI_SENSE_LOG_ERROR("Unsupported I2C sensor type %d specified", sensorType); - return ADI_SENSE_INVALID_PARAM; - } - - WRITE_REG_U16(hDevice, sensorTypeReg.VALUE16, CORE_SENSOR_TYPEn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetChannelI2cSensorAddress( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - uint32_t deviceAddress) -{ - CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_ADDRESS_DIGITAL_SENSOR_ADDRESS, deviceAddress); - WRITE_REG_U8(hDevice, deviceAddress, CORE_DIGITAL_SENSOR_ADDRESSn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetDigitalChannelComms( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_DIGITAL_SENSOR_COMMS *pDigitalComms) -{ - ADI_ADISENSE_CORE_Digital_Sensor_Comms_t digitalSensorComms; - - digitalSensorComms.VALUE16 = REG_RESET_VAL(CORE_DIGITAL_SENSOR_COMMSn); - - if(pDigitalComms->useCustomCommsConfig) - { - digitalSensorComms.Digital_Sensor_Comms_En = 1; - - if(pDigitalComms->i2cClockSpeed == ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K) - { - digitalSensorComms.I2C_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_100K; - } - else if(pDigitalComms->i2cClockSpeed == ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_400K) - { - digitalSensorComms.I2C_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_I2C_400K; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid I2C clock speed %d specified", - pDigitalComms->i2cClockSpeed); - return ADI_SENSE_INVALID_PARAM; - } - - if(pDigitalComms->spiMode == ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_0) - { - digitalSensorComms.SPI_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_0; - } - else if(pDigitalComms->spiMode == ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_1) - { - digitalSensorComms.SPI_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_1; - } - else if(pDigitalComms->spiMode == ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_2) - { - digitalSensorComms.SPI_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_2; - } - else if(pDigitalComms->spiMode == ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_3) - { - digitalSensorComms.SPI_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_3; - } - else - { - ADI_SENSE_LOG_ERROR("Invalid SPI mode %d specified", - pDigitalComms->spiMode); - return ADI_SENSE_INVALID_PARAM; - } - - switch (pDigitalComms->spiClock) - { - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_13MHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_13MHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6_5MHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_6_5MHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3_25MHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_3_25MHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_625MHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_1_625MHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_812KHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_812KHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_406KHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_406KHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_203KHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_203KHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_101KHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_101KHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_50KHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_50KHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_25KHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_25KHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_12KHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_12KHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6KHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_6KHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3KHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_3KHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_5KHZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_1_5KHZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_793HZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_793HZ; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_396HZ: - digitalSensorComms.SPI_Clock = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_SPI_396HZ; - break; - default: - ADI_SENSE_LOG_ERROR("Invalid SPI clock %d specified", - pDigitalComms->spiClock); - return ADI_SENSE_INVALID_PARAM; - } - - switch (pDigitalComms->uartLineConfig) - { - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N1: - digitalSensorComms.Uart_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N1; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N2: - digitalSensorComms.Uart_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N2; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N3: - digitalSensorComms.Uart_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N3; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E1: - digitalSensorComms.Uart_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E1; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E2: - digitalSensorComms.Uart_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E2; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E3: - digitalSensorComms.Uart_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E3; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O1: - digitalSensorComms.Uart_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O1; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O2: - digitalSensorComms.Uart_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O2; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O3: - digitalSensorComms.Uart_Mode = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O3; - break; - default: - ADI_SENSE_LOG_ERROR("Invalid UART mode %d specified", - pDigitalComms->uartLineConfig); - return ADI_SENSE_INVALID_PARAM; - } - - switch (pDigitalComms->uartBaudRate) - { - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_115200: - digitalSensorComms.Uart_Baud = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_115200; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_57600: - digitalSensorComms.Uart_Baud = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_57600; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_38400: - digitalSensorComms.Uart_Baud = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_38400; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_19200: - digitalSensorComms.Uart_Baud = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_19200; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_9600: - digitalSensorComms.Uart_Baud = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_9600; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_4800: - digitalSensorComms.Uart_Baud = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_4800; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_2400: - digitalSensorComms.Uart_Baud = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_2400; - break; - case ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_1200: - digitalSensorComms.Uart_Baud = ADISENSE_CORE_DIGITAL_SENSOR_COMMS_UART_1200; - break; - default: - ADI_SENSE_LOG_ERROR("Invalid UART baud rate %d specified", - pDigitalComms->uartBaudRate); - return ADI_SENSE_INVALID_PARAM; - } - } - else - { - digitalSensorComms.Digital_Sensor_Comms_En = 0; - } - - WRITE_REG_U16(hDevice, digitalSensorComms.VALUE16, CORE_DIGITAL_SENSOR_COMMSn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_SetI2cChannelConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_CHANNEL_CONFIG *pChannelConfig) -{ - ADI_SENSE_RESULT eRet; - ADI_SENSE_1000_I2C_CHANNEL_CONFIG *pI2cChannelConfig = - &pChannelConfig->i2cChannelConfig; - - eRet = adi_sense_SetChannelI2cSensorType(hDevice, eChannelId, - pI2cChannelConfig->sensor); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set I2C sensor type for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetChannelI2cSensorAddress(hDevice, eChannelId, - pI2cChannelConfig->deviceAddress); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set I2C sensor address for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetChannelDigitalSensorDetails(hDevice, eChannelId, - pChannelConfig); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set I2C sensor details for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetDigitalSensorCommands(hDevice, eChannelId, - &pI2cChannelConfig->configurationCommand, - &pI2cChannelConfig->dataRequestCommand); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set I2C sensor commands for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetDigitalSensorFormat(hDevice, eChannelId, - &pI2cChannelConfig->dataFormat); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set I2C sensor data format for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetDigitalCalibrationParam(hDevice, eChannelId, - &pI2cChannelConfig->digitalCalibrationParam); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set I2C digital calibration param for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetDigitalChannelComms(hDevice, eChannelId, - &pI2cChannelConfig->configureComms); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set I2C comms for channel %d", - eChannelId); - return eRet; - } - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetChannelSpiSensorType( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_SPI_SENSOR_TYPE sensorType) -{ - ADI_ADISENSE_CORE_Sensor_Type_t sensorTypeReg; - - sensorTypeReg.VALUE16 = REG_RESET_VAL(CORE_SENSOR_TYPEn); - - /* Ensure that the sensor type is valid for this channel */ - switch(sensorType) - { - case ADI_SENSE_1000_SPI_SENSOR_PRESSURE_A_DEF_L1: - case ADI_SENSE_1000_SPI_SENSOR_PRESSURE_A_DEF_L2: - case ADI_SENSE_1000_SPI_SENSOR_PRESSURE_A_ADV_L1: - case ADI_SENSE_1000_SPI_SENSOR_PRESSURE_A_ADV_L2: - case ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_DEF_L1: - case ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_B_DEF_L1: - case ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_DEF_L2: - case ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_B_DEF_L2: - case ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_ADV_L1: - case ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_B_ADV_L1: - case ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_ADV_L2: - case ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_B_ADV_L2: - sensorTypeReg.Sensor_Type = sensorType; - break; - default: - ADI_SENSE_LOG_ERROR("Unsupported SPI sensor type %d specified", sensorType); - return ADI_SENSE_INVALID_PARAM; - } - - WRITE_REG_U16(hDevice, sensorTypeReg.VALUE16, CORE_SENSOR_TYPEn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_SetSpiChannelConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_CHANNEL_CONFIG *pChannelConfig) -{ - ADI_SENSE_RESULT eRet; - ADI_SENSE_1000_SPI_CHANNEL_CONFIG *pSpiChannelConfig = - &pChannelConfig->spiChannelConfig; - - eRet = adi_sense_SetChannelSpiSensorType(hDevice, eChannelId, - pSpiChannelConfig->sensor); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set SPI sensor type for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetChannelDigitalSensorDetails(hDevice, eChannelId, - pChannelConfig); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set SPI sensor details for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetDigitalSensorCommands(hDevice, eChannelId, - &pSpiChannelConfig->configurationCommand, - &pSpiChannelConfig->dataRequestCommand); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set SPI sensor commands for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetDigitalSensorFormat(hDevice, eChannelId, - &pSpiChannelConfig->dataFormat); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set SPI sensor data format for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetDigitalCalibrationParam(hDevice, eChannelId, - &pSpiChannelConfig->digitalCalibrationParam); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set SPI digital calibration param for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetDigitalChannelComms(hDevice, eChannelId, - &pSpiChannelConfig->configureComms); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set SPI comms for channel %d", - eChannelId); - return eRet; - } - - return ADI_SENSE_SUCCESS; -} - -static ADI_SENSE_RESULT adi_sense_SetChannelUartSensorType( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_UART_SENSOR_TYPE sensorType) -{ - ADI_ADISENSE_CORE_Sensor_Type_t sensorTypeReg; - - sensorTypeReg.VALUE16 = REG_RESET_VAL(CORE_SENSOR_TYPEn); - - /* Ensure that the sensor type is valid for this channel */ - switch(sensorType) - { - case ADI_SENSE_1000_UART_SENSOR_UART_CO2_A_DEF_L1: - case ADI_SENSE_1000_UART_SENSOR_UART_CO2_B_DEF_L1: - case ADI_SENSE_1000_UART_SENSOR_UART_CO2_A_DEF_L2: - case ADI_SENSE_1000_UART_SENSOR_UART_CO2_B_DEF_L2: - case ADI_SENSE_1000_UART_SENSOR_UART_CO2_A_ADV_L1: - case ADI_SENSE_1000_UART_SENSOR_UART_CO2_B_ADV_L1: - case ADI_SENSE_1000_UART_SENSOR_UART_CO2_A_ADV_L2: - case ADI_SENSE_1000_UART_SENSOR_UART_CO2_B_ADV_L2: - sensorTypeReg.Sensor_Type = sensorType; - break; - default: - ADI_SENSE_LOG_ERROR("Unsupported UART sensor type %d specified", sensorType); - return ADI_SENSE_INVALID_PARAM; - } - - WRITE_REG_U16(hDevice, sensorTypeReg.VALUE16, CORE_SENSOR_TYPEn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_SetUartChannelConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_CHANNEL_CONFIG *pChannelConfig) -{ - ADI_SENSE_RESULT eRet; - ADI_SENSE_1000_UART_CHANNEL_CONFIG *pUartChannelConfig = - &pChannelConfig->uartChannelConfig; - - eRet = adi_sense_SetChannelUartSensorType(hDevice, eChannelId, - pUartChannelConfig->sensor); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set UART sensor type for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetChannelDigitalSensorDetails(hDevice, eChannelId, - pChannelConfig); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set UART sensor details for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetDigitalCalibrationParam(hDevice, eChannelId, - &pUartChannelConfig->digitalCalibrationParam); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set UART digital calibration param for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_SetDigitalChannelComms(hDevice, eChannelId, - &pUartChannelConfig->configureComms); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set UART comms for channel %d", - eChannelId); - return eRet; - } - - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetChannelThresholdLimits( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - float32_t fHighThresholdLimit, - float32_t fLowThresholdLimit) -{ - /* - * If the low/high limits are *both* set to 0 in memory, or NaNs, assume - * that they are unset, or not required, and use infinity defaults instead - */ - if (fHighThresholdLimit == 0.0f && fLowThresholdLimit == 0.0f) - { - fHighThresholdLimit = INFINITY; - fLowThresholdLimit = -INFINITY; - } - else - { - if (isnan(fHighThresholdLimit)) - fHighThresholdLimit = INFINITY; - if (isnan(fLowThresholdLimit)) - fLowThresholdLimit = -INFINITY; - } - - WRITE_REG_FLOAT(hDevice, fHighThresholdLimit, - CORE_HIGH_THRESHOLD_LIMITn(eChannelId)); - WRITE_REG_FLOAT(hDevice, fLowThresholdLimit, - CORE_LOW_THRESHOLD_LIMITn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetOffsetGain( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - float32_t fOffsetAdjustment, - float32_t fGainAdjustment) -{ - /* Replace with default values if NaNs are specified (or 0.0 for gain) */ - if (isnan(fGainAdjustment) || (fGainAdjustment == 0.0f)) - fGainAdjustment = 1.0f; - if (isnan(fOffsetAdjustment)) - fOffsetAdjustment = 0.0f; - - WRITE_REG_FLOAT(hDevice, fGainAdjustment, CORE_SENSOR_GAINn(eChannelId)); - WRITE_REG_FLOAT(hDevice, fOffsetAdjustment, CORE_SENSOR_OFFSETn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetSensorParameter( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - float32_t fSensorParam) -{ - if (fSensorParam == 0.0f) - fSensorParam = NAN; - - WRITE_REG_FLOAT(hDevice, fSensorParam, CORE_SENSOR_PARAMETERn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetChannelSettlingTime( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - uint32_t nSettlingTime) -{ - ADI_ADISENSE_CORE_Settling_Time_t settlingTimeReg; - - if (nSettlingTime < (1 << 12)) - { - settlingTimeReg.Settling_Time_Units = ADISENSE_CORE_SETTLING_TIME_MICROSECONDS; - } - else if (nSettlingTime < (1000 * (1 << 12))) - { - settlingTimeReg.Settling_Time_Units = ADISENSE_CORE_SETTLING_TIME_MILLISECONDS; - nSettlingTime /= 1000; - } - else - { - settlingTimeReg.Settling_Time_Units = ADISENSE_CORE_SETTLING_TIME_SECONDS; - nSettlingTime /= 1000000; - } - - CHECK_REG_FIELD_VAL(CORE_SETTLING_TIME_SETTLING_TIME, nSettlingTime); - settlingTimeReg.Settling_Time = nSettlingTime; - - WRITE_REG_U16(hDevice, settlingTimeReg.VALUE16, CORE_SETTLING_TIMEn(eChannelId)); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetChannelConfig( - ADI_SENSE_DEVICE_HANDLE hDevice, - ADI_SENSE_1000_CHANNEL_ID eChannelId, - ADI_SENSE_1000_CHANNEL_CONFIG *pChannelConfig) -{ - ADI_SENSE_RESULT eRet; - - if (! ADI_SENSE_1000_CHANNEL_IS_VIRTUAL(eChannelId)) - { - eRet = adi_sense_1000_SetChannelCount(hDevice, eChannelId, - pChannelConfig->enableChannel ? - pChannelConfig->measurementsPerCycle : 0); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set measurement count for channel %d", - eChannelId); - return eRet; - } - - eRet = adi_sense_1000_SetChannelOptions(hDevice, eChannelId, - pChannelConfig->priority, - pChannelConfig->enableFFT); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set priority for channel %d", - eChannelId); - return eRet; - } - - /* If the channel is not enabled, we can skip the following steps */ - if (pChannelConfig->enableChannel || pChannelConfig->enableFFT) - { - eRet = adi_sense_1000_SetChannelSkipCount(hDevice, eChannelId, - pChannelConfig->cycleSkipCount); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set cycle skip count for channel %d", - eChannelId); - return eRet; - } - - switch (eChannelId) - { - case ADI_SENSE_1000_CHANNEL_ID_CJC_0: - case ADI_SENSE_1000_CHANNEL_ID_CJC_1: - case ADI_SENSE_1000_CHANNEL_ID_SENSOR_0: - case ADI_SENSE_1000_CHANNEL_ID_SENSOR_1: - case ADI_SENSE_1000_CHANNEL_ID_SENSOR_2: - case ADI_SENSE_1000_CHANNEL_ID_SENSOR_3: - case ADI_SENSE_1000_CHANNEL_ID_VOLTAGE_0: - case ADI_SENSE_1000_CHANNEL_ID_CURRENT_0: - eRet = adi_sense_SetAdcChannelConfig(hDevice, eChannelId, pChannelConfig); - break; - case ADI_SENSE_1000_CHANNEL_ID_I2C_0: - case ADI_SENSE_1000_CHANNEL_ID_I2C_1: - eRet = adi_sense_SetI2cChannelConfig(hDevice, eChannelId, pChannelConfig); - break; - case ADI_SENSE_1000_CHANNEL_ID_SPI_0: - eRet = adi_sense_SetSpiChannelConfig(hDevice, eChannelId, pChannelConfig); - break; - case ADI_SENSE_1000_CHANNEL_ID_UART: - eRet = adi_sense_SetUartChannelConfig(hDevice, eChannelId, pChannelConfig); - break; - default: - ADI_SENSE_LOG_ERROR("Invalid channel ID %d specified", eChannelId); - return ADI_SENSE_INVALID_PARAM; - } - - eRet = adi_sense_1000_SetChannelSettlingTime(hDevice, eChannelId, - pChannelConfig->extraSettlingTime); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set settling time for channel %d", - eChannelId); - return eRet; - } - } - } - - if (pChannelConfig->enableChannel || pChannelConfig->enableFFT) - { - /* Threshold limits can be configured individually for virtual channels */ - eRet = adi_sense_1000_SetChannelThresholdLimits(hDevice, eChannelId, - pChannelConfig->highThreshold, - pChannelConfig->lowThreshold); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set threshold limits for channel %d", - eChannelId); - return eRet; - } - - /* Offset and gain can be configured individually for virtual channels */ - eRet = adi_sense_1000_SetOffsetGain(hDevice, eChannelId, - pChannelConfig->offsetAdjustment, - pChannelConfig->gainAdjustment); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set offset/gain for channel %d", - eChannelId); - return eRet; - } - - /* Set sensor specific parameter */ - eRet = adi_sense_1000_SetSensorParameter(hDevice, eChannelId, - pChannelConfig->sensorParameter); - if (eRet != ADI_SENSE_SUCCESS) - { - ADI_SENSE_LOG_ERROR("Failed to set sensor parameter for channel %d", - eChannelId); - return eRet; - } - } - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_SetConfig( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_CONFIG * const pConfig) -{ - ADI_SENSE_1000_CONFIG *pDeviceConfig; - ADI_SENSE_PRODUCT_ID productId; - ADI_SENSE_RESULT eRet; - - if (pConfig->productId != ADI_SENSE_PRODUCT_ID_ADSNS1000) - { - ADI_SENSE_LOG_ERROR("Configuration Product ID (0x%X) is not supported (0x%0X)", - pConfig->productId, ADI_SENSE_PRODUCT_ID_ADSNS1000); - return ADI_SENSE_INVALID_PARAM; - } - - /* Check that the actual Product ID is a match? */ - eRet = adi_sense_GetProductID(hDevice, &productId); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to read device Product ID register"); - return eRet; - } - if (pConfig->productId != productId) - { - ADI_SENSE_LOG_ERROR("Configuration Product ID (0x%X) does not match device (0x%0X)", - pConfig->productId, productId); - return ADI_SENSE_INVALID_PARAM; - } - - pDeviceConfig = &pConfig->adisense1000; - - eRet = adi_sense_1000_SetPowerConfig(hDevice, &pDeviceConfig->power); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to set power configuration"); - return eRet; - } - - eRet = adi_sense_1000_SetMeasurementConfig(hDevice, &pDeviceConfig->measurement); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to set measurement configuration"); - return eRet; - } - - eRet = adi_sense_1000_SetDiagnosticsConfig(hDevice, &pDeviceConfig->diagnostics); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to set diagnostics configuration"); - return eRet; - } - - for (ADI_SENSE_1000_CHANNEL_ID id = ADI_SENSE_1000_CHANNEL_ID_CJC_0; - id < ADI_SENSE_1000_MAX_CHANNELS; - id++) - { - eRet = adi_sense_1000_SetChannelConfig(hDevice, id, - &pDeviceConfig->channels[id]); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to set channel %d configuration", id); - return eRet; - } - } - - eRet = adi_sense_1000_SetFftConfig(hDevice, &pDeviceConfig->fft, - pDeviceConfig->channels); - if (eRet) - { - ADI_SENSE_LOG_ERROR("Failed to set FFT configuration"); - return eRet; - } - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetLutData( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_1000_LUT * const pLutData) -{ - ADI_SENSE_1000_LUT_HEADER *pLutHeader = &pLutData->header; - ADI_SENSE_1000_LUT_TABLE *pLutTable = pLutData->tables; - unsigned actualLength = 0; - - if (pLutData->header.signature != ADI_SENSE_LUT_SIGNATURE) - { - ADI_SENSE_LOG_ERROR("LUT signature incorrect (expected 0x%X, actual 0x%X)", - ADI_SENSE_LUT_SIGNATURE, pLutHeader->signature); - return ADI_SENSE_INVALID_SIGNATURE; - } - - for (unsigned i = 0; i < pLutHeader->numTables; i++) - { - ADI_SENSE_1000_LUT_DESCRIPTOR *pDesc = &pLutTable->descriptor; - ADI_SENSE_1000_LUT_TABLE_DATA *pData = &pLutTable->data; - unsigned short calculatedCrc; - - switch (pDesc->geometry) - { - case ADI_SENSE_1000_LUT_GEOMETRY_COEFFS: - switch (pDesc->equation) - { - case ADI_SENSE_1000_LUT_EQUATION_POLYN: - case ADI_SENSE_1000_LUT_EQUATION_POLYNEXP: - case ADI_SENSE_1000_LUT_EQUATION_QUADRATIC: - case ADI_SENSE_1000_LUT_EQUATION_STEINHART: - case ADI_SENSE_1000_LUT_EQUATION_LOGARITHMIC: - case ADI_SENSE_1000_LUT_EQUATION_BIVARIATE_POLYN: - break; - default: - ADI_SENSE_LOG_ERROR("Invalid equation %u specified for LUT table %u", - pDesc->equation, i); - return ADI_SENSE_INVALID_PARAM; - } - break; - case ADI_SENSE_1000_LUT_GEOMETRY_NES_1D: - case ADI_SENSE_1000_LUT_GEOMETRY_NES_2D: - case ADI_SENSE_1000_LUT_GEOMETRY_ES_1D: - case ADI_SENSE_1000_LUT_GEOMETRY_ES_2D: - if (pDesc->equation != ADI_SENSE_1000_LUT_EQUATION_LUT) { - ADI_SENSE_LOG_ERROR("Invalid equation %u specified for LUT table %u", - pDesc->equation, i); - return ADI_SENSE_INVALID_PARAM; - } - break; - default: - ADI_SENSE_LOG_ERROR("Invalid geometry %u specified for LUT table %u", - pDesc->geometry, i); - return ADI_SENSE_INVALID_PARAM; - } - - switch (pDesc->dataType) - { - case ADI_SENSE_1000_LUT_DATA_TYPE_FLOAT32: - case ADI_SENSE_1000_LUT_DATA_TYPE_FLOAT64: - break; - default: - ADI_SENSE_LOG_ERROR("Invalid vector format %u specified for LUT table %u", - pDesc->dataType, i); - return ADI_SENSE_INVALID_PARAM; - } - - calculatedCrc = adi_sense_crc16_ccitt(pData, pDesc->length); - if (calculatedCrc != pDesc->crc16) - { - ADI_SENSE_LOG_ERROR("CRC validation failed on LUT table %u (expected 0x%04X, actual 0x%04X)", - i, pDesc->crc16, calculatedCrc); - return ADI_SENSE_CRC_ERROR; - } - - actualLength += sizeof(*pDesc) + pDesc->length; - - /* Move to the next look-up table */ - pLutTable = (ADI_SENSE_1000_LUT_TABLE *)((uint8_t *)pLutTable + sizeof(*pDesc) + pDesc->length); - } - - if (actualLength != pLutHeader->totalLength) - { - ADI_SENSE_LOG_ERROR("LUT table length mismatch (expected %u, actual %u)", - pLutHeader->totalLength, actualLength); - return ADI_SENSE_WRONG_SIZE; - } - - if (sizeof(*pLutHeader) + pLutHeader->totalLength > ADI_SENSE_LUT_MAX_SIZE) - { - ADI_SENSE_LOG_ERROR("Maximum LUT table length (%u bytes) exceeded", - ADI_SENSE_LUT_MAX_SIZE); - return ADI_SENSE_WRONG_SIZE; - } - - /* Write the LUT data to the device */ - unsigned lutSize = sizeof(*pLutHeader) + pLutHeader->totalLength; - WRITE_REG_U16(hDevice, 0, CORE_LUT_OFFSET); - WRITE_REG_U8_ARRAY(hDevice, (uint8_t *)pLutData, lutSize, CORE_LUT_DATA); - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_SetLutDataRaw( - ADI_SENSE_DEVICE_HANDLE const hDevice, - ADI_SENSE_1000_LUT_RAW * const pLutData) -{ - return adi_sense_1000_SetLutData(hDevice, - (ADI_SENSE_1000_LUT *)pLutData); -} - -static ADI_SENSE_RESULT getLutTableSize( - ADI_SENSE_1000_LUT_DESCRIPTOR * const pDesc, - ADI_SENSE_1000_LUT_TABLE_DATA * const pData, - unsigned *pLength) -{ - switch (pDesc->geometry) - { - case ADI_SENSE_1000_LUT_GEOMETRY_COEFFS: - if (pDesc->equation == ADI_SENSE_1000_LUT_EQUATION_BIVARIATE_POLYN) - *pLength = ADI_SENSE_1000_LUT_2D_POLYN_COEFF_LIST_SIZE(pData->coeffList2d); - else - *pLength = ADI_SENSE_1000_LUT_COEFF_LIST_SIZE(pData->coeffList); - break; - case ADI_SENSE_1000_LUT_GEOMETRY_NES_1D: - *pLength = ADI_SENSE_1000_LUT_1D_NES_SIZE(pData->lut1dNes); - break; - case ADI_SENSE_1000_LUT_GEOMETRY_NES_2D: - *pLength = ADI_SENSE_1000_LUT_2D_NES_SIZE(pData->lut2dNes); - break; - case ADI_SENSE_1000_LUT_GEOMETRY_ES_1D: - *pLength = ADI_SENSE_1000_LUT_1D_ES_SIZE(pData->lut1dEs); - break; - case ADI_SENSE_1000_LUT_GEOMETRY_ES_2D: - *pLength = ADI_SENSE_1000_LUT_2D_ES_SIZE(pData->lut2dEs); - break; - default: - ADI_SENSE_LOG_ERROR("Invalid LUT table geometry %d specified\r\n", - pDesc->geometry); - return ADI_SENSE_INVALID_PARAM; - } - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT adi_sense_1000_AssembleLutData( - ADI_SENSE_1000_LUT * pLutBuffer, - unsigned nLutBufferSize, - unsigned const nNumTables, - ADI_SENSE_1000_LUT_DESCRIPTOR * const ppDesc[], - ADI_SENSE_1000_LUT_TABLE_DATA * const ppData[]) -{ - ADI_SENSE_1000_LUT_HEADER *pHdr = &pLutBuffer->header; - uint8_t *pLutTableData = (uint8_t *)pLutBuffer + sizeof(*pHdr); - - if (sizeof(*pHdr) > nLutBufferSize) - { - ADI_SENSE_LOG_ERROR("Insufficient LUT buffer size provided"); - return ADI_SENSE_INVALID_PARAM; - } - - /* First initialise the top-level header */ - pHdr->signature = ADI_SENSE_LUT_SIGNATURE; - pHdr->version.major = 1; - pHdr->version.minor = 0; - pHdr->numTables = 0; - pHdr->totalLength = 0; - - /* - * Walk through the list of table pointers provided, appending the table - * descriptor+data from each one to the provided LUT buffer - */ - for (unsigned i = 0; i < nNumTables; i++) - { - ADI_SENSE_1000_LUT_DESCRIPTOR * const pDesc = ppDesc[i]; - ADI_SENSE_1000_LUT_TABLE_DATA * const pData = ppData[i]; - ADI_SENSE_RESULT res; - unsigned dataLength = 0; - - /* Calculate the length of the table data */ - res = getLutTableSize(pDesc, pData, &dataLength); - if (res != ADI_SENSE_SUCCESS) - return res; - - /* Fill in the table descriptor length and CRC fields */ - pDesc->length = dataLength; - pDesc->crc16 = adi_sense_crc16_ccitt(pData, dataLength); - - if ((sizeof(*pHdr) + pHdr->totalLength + sizeof(*pDesc) + dataLength) > nLutBufferSize) - { - ADI_SENSE_LOG_ERROR("Insufficient LUT buffer size provided"); - return ADI_SENSE_INVALID_PARAM; - } - - /* Append the table to the LUT buffer (desc + data) */ - memcpy(pLutTableData + pHdr->totalLength, pDesc, sizeof(*pDesc)); - pHdr->totalLength += sizeof(*pDesc); - memcpy(pLutTableData + pHdr->totalLength, pData, dataLength); - pHdr->totalLength += dataLength; - - pHdr->numTables++; - } - - return ADI_SENSE_SUCCESS; -} -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/admw_1001.c Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,3342 @@ +/* +Copyright 2018 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/****************************************************************************** +Copyright 2017 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/*! + ****************************************************************************** + * @file: + * @brief: ADMW API implementation for ADSNS1000 + *----------------------------------------------------------------------------- + */ + +#include <float.h> +#include <math.h> +#include <string.h> + +#include "admw_platform.h" +#include "admw_api.h" +#include "admw1001/admw1001_api.h" + +#include "admw1001/ADMW1001_REGISTERS_typedefs.h" +#include "admw1001/ADMW1001_REGISTERS.h" +#include "admw1001/admw1001_lut_data.h" +#include "admw1001/admw1001_host_comms.h" + +#include "crc16.h" + + +uint32_t getDataCnt = 0; + +/* + * The following macros are used to encapsulate the register access code + * to improve readability in the functions further below in this file + */ +#define STRINGIFY(name) #name + +/* Expand the full name of the reset value macro for the specified register */ +#define REG_RESET_VAL(_name) REG_##_name##_RESET + +/* Checks if a value is outside the bounds of the specified register field */ +#define CHECK_REG_FIELD_VAL(_field, _val) \ + do { \ + uint32_t _mask = BITM_##_field; \ + uint32_t _shift = BITP_##_field; \ + if ((((_val) << _shift) & ~(_mask)) != 0) { \ + ADMW_LOG_ERROR("Value 0x%08X invalid for register field %s", \ + (uint32_t)(_val), \ + STRINGIFY(ADMW_##_field)); \ + return ADMW_INVALID_PARAM; \ + } \ + } while(false) + +/* + * Encapsulates the write to a specified register + * NOTE - this will cause the calling function to return on error + */ +#define WRITE_REG(_hdev, _val, _name, _type) \ + do { \ + ADMW_RESULT _res; \ + _type _regval = _val; \ + _res = admw1001_WriteRegister((_hdev), \ + REG_##_name, \ + &_regval, sizeof(_regval)); \ + if (_res != ADMW_SUCCESS) \ + return _res; \ + } while(false) + +/* Wrapper macro to write a value to a uint32_t register */ +#define WRITE_REG_U32(_hdev, _val, _name) \ + WRITE_REG(_hdev, _val, _name, uint32_t) +/* Wrapper macro to write a value to a uint16_t register */ +#define WRITE_REG_U16(_hdev, _val, _name) \ + WRITE_REG(_hdev, _val, _name, uint16_t) +/* Wrapper macro to write a value to a uint8_t register */ +#define WRITE_REG_U8(_hdev, _val, _name) \ + WRITE_REG(_hdev, _val, _name, uint8_t) +/* Wrapper macro to write a value to a float32_t register */ +#define WRITE_REG_FLOAT(_hdev, _val, _name) \ + WRITE_REG(_hdev, _val, _name, float32_t) + +/* + * Encapsulates the read from a specified register + * NOTE - this will cause the calling function to return on error + */ +#define READ_REG(_hdev, _val, _name, _type) \ + do { \ + ADMW_RESULT _res; \ + _type _regval; \ + _res = admw1001_ReadRegister((_hdev), \ + REG_##_name, \ + &_regval, sizeof(_regval)); \ + if (_res != ADMW_SUCCESS) \ + return _res; \ + _val = _regval; \ + } while(false) + +/* Wrapper macro to read a value from a uint32_t register */ +#define READ_REG_U32(_hdev, _val, _name) \ + READ_REG(_hdev, _val, _name, uint32_t) +/* Wrapper macro to read a value from a uint16_t register */ +#define READ_REG_U16(_hdev, _val, _name) \ + READ_REG(_hdev, _val, _name, uint16_t) +/* Wrapper macro to read a value from a uint8_t register */ +#define READ_REG_U8(_hdev, _val, _name) \ + READ_REG(_hdev, _val, _name, uint8_t) +/* Wrapper macro to read a value from a float32_t register */ +#define READ_REG_FLOAT(_hdev, _val, _name) \ + READ_REG(_hdev, _val, _name, float32_t) + +/* + * Wrapper macro to write an array of values to a uint8_t register + * NOTE - this is intended only for writing to a keyhole data register + */ +#define WRITE_REG_U8_ARRAY(_hdev, _arr, _len, _name) \ + do { \ + ADMW_RESULT _res; \ + _res = admw1001_WriteRegister(_hdev, \ + REG_##_name, \ + _arr, _len); \ + if (_res != ADMW_SUCCESS) \ + return _res; \ + } while(false) + +/* + * Wrapper macro to read an array of values from a uint8_t register + * NOTE - this is intended only for reading from a keyhole data register + */ +#define READ_REG_U8_ARRAY(_hdev, _arr, _len, _name) \ + do { \ + ADMW_RESULT _res; \ + _res = admw1001_ReadRegister((_hdev), \ + REG_##_name, \ + _arr, _len); \ + if (_res != ADMW_SUCCESS) \ + return _res; \ + } while(false) + +#define ADMW1001_CHANNEL_IS_ADC(c) \ + ((c) >= ADMW1001_CHANNEL_ID_CJC_0 && (c) <= ADMW1001_CHANNEL_ID_CURRENT_0) + +#define ADMW1001_CHANNEL_IS_ADC_CJC(c) \ + ((c) >= ADMW1001_CHANNEL_ID_CJC_0 && (c) <= ADMW1001_CHANNEL_ID_CJC_1) + +#define ADMW1001_CHANNEL_IS_ADC_SENSOR(c) \ + ((c) >= ADMW1001_CHANNEL_ID_SENSOR_0 && (c) <= ADMW1001_CHANNEL_ID_SENSOR_3) + +#define ADMW1001_CHANNEL_IS_ADC_VOLTAGE(c) \ + ((c) == ADMW1001_CHANNEL_ID_VOLTAGE_0) + +#define ADMW1001_CHANNEL_IS_ADC_CURRENT(c) \ + ((c) == ADMW1001_CHANNEL_ID_CURRENT_0) + +#define ADMW1001_CHANNEL_IS_VIRTUAL(c) \ + ((c) == ADMW1001_CHANNEL_ID_SPI_1 || (c) == ADMW1001_CHANNEL_ID_SPI_2) + +typedef struct +{ + unsigned nDeviceIndex; + ADMW_SPI_HANDLE hSpi; + ADMW_GPIO_HANDLE hGpio; +} ADMW_DEVICE_CONTEXT; + +static ADMW_DEVICE_CONTEXT gDeviceCtx[ADMW_PLATFORM_MAX_DEVICES]; + +/* + * Open an ADMW device instance. + */ +ADMW_RESULT admw_Open( + unsigned const nDeviceIndex, + ADMW_CONNECTION * const pConnectionInfo, + ADMW_DEVICE_HANDLE * const phDevice) +{ + ADMW_DEVICE_CONTEXT *pCtx; + ADMW_RESULT eRet; + + if (nDeviceIndex >= ADMW_PLATFORM_MAX_DEVICES) + return ADMW_INVALID_DEVICE_NUM; + + pCtx = &gDeviceCtx[nDeviceIndex]; + pCtx->nDeviceIndex = nDeviceIndex; + + eRet = admw_LogOpen(&pConnectionInfo->log); + if (eRet != ADMW_SUCCESS) + return eRet; + + eRet = admw_GpioOpen(&pConnectionInfo->gpio, &pCtx->hGpio); + if (eRet != ADMW_SUCCESS) + return eRet; + + eRet = admw_SpiOpen(&pConnectionInfo->spi, &pCtx->hSpi); + if (eRet != ADMW_SUCCESS) + return eRet; + + *phDevice = pCtx; + return ADMW_SUCCESS; +} + +/* + * Get the current state of the specified GPIO input signal. + */ +ADMW_RESULT admw_GetGpioState( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_GPIO_PIN const ePinId, + bool * const pbAsserted) +{ + ADMW_DEVICE_CONTEXT *pCtx = hDevice; + + return admw_GpioGet(pCtx->hGpio, ePinId, pbAsserted); +} + +/* + * Register an application-defined callback function for GPIO interrupts. + */ +ADMW_RESULT admw_RegisterGpioCallback( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_GPIO_PIN const ePinId, + ADMW_GPIO_CALLBACK const callbackFunction, + void * const pCallbackParam) +{ + ADMW_DEVICE_CONTEXT *pCtx = hDevice; + + if (callbackFunction) + { + return admw_GpioIrqEnable(pCtx->hGpio, ePinId, callbackFunction, + pCallbackParam); + } + else + { + return admw_GpioIrqDisable(pCtx->hGpio, ePinId); + } +} + +/* + * Reset the specified ADMW device. + */ +ADMW_RESULT admw_Reset( + ADMW_DEVICE_HANDLE const hDevice) +{ + ADMW_DEVICE_CONTEXT *pCtx = hDevice; + ADMW_RESULT eRet; + + /* Pulse the Reset GPIO pin low for a minimum of 4 microseconds */ + eRet = admw_GpioSet(pCtx->hGpio, ADMW_GPIO_PIN_RESET, false); + if (eRet != ADMW_SUCCESS) + return eRet; + + admw_TimeDelayUsec(4); + + eRet = admw_GpioSet(pCtx->hGpio, ADMW_GPIO_PIN_RESET, true); + if (eRet != ADMW_SUCCESS) + return eRet; + + return ADMW_SUCCESS; +} + + +/*! + * @brief Get general status of ADISense module. + * + * @param[in] + * @param[out] pStatus : Pointer to CORE Status struct. + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * - #ADMW_FAILURE If status register read fails. + * + * @details Read the general status register for the ADISense + * module. Indicates Error, Alert conditions, data ready + * and command running. + * + */ +ADMW_RESULT admw_GetStatus( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_STATUS * const pStatus) +{ + CORE_Status_t statusReg; + READ_REG_U8(hDevice, statusReg.VALUE8, CORE_STATUS); + + CORE_Alert_Status_2_t alert2Reg; + READ_REG_U16(hDevice, alert2Reg.VALUE16, CORE_ALERT_STATUS_2); + + memset(pStatus, 0, sizeof(*pStatus)); + + if (!statusReg.Cmd_Running) /* Active-low, so invert it */ + pStatus->deviceStatus |= ADMW_DEVICE_STATUS_BUSY; + if (statusReg.Drdy) + pStatus->deviceStatus |= ADMW_DEVICE_STATUS_DATAREADY; + if (statusReg.FIFO_Error) + pStatus->deviceStatus |= ADMW_DEVICE_STATUS_FIFO_ERROR; + if (alert2Reg.Ext_Flash_Error) + pStatus->deviceStatus |= ADMW_DEVICE_STATUS_EXT_FLASH_ERROR; + if (statusReg.Alert_Active) + { + pStatus->deviceStatus |= ADMW_DEVICE_STATUS_ALERT; + + CORE_Alert_Code_t alertCodeReg; + READ_REG_U16(hDevice, alertCodeReg.VALUE16, CORE_ALERT_CODE); + pStatus->alertCode = alertCodeReg.Alert_Code; + + CORE_Channel_Alert_Status_t channelAlertStatusReg; + READ_REG_U16(hDevice, channelAlertStatusReg.VALUE16, + CORE_CHANNEL_ALERT_STATUS); + + for (unsigned i = 0; i < ADMW1001_MAX_CHANNELS; i++) + { + if (channelAlertStatusReg.VALUE16 & (1 << i)) + { + CORE_Alert_Code_Ch_t channelAlertCodeReg; + READ_REG_U16(hDevice, channelAlertCodeReg.VALUE16, CORE_ALERT_CODE_CHn(i)); + pStatus->channelAlertCodes[i] = channelAlertCodeReg.Alert_Code_Ch; + + CORE_Alert_Detail_Ch_t alertDetailReg; + READ_REG_U16(hDevice, alertDetailReg.VALUE16, + CORE_ALERT_DETAIL_CHn(i)); + + if (alertDetailReg.Time_Out) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_TIMEOUT; + if (alertDetailReg.Under_Range) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_UNDER_RANGE; + if (alertDetailReg.Over_Range) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_OVER_RANGE; + if (alertDetailReg.Low_Limit) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_LOW_LIMIT; + if (alertDetailReg.High_Limit) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_HIGH_LIMIT; + if (alertDetailReg.Sensor_Open) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_SENSOR_OPEN; + if (alertDetailReg.Ref_Detect) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_REF_DETECT; + if (alertDetailReg.Config_Err) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_CONFIG_ERR; + if (alertDetailReg.LUT_Error_Ch) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_LUT_ERR; + if (alertDetailReg.Sensor_Not_Ready) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_SENSOR_NOT_READY; + if (alertDetailReg.Comp_Not_Ready) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_COMP_NOT_READY; + if (alertDetailReg.Correction_UnderRange) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_LUT_UNDER_RANGE; + if (alertDetailReg.Correction_OverRange) + pStatus->channelAlerts[i] |= ADMW_CHANNEL_ALERT_LUT_OVER_RANGE; + } + } + + if (alert2Reg.Configuration_Error) + pStatus->deviceStatus |= ADMW_DEVICE_STATUS_CONFIG_ERROR; + if (alert2Reg.LUT_Error) + pStatus->deviceStatus |= ADMW_DEVICE_STATUS_LUT_ERROR; + } + + if (statusReg.Error) + { + pStatus->deviceStatus |= ADMW_DEVICE_STATUS_ERROR; + + CORE_Error_Code_t errorCodeReg; + READ_REG_U16(hDevice, errorCodeReg.VALUE16, CORE_ERROR_CODE); + pStatus->errorCode = errorCodeReg.Error_Code; + + CORE_Diagnostics_Status_t diagStatusReg; + READ_REG_U16(hDevice, diagStatusReg.VALUE16, CORE_DIAGNOSTICS_STATUS); + + if (diagStatusReg.Diag_Checksum_Error) + pStatus->diagnosticsStatus |= ADMW_DIAGNOSTICS_STATUS_CHECKSUM_ERROR; + if (diagStatusReg.Diag_Comms_Error) + pStatus->diagnosticsStatus |= ADMW_DIAGNOSTICS_STATUS_COMMS_ERROR; + if (diagStatusReg.Diag_Supply_Monitor_Error) + pStatus->diagnosticsStatus |= ADMW_DIAGNOSTICS_STATUS_SUPPLY_MONITOR_ERROR; + if (diagStatusReg.Diag_Supply_Cap_Error) + pStatus->diagnosticsStatus |= ADMW_DIAGNOSTICS_STATUS_SUPPLY_CAP_ERROR; + if (diagStatusReg.Diag_Conversion_Error) + pStatus->diagnosticsStatus |= ADMW_DIAGNOSTICS_STATUS_CONVERSION_ERROR; + if (diagStatusReg.Diag_Calibration_Error) + pStatus->diagnosticsStatus |= ADMW_DIAGNOSTICS_STATUS_CALIBRATION_ERROR; + } + + if (statusReg.Alert_Active || statusReg.Error) + { + CORE_Debug_Code_t debugCodeReg; + READ_REG_U32(hDevice, debugCodeReg.VALUE32, CORE_DEBUG_CODE); + pStatus->debugCode = debugCodeReg.Debug_Code; + } + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw_GetCommandRunningState( + ADMW_DEVICE_HANDLE hDevice, + bool *pbCommandRunning) +{ + CORE_Status_t statusReg; + + READ_REG_U8(hDevice, statusReg.VALUE8, CORE_STATUS); + + /* We should never normally see 0xFF here if the module is operational */ + if (statusReg.VALUE8 == 0xFF) + return ADMW_ERR_NOT_INITIALIZED; + + *pbCommandRunning = !statusReg.Cmd_Running; /* Active-low, so invert it */ + + return ADMW_SUCCESS; +} + +static ADMW_RESULT executeCommand( + ADMW_DEVICE_HANDLE const hDevice, + CORE_Command_Special_Command const command, + bool const bWaitForCompletion) +{ + CORE_Command_t commandReg; + bool bCommandRunning; + ADMW_RESULT eRet; + + /* + * Don't allow another command to be issued if one is already running, but + * make an exception for CORE_COMMAND_NOP which can be used to + * request a running command to be stopped (e.g. continuous measurement) + */ + if (command != CORE_COMMAND_NOP) + { + eRet = admw_GetCommandRunningState(hDevice, &bCommandRunning); + if (eRet) + return eRet; + + if (bCommandRunning) + return ADMW_IN_USE; + } + + commandReg.Special_Command = command; + WRITE_REG_U8(hDevice, commandReg.VALUE8, CORE_COMMAND); + + if (bWaitForCompletion) + { + do { + /* Allow a minimum 50usec delay for status update before checking */ + admw_TimeDelayUsec(50); + + eRet = admw_GetCommandRunningState(hDevice, &bCommandRunning); + if (eRet) + return eRet; + } while (bCommandRunning); + } + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw_Shutdown( + ADMW_DEVICE_HANDLE const hDevice) +{ + return executeCommand(hDevice, CORE_COMMAND_POWER_DOWN, false); +} + + +ADMW_RESULT admw_ApplyConfigUpdates( + ADMW_DEVICE_HANDLE const hDevice) +{ + return executeCommand(hDevice, CORE_COMMAND_LATCH_CONFIG, true); +} + +/*! + * @brief Start a measurement cycle. + * + * @param[out] + * + * @return Status + * - #ADMW_SUCCESS Call completed successfully. + * - #ADMW_FAILURE + * + * @details Sends the latch config command. Configuration for channels in + * conversion cycle should be completed before this function. + * Channel enabled bit should be set before this function. + * Starts a conversion and configures the format of the sample. + * + */ +ADMW_RESULT admw_StartMeasurement( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_MEASUREMENT_MODE const eMeasurementMode) +{ + switch (eMeasurementMode) + { + case ADMW_MEASUREMENT_MODE_HEALTHCHECK: + return executeCommand(hDevice, CORE_COMMAND_SYSTEM_CHECK, false); + case ADMW_MEASUREMENT_MODE_NORMAL: + return executeCommand(hDevice, CORE_COMMAND_CONVERT_WITH_RAW, false); + case ADMW_MEASUREMENT_MODE_OMIT_RAW: + return executeCommand(hDevice, CORE_COMMAND_CONVERT, false); + case ADMW_MEASUREMENT_MODE_FFT: + return executeCommand(hDevice, CORE_COMMAND_CONVERT_FFT, false); + default: + ADMW_LOG_ERROR("Invalid measurement mode %d specified", + eMeasurementMode); + return ADMW_INVALID_PARAM; + } +} + +/* + * Store the configuration settings to persistent memory on the device. + * The settings can be saved to 4 different flash memory areas (slots). + * No other command must be running when this is called. + * Do not power down the device while this command is running. + */ +ADMW_RESULT admw_SaveConfig( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_USER_CONFIG_SLOT const eSlotId) +{ + switch (eSlotId) + { + case ADMW_FLASH_CONFIG_1: + return executeCommand(hDevice, CORE_COMMAND_SAVE_CONFIG_1, true); + case ADMW_FLASH_CONFIG_2: + return executeCommand(hDevice, CORE_COMMAND_SAVE_CONFIG_2, true); + case ADMW_FLASH_CONFIG_3: + return executeCommand(hDevice, CORE_COMMAND_SAVE_CONFIG_3, true); + case ADMW_FLASH_CONFIG_4: + return executeCommand(hDevice, CORE_COMMAND_SAVE_CONFIG_4, true); + default: + ADMW_LOG_ERROR("Invalid user config target slot %d specified", + eSlotId); + return ADMW_INVALID_PARAM; + } +} + +/* + * Restore the configuration settings from persistent memory on the device. + * No other command must be running when this is called. + */ +ADMW_RESULT admw_RestoreConfig( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_USER_CONFIG_SLOT const eSlotId) +{ + switch (eSlotId) + { + case ADMW_FLASH_CONFIG_1: + return executeCommand(hDevice, CORE_COMMAND_LOAD_CONFIG_1, true); + case ADMW_FLASH_CONFIG_2: + return executeCommand(hDevice, CORE_COMMAND_LOAD_CONFIG_2, true); + case ADMW_FLASH_CONFIG_3: + return executeCommand(hDevice, CORE_COMMAND_LOAD_CONFIG_3, true); + case ADMW_FLASH_CONFIG_4: + return executeCommand(hDevice, CORE_COMMAND_LOAD_CONFIG_4, true); + default: + ADMW_LOG_ERROR("Invalid user config source slot %d specified", + eSlotId); + return ADMW_INVALID_PARAM; + } +} + +/* + * Erase the entire external flash memory. + * No other command must be running when this is called. + */ +ADMW_RESULT admw_EraseExternalFlash( + ADMW_DEVICE_HANDLE const hDevice) +{ + return executeCommand(hDevice, CORE_COMMAND_ERASE_EXTERNAL_FLASH, true); +} + +/* + * Read the number of samples stored in external flash memory. + * No other command must be running when this is called. + */ +ADMW_RESULT admw_GetExternalFlashSampleCount( + ADMW_DEVICE_HANDLE const hDevice, + uint32_t * nSampleCount) +{ + CORE_Ext_Flash_Sample_Count_t nCount; + + READ_REG_U32(hDevice, nCount.VALUE32, CORE_EXT_FLASH_SAMPLE_COUNT); + + *nSampleCount = nCount.VALUE32; + + return ADMW_SUCCESS; +} + +// DEBUG - TO BE DELETED +ADMW_RESULT admw_SetExternalFlashIndex( + ADMW_DEVICE_HANDLE const hDevice, + uint32_t nStartIndex) +{ + WRITE_REG_U32(hDevice, nStartIndex, CORE_EXT_FLASH_INDEX); + + return ADMW_SUCCESS; +} + +/* + * Read a set of data samples stored in the device external flash memory. + * This may be called at any time. + */ +ADMW_RESULT admw_GetExternalFlashData( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_DATA_SAMPLE * const pSamples, + uint32_t const nStartIndex, + uint32_t const nRequested, + uint32_t * const pnReturned) +{ + ADMW_DEVICE_CONTEXT *pCtx = hDevice; + uint16_t command = ADMW1001_HOST_COMMS_READ_CMD | + (REG_CORE_EXT_FLASH_DATA & ADMW1001_HOST_COMMS_ADR_MASK); + uint8_t commandData[2] = { + command >> 8, + command & 0xFF + }; + uint8_t commandResponse[2]; + unsigned nValidSamples = 0; + ADMW_RESULT eRet = ADMW_SUCCESS; + + /* Setup initial sample */ + WRITE_REG_U32(hDevice, nStartIndex, CORE_EXT_FLASH_INDEX); + + /* Send flash read command */ + do { + eRet = admw_SpiTransfer(pCtx->hSpi, commandData, commandResponse, + sizeof(command), false); + if (eRet) + { + ADMW_LOG_ERROR("Failed to send read command for external flash"); + return eRet; + } + + admw_TimeDelayUsec(ADMW1001_HOST_COMMS_XFER_DELAY); + } while ((commandResponse[0] != ADMW1001_HOST_COMMS_CMD_RESP_0) || + (commandResponse[1] != ADMW1001_HOST_COMMS_CMD_RESP_1)); + + /* Read samples from external flash memory */ + for (unsigned i = 0; i < nRequested; i++) + { + ADMW1001_Sensor_Result_t sensorResult; + bool bHoldCs = true; + + /* Keep the CS signal asserted for all but the last sample */ + if ((i + 1) == nRequested) + bHoldCs = false; + + eRet = admw_SpiTransfer(pCtx->hSpi, NULL, (uint8_t *) (&sensorResult), + 8, bHoldCs); + if (eRet) + { + ADMW_LOG_ERROR("Failed to read data from external flash"); + return eRet; + } + + ADMW_DATA_SAMPLE *pSample = &pSamples[nValidSamples]; + + pSample->status = (ADMW_DEVICE_STATUS_FLAGS)0; + if (sensorResult.Ch_Error) + pSample->status |= ADMW_DEVICE_STATUS_ERROR; + if (sensorResult.Ch_Alert) + pSample->status |= ADMW_DEVICE_STATUS_ALERT; + + if (sensorResult.Ch_Raw) + pSample->rawValue = sensorResult.Raw_Sample; + else + pSample->rawValue = 0; + + pSample->channelId = sensorResult.Channel_ID; + pSample->processedValue = sensorResult.Sensor_Result; + + nValidSamples++; + } + *pnReturned = nValidSamples; + + admw_TimeDelayUsec(ADMW1001_HOST_COMMS_XFER_DELAY); + + return eRet; +} + + +/* + * Store the LUT data to persistent memory on the device. + * No other command must be running when this is called. + * Do not power down the device while this command is running. + */ +ADMW_RESULT admw_SaveLutData( + ADMW_DEVICE_HANDLE const hDevice) +{ + return executeCommand(hDevice, CORE_COMMAND_SAVE_LUT, true); +} + +/* + * Restore the LUT data from persistent memory on the device. + * No other command must be running when this is called. + */ +ADMW_RESULT admw_RestoreLutData( + ADMW_DEVICE_HANDLE const hDevice) +{ + return executeCommand(hDevice, CORE_COMMAND_LOAD_LUT, true); +} + +/* + * Stop the measurement cycles on the device. + * To be used only if a measurement command is currently running. + */ +ADMW_RESULT admw_StopMeasurement( + ADMW_DEVICE_HANDLE const hDevice) +{ + return executeCommand(hDevice, CORE_COMMAND_NOP, true); +} + +/* + * Run built-in diagnostic checks on the device. + * Diagnostics are executed according to the current applied settings. + * No other command must be running when this is called. + */ +ADMW_RESULT admw_RunDiagnostics( + ADMW_DEVICE_HANDLE const hDevice) +{ + return executeCommand(hDevice, CORE_COMMAND_RUN_DIAGNOSTICS, true); +} + +/* + * Run self-calibration routines on the device. + * Calibration is executed according to the current applied settings. + * No other command must be running when this is called. + */ +ADMW_RESULT admw_RunCalibration( + ADMW_DEVICE_HANDLE const hDevice) +{ + return executeCommand(hDevice, CORE_COMMAND_SELF_CALIBRATION, true); +} + +/* + * Run digital calibration routines on the device. + * Calibration is executed according to the current applied settings. + * No other command must be running when this is called. + */ +ADMW_RESULT admw_RunDigitalCalibration( + ADMW_DEVICE_HANDLE const hDevice) +{ + return executeCommand(hDevice, CORE_COMMAND_CALIBRATE_DIGITAL, true); +} + +/* + * Read a set of data samples from the device. + * This may be called at any time. + */ +ADMW_RESULT admw_GetData( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_MEASUREMENT_MODE const eMeasurementMode, + ADMW_DATA_SAMPLE * const pSamples, + uint8_t const nBytesPerSample, + uint32_t const nRequested, + uint32_t * const pnReturned) +{ + ADMW1001_Sensor_Result_t sensorResult; + ADMW_DEVICE_CONTEXT *pCtx = hDevice; + uint16_t command = ADMW1001_HOST_COMMS_READ_CMD | + (REG_CORE_DATA_FIFO & ADMW1001_HOST_COMMS_ADR_MASK); + uint8_t commandData[2] = { + command >> 8, + command & 0xFF + }; + uint8_t commandResponse[2]; + unsigned nValidSamples = 0; + ADMW_RESULT eRet = ADMW_SUCCESS; + + do { + eRet = admw_SpiTransfer(pCtx->hSpi, commandData, commandResponse, + sizeof(command), false); + if (eRet) + { + ADMW_LOG_ERROR("Failed to send read command for FIFO register"); + return eRet; + } + admw_TimeDelayUsec(ADMW1001_HOST_COMMS_XFER_DELAY); + } while ((commandResponse[0] != ADMW1001_HOST_COMMS_CMD_RESP_0) || + (commandResponse[1] != ADMW1001_HOST_COMMS_CMD_RESP_1)); + + for (unsigned i = 0; i < nRequested; i++) + { + bool bHoldCs = true; + + /* Keep the CS signal asserted for all but the last sample */ + if ((i + 1) == nRequested) + bHoldCs = false; + + getDataCnt++; + + eRet = admw_SpiTransfer(pCtx->hSpi, NULL, &sensorResult, + nBytesPerSample, bHoldCs); + if (eRet) + { + ADMW_LOG_ERROR("Failed to read data from FIFO register"); + return eRet; + } + + if (! sensorResult.Ch_Valid) + { + /* + * Reading an invalid sample indicates that there are no + * more samples available or we've lost sync with the device. + * In the latter case, it might be recoverable, but return here + * to let the application check the device status and decide itself. + */ + eRet = ADMW_INCOMPLETE; + break; + } + + ADMW_DATA_SAMPLE *pSample = &pSamples[nValidSamples]; + + pSample->status = (ADMW_DEVICE_STATUS_FLAGS)0; + if (sensorResult.Ch_Error) + pSample->status |= ADMW_DEVICE_STATUS_ERROR; + if (sensorResult.Ch_Alert) + pSample->status |= ADMW_DEVICE_STATUS_ALERT; + + if (sensorResult.Ch_Raw) + pSample->rawValue = sensorResult.Raw_Sample; + else + pSample->rawValue = 0; + + pSample->channelId = sensorResult.Channel_ID; + pSample->processedValue = sensorResult.Sensor_Result; + + nValidSamples++; + + admw_TimeDelayUsec(ADMW1001_HOST_COMMS_XFER_DELAY); + } + *pnReturned = nValidSamples; + + return eRet; +} + +/* + * Close the given ADMW device. + */ +ADMW_RESULT admw_Close( + ADMW_DEVICE_HANDLE const hDevice) +{ + ADMW_DEVICE_CONTEXT *pCtx = hDevice; + + admw_GpioClose(pCtx->hGpio); + admw_SpiClose(pCtx->hSpi); + admw_LogClose(); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_WriteRegister( + ADMW_DEVICE_HANDLE hDevice, + uint16_t nAddress, + void *pData, + unsigned nLength) +{ + ADMW_RESULT eRet; + ADMW_DEVICE_CONTEXT *pCtx = hDevice; + uint16_t command = ADMW1001_HOST_COMMS_WRITE_CMD | + (nAddress & ADMW1001_HOST_COMMS_ADR_MASK); + uint8_t commandData[2] = { + command >> 8, + command & 0xFF + }; + uint8_t commandResponse[2]; + + do { + eRet = admw_SpiTransfer(pCtx->hSpi, commandData, commandResponse, + sizeof(command), false); + if (eRet) + { + ADMW_LOG_ERROR("Failed to send write command for register %u", + nAddress); + return eRet; + } + + admw_TimeDelayUsec(ADMW1001_HOST_COMMS_XFER_DELAY); + } while ((commandResponse[0] != ADMW1001_HOST_COMMS_CMD_RESP_0) || + (commandResponse[1] != ADMW1001_HOST_COMMS_CMD_RESP_1)); + + eRet = admw_SpiTransfer(pCtx->hSpi, pData, NULL, nLength, false); + if (eRet) + { + ADMW_LOG_ERROR("Failed to write data (%dB) to register %u", + nLength, nAddress); + return eRet; + } + + admw_TimeDelayUsec(ADMW1001_HOST_COMMS_XFER_DELAY); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_ReadRegister( + ADMW_DEVICE_HANDLE hDevice, + uint16_t nAddress, + void *pData, + unsigned nLength) +{ + ADMW_RESULT eRet; + ADMW_DEVICE_CONTEXT *pCtx = hDevice; + uint16_t command = ADMW1001_HOST_COMMS_READ_CMD | + (nAddress & ADMW1001_HOST_COMMS_ADR_MASK); + uint8_t commandData[2] = { + command >> 8, + command & 0xFF + }; + uint8_t commandResponse[2]; + + do { + eRet = admw_SpiTransfer(pCtx->hSpi, commandData, commandResponse, + sizeof(command), false); + if (eRet) + { + ADMW_LOG_ERROR("Failed to send read command for register %u", + nAddress); + return eRet; + } + + admw_TimeDelayUsec(ADMW1001_HOST_COMMS_XFER_DELAY); + } while ((commandResponse[0] != ADMW1001_HOST_COMMS_CMD_RESP_0) || + (commandResponse[1] != ADMW1001_HOST_COMMS_CMD_RESP_1)); + + eRet = admw_SpiTransfer(pCtx->hSpi, NULL, pData, nLength, false); + if (eRet) + { + ADMW_LOG_ERROR("Failed to read data (%uB) from register %u", + nLength, nAddress); + return eRet; + } + + admw_TimeDelayUsec(ADMW1001_HOST_COMMS_XFER_DELAY); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw_GetDeviceReadyState( + ADMW_DEVICE_HANDLE const hDevice, + bool * const bReady) +{ + ADMW_SPI_Chip_Type_t chipTypeReg; + + READ_REG_U8(hDevice, chipTypeReg.VALUE8, SPI_CHIP_TYPE); + /* If we read this register successfully, assume the device is ready */ + *bReady = (chipTypeReg.VALUE8 == REG_SPI_CHIP_TYPE_RESET); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_GetDataReadyModeInfo( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_MEASUREMENT_MODE const eMeasurementMode, + ADMW1001_OPERATING_MODE * const peOperatingMode, + ADMW1001_DATAREADY_MODE * const peDataReadyMode, + uint32_t * const pnSamplesPerDataready, + uint32_t * const pnSamplesPerCycle, + uint8_t * const pnBytesPerSample) +{ + unsigned nChannelsEnabled = 0; + unsigned nSamplesPerCycle = 0; + + CORE_Mode_t modeReg; + READ_REG_U8(hDevice, modeReg.VALUE8, CORE_MODE); + + if ((eMeasurementMode == ADMW_MEASUREMENT_MODE_HEALTHCHECK) || + (modeReg.Conversion_Mode == CORE_MODE_SINGLECYCLE)) + *peOperatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE; + else if (modeReg.Conversion_Mode == CORE_MODE_MULTICYCLE) + *peOperatingMode = ADMW1001_OPERATING_MODE_MULTICYCLE; + else + *peOperatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS; + + + /* FFT mode is quite different to the other modes: + * - Each FFT result produces a batch of samples + * - The size of the batch depends on selected FFT size and output config options + * - DATAREADY will fire for each FFT result (once per channel) + * - The size of the cycle depends on the number of channels enabled for FFT + */ + if (eMeasurementMode == ADMW_MEASUREMENT_MODE_FFT) + { + CORE_FFT_Config_t fftConfigReg; + + unsigned nFftChannels; + unsigned nSamplesPerChannel; + + READ_REG_U32(hDevice, fftConfigReg.VALUE32, CORE_FFT_CONFIG); + + nFftChannels = fftConfigReg.FFT_Num_Channels + 1; + + if (fftConfigReg.FFT_Output == CORE_FFT_CONFIG_FFT_OUTPUT_MAX16) + { + nSamplesPerChannel = 16; + *pnBytesPerSample = 8; + } + else if (fftConfigReg.FFT_Output == CORE_FFT_CONFIG_FFT_OUTPUT_FULL) + { + nSamplesPerChannel = (256 << fftConfigReg.FFT_Num_Bins) >> 1; + *pnBytesPerSample = 5; + } + else if (fftConfigReg.FFT_Output == CORE_FFT_CONFIG_FFT_OUTPUT_FULL_WITH_RAW) + { + nSamplesPerChannel = (256 << fftConfigReg.FFT_Num_Bins); + *pnBytesPerSample = 8; + } + else + { + ADMW_LOG_ERROR("Invalid FFT output format option %d configured", + fftConfigReg.FFT_Output); + return ADMW_INVALID_PARAM; + } + + *pnSamplesPerDataready = nSamplesPerChannel; + *pnSamplesPerCycle = nSamplesPerChannel * nFftChannels; + + *peDataReadyMode = ADMW1001_DATAREADY_PER_CYCLE; + + if (modeReg.FFT_Mode == CORE_MODE_FFT_MODE_CONTINUOUS) + { + *peOperatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS; + } + else + { + *peOperatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE; + } + } + else + { + if (eMeasurementMode == ADMW_MEASUREMENT_MODE_OMIT_RAW) + { + *pnBytesPerSample = 5; + } + else + { + *pnBytesPerSample = 8; + } + + for (ADMW1001_CHANNEL_ID chId = ADMW1001_CHANNEL_ID_CJC_0; + chId < ADMW1001_MAX_CHANNELS; + chId++) + { + CORE_Sensor_Details_t sensorDetailsReg; + CORE_Channel_Count_t channelCountReg; + + if (ADMW1001_CHANNEL_IS_VIRTUAL(chId)) + continue; + + READ_REG_U8(hDevice, channelCountReg.VALUE8, CORE_CHANNEL_COUNTn(chId)); + READ_REG_U32(hDevice, sensorDetailsReg.VALUE32, CORE_SENSOR_DETAILSn(chId)); + + if (channelCountReg.Channel_Enable && !sensorDetailsReg.Do_Not_Publish) + { + CORE_Sensor_Type_t sensorTypeReg; + unsigned nActualChannels = 1; + + READ_REG_U16(hDevice, sensorTypeReg.VALUE16, CORE_SENSOR_TYPEn(chId)); + + if (chId == ADMW1001_CHANNEL_ID_SPI_0) + { + /* Some sensors automatically generate samples on additional "virtual" channels + * so these channels must be counted as active when those sensors are selected + * and we use the count from the corresponding "physical" channel */ + if ((sensorTypeReg.Sensor_Type >= + CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_A_DEF_L1) && + (sensorTypeReg.Sensor_Type <= + CORE_SENSOR_TYPE_SENSOR_SPI_ACCELEROMETER_B_ADV_L2)) + nActualChannels += 2; + } + + nChannelsEnabled += nActualChannels; + if (eMeasurementMode == ADMW_MEASUREMENT_MODE_HEALTHCHECK) + /* Assume a single sample per channel in test mode */ + nSamplesPerCycle += nActualChannels; + else + nSamplesPerCycle += nActualChannels * + (channelCountReg.Channel_Count + 1); + } + } + + if (nChannelsEnabled == 0) + { + *pnSamplesPerDataready = 0; + *pnSamplesPerCycle = 0; + return ADMW_SUCCESS; + } + + *pnSamplesPerCycle = nSamplesPerCycle; + + if (modeReg.Drdy_Mode == CORE_MODE_DRDY_PER_CONVERSION) + { + *pnSamplesPerDataready = 1; + } + else if (modeReg.Drdy_Mode == CORE_MODE_DRDY_PER_CYCLE) + { + *pnSamplesPerDataready = nSamplesPerCycle; + } + else + { + /* Assume DRDY will be asserted after max. 1 cycle in test mode */ + if (eMeasurementMode == ADMW_MEASUREMENT_MODE_HEALTHCHECK) + { + *pnSamplesPerDataready = nSamplesPerCycle; + } + else + { + CORE_Fifo_Num_Cycles_t fifoNumCyclesReg; + READ_REG_U8(hDevice, fifoNumCyclesReg.VALUE8, CORE_FIFO_NUM_CYCLES); + + *pnSamplesPerDataready = + nSamplesPerCycle * fifoNumCyclesReg.Fifo_Num_Cycles; + } + } + + if (modeReg.Drdy_Mode == CORE_MODE_DRDY_PER_CONVERSION) + *peDataReadyMode = ADMW1001_DATAREADY_PER_CONVERSION; + else if (modeReg.Drdy_Mode == CORE_MODE_DRDY_PER_CYCLE) + *peDataReadyMode = ADMW1001_DATAREADY_PER_CYCLE; + else + { + /* Assume DRDY will be asserted after max. 1 cycle in test mode */ + if (eMeasurementMode == ADMW_MEASUREMENT_MODE_HEALTHCHECK) + *peDataReadyMode = ADMW1001_DATAREADY_PER_CYCLE; + else + *peDataReadyMode = ADMW1001_DATAREADY_PER_MULTICYCLE_BURST; + } + } + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw_GetProductID( + ADMW_DEVICE_HANDLE hDevice, + ADMW_PRODUCT_ID *pProductId) +{ + ADMW_SPI_Product_ID_L_t productIdLoReg; + ADMW_SPI_Product_ID_H_t productIdHiReg; + + READ_REG_U8(hDevice, productIdLoReg.VALUE8, SPI_PRODUCT_ID_L); + READ_REG_U8(hDevice, productIdHiReg.VALUE8, SPI_PRODUCT_ID_H); + + *pProductId = (ADMW_PRODUCT_ID)((productIdHiReg.VALUE8 << 8) + | productIdLoReg.VALUE8); + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetPowerMode( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_POWER_MODE powerMode) +{ + CORE_Power_Config_t powerConfigReg; + + if (powerMode == ADMW1001_POWER_MODE_LOW) + { + powerConfigReg.Power_Mode_ADC = CORE_POWER_CONFIG_ADC_LOW_POWER; + } + else if (powerMode == ADMW1001_POWER_MODE_MID) + { + powerConfigReg.Power_Mode_ADC = CORE_POWER_CONFIG_ADC_MID_POWER; + } + else if (powerMode == ADMW1001_POWER_MODE_FULL) + { + powerConfigReg.Power_Mode_ADC = CORE_POWER_CONFIG_ADC_FULL_POWER; + } + else + { + ADMW_LOG_ERROR("Invalid power mode %d specified", powerMode); + return ADMW_INVALID_PARAM; + } + + WRITE_REG_U8(hDevice, powerConfigReg.VALUE8, CORE_POWER_CONFIG); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetPowerConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_POWER_CONFIG *pPowerConfig) +{ + ADMW_RESULT eRet; + + eRet = admw_SetPowerMode(hDevice, pPowerConfig->powerMode); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set power mode"); + return eRet; + } + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetMode( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_OPERATING_MODE eOperatingMode, + ADMW1001_DATAREADY_MODE eDataReadyMode, + ADMW1001_CALIBRATION_MODE eCalibrationMode, + bool bEnableExtFlash) +{ + CORE_Mode_t modeReg; + + modeReg.VALUE8 = REG_RESET_VAL(CORE_MODE); + + if (eOperatingMode == ADMW1001_OPERATING_MODE_SINGLECYCLE) + { + modeReg.Conversion_Mode = CORE_MODE_SINGLECYCLE; + } + else if (eOperatingMode == ADMW1001_OPERATING_MODE_CONTINUOUS) + { + modeReg.Conversion_Mode = CORE_MODE_CONTINUOUS; + } + else if (eOperatingMode == ADMW1001_OPERATING_MODE_MULTICYCLE) + { + modeReg.Conversion_Mode = CORE_MODE_MULTICYCLE; + } + else + { + ADMW_LOG_ERROR("Invalid operating mode %d specified", + eOperatingMode); + return ADMW_INVALID_PARAM; + } + + if (eDataReadyMode == ADMW1001_DATAREADY_PER_CONVERSION) + { + modeReg.Drdy_Mode = CORE_MODE_DRDY_PER_CONVERSION; + } + else if (eDataReadyMode == ADMW1001_DATAREADY_PER_CYCLE) + { + modeReg.Drdy_Mode = CORE_MODE_DRDY_PER_CYCLE; + } + else if (eDataReadyMode == ADMW1001_DATAREADY_PER_MULTICYCLE_BURST) + { + if (eOperatingMode != ADMW1001_OPERATING_MODE_MULTICYCLE) + { + ADMW_LOG_ERROR( + "Data-ready mode %d cannot be used with operating mode %d", + eDataReadyMode, eOperatingMode); + return ADMW_INVALID_PARAM; + } + else + { + modeReg.Drdy_Mode = CORE_MODE_DRDY_PER_FIFO_FILL; + } + } + else + { + ADMW_LOG_ERROR("Invalid data-ready mode %d specified", eDataReadyMode); + return ADMW_INVALID_PARAM; + } + + if (eCalibrationMode == ADMW1001_NO_CALIBRATION) + { + modeReg.Calibration_Method = CORE_MODE_NO_CAL; + } + else if (eCalibrationMode == ADMW1001_DO_CALIBRATION) + { + modeReg.Calibration_Method = CORE_MODE_DO_CAL; + } + else + { + ADMW_LOG_ERROR("Invalid calibration mode %d specified", + eCalibrationMode); + return ADMW_INVALID_PARAM; + } + + modeReg.Ext_Flash_Store = (bEnableExtFlash ? + CORE_MODE_EXT_FLASH_USED : + CORE_MODE_EXT_FLASH_NOT_USED); + + WRITE_REG_U8(hDevice, modeReg.VALUE8, CORE_MODE); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw_SetCycleControl( + ADMW_DEVICE_HANDLE hDevice, + uint32_t nCycleInterval, + +#ifdef __V2_3_CFG_FMT__ + ADMW1001_CYCLE_TYPE eCycleType, + ADMW1001_FILTER_SETTLING eFilterSettling) +#else + ADMW1001_CYCLE_TYPE eCycleType) +#endif +{ + CORE_Cycle_Control_t cycleControlReg; + + cycleControlReg.VALUE16 = REG_RESET_VAL(CORE_CYCLE_CONTROL); + + if (nCycleInterval < (1 << 12)) + { + cycleControlReg.Cycle_Time_Units = CORE_CYCLE_CONTROL_MICROSECONDS; + } + else if (nCycleInterval < (1000 * (1 << 12))) + { + cycleControlReg.Cycle_Time_Units = CORE_CYCLE_CONTROL_MILLISECONDS; + nCycleInterval /= 1000; + } + else + { + cycleControlReg.Cycle_Time_Units = CORE_CYCLE_CONTROL_SECONDS; + nCycleInterval /= 1000000; + } + + CHECK_REG_FIELD_VAL(CORE_CYCLE_CONTROL_CYCLE_TIME, nCycleInterval); + cycleControlReg.Cycle_Time = nCycleInterval; + + if (eCycleType == ADMW1001_CYCLE_TYPE_SWITCH) + { + cycleControlReg.Cycle_Type = CORE_CYCLE_CONTROL_CYCLE_TYPE_SWITCH; + } + else if (eCycleType == ADMW1001_CYCLE_TYPE_FULL) + { + cycleControlReg.Cycle_Type = CORE_CYCLE_CONTROL_CYCLE_TYPE_FULL; + } + else + { + ADMW_LOG_ERROR("Invalid cycle type %d specified", eCycleType); + return ADMW_INVALID_PARAM; + } + +#ifdef __V2_3_CFG_FMT__ + if (eFilterSettling == ADMW1001_FILTER_SETTLING_ALWAYS) + { + cycleControlReg.Filter_Settling = CORE_CYCLE_CONTROL_FILTER_SETTLING_SETTLED; + } + else if (eFilterSettling == ADMW1001_FILTER_SETTLING_FAST) + { + cycleControlReg.Filter_Settling = CORE_CYCLE_CONTROL_FILTER_SETTLING_FAST; + } + else + { + ADMW_LOG_ERROR("Invalid filter settling option %d specified", eFilterSettling); + return ADMW_INVALID_PARAM; + } +#endif + + WRITE_REG_U16(hDevice, cycleControlReg.VALUE16, CORE_CYCLE_CONTROL); + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetMultiCycleConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_MULTICYCLE_CONFIG *pMultiCycleConfig) +{ + CHECK_REG_FIELD_VAL(CORE_FIFO_NUM_CYCLES_FIFO_NUM_CYCLES, + pMultiCycleConfig->cyclesPerBurst); + + WRITE_REG_U8(hDevice, pMultiCycleConfig->cyclesPerBurst, + CORE_FIFO_NUM_CYCLES); + + WRITE_REG_U32(hDevice, pMultiCycleConfig->burstInterval, + CORE_MULTI_CYCLE_REPEAT_INTERVAL); + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetExternalReferenceValues( + ADMW_DEVICE_HANDLE hDevice, + float32_t externalRef1Value, + float32_t externalRef2Value) +{ + WRITE_REG_FLOAT(hDevice, externalRef1Value, CORE_EXTERNAL_REFERENCE1); + WRITE_REG_FLOAT(hDevice, externalRef2Value, CORE_EXTERNAL_REFERENCE2); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetMeasurementConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_MEASUREMENT_CONFIG *pMeasConfig) +{ + ADMW_RESULT eRet; + + eRet = admw_SetMode(hDevice, + pMeasConfig->operatingMode, + pMeasConfig->dataReadyMode, + pMeasConfig->calibrationMode, + pMeasConfig->enableExternalFlash); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set operating mode"); + return eRet; + } + + eRet = admw_SetCycleControl(hDevice, + pMeasConfig->cycleInterval, + pMeasConfig->cycleType); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set cycle control"); + return eRet; + } + + if (pMeasConfig->operatingMode == ADMW1001_OPERATING_MODE_MULTICYCLE) + { + eRet = admw_SetMultiCycleConfig(hDevice, + &pMeasConfig->multiCycleConfig); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set multi-cycle configuration"); + return eRet; + } + } + + eRet = admw_SetExternalReferenceValues(hDevice, + pMeasConfig->externalRef1Value, + pMeasConfig->externalRef2Value); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set external reference values"); + return eRet; + } + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetDiagnosticsConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_DIAGNOSTICS_CONFIG *pDiagnosticsConfig) +{ + CORE_Diagnostics_Control_t diagnosticsControlReg; + + diagnosticsControlReg.VALUE16 = REG_RESET_VAL(CORE_DIAGNOSTICS_CONTROL); + + if (pDiagnosticsConfig->disableGlobalDiag) + diagnosticsControlReg.Diag_Global_En = 0; + else + diagnosticsControlReg.Diag_Global_En = 1; + + if (pDiagnosticsConfig->disableMeasurementDiag) + diagnosticsControlReg.Diag_Meas_En = 0; + else + diagnosticsControlReg.Diag_Meas_En = 1; + + switch (pDiagnosticsConfig->osdFrequency) + { + case ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED: + diagnosticsControlReg.Diag_OSD_Freq = CORE_DIAGNOSTICS_CONTROL_OCD_OFF; + break; + case ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_CYCLE: + diagnosticsControlReg.Diag_OSD_Freq = CORE_DIAGNOSTICS_CONTROL_OCD_PER_1_CYCLE; + break; + case ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_100_CYCLES: + diagnosticsControlReg.Diag_OSD_Freq = CORE_DIAGNOSTICS_CONTROL_OCD_PER_100_CYCLES; + break; + case ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_1000_CYCLES: + diagnosticsControlReg.Diag_OSD_Freq = CORE_DIAGNOSTICS_CONTROL_OCD_PER_1000_CYCLES; + break; + default: + ADMW_LOG_ERROR("Invalid open-sensor diagnostic frequency %d specified", + pDiagnosticsConfig->osdFrequency); + return ADMW_INVALID_PARAM; + } + + WRITE_REG_U16(hDevice, diagnosticsControlReg.VALUE16, CORE_DIAGNOSTICS_CONTROL); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetFftConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_FFT_CONFIG *pFftConfig, + ADMW1001_CHANNEL_CONFIG *pChannels) +{ + CORE_FFT_Config_t fftConfigReg; + CORE_Mode_t modeReg; + uint32_t numFftChannels = 0; + + fftConfigReg.VALUE32 = REG_RESET_VAL(CORE_FFT_CONFIG); + + for (ADMW1001_CHANNEL_ID id = ADMW1001_CHANNEL_ID_CJC_0; + id < ADMW1001_MAX_CHANNELS; + id++) + { + if (pChannels[id].enableFFT) + { + if (numFftChannels >= 4) /* TODO - temporary limit */ + { + ADMW_LOG_ERROR("Maximum limit of 4 FFT channels exceeded"); + return ADMW_INVALID_PARAM; + } + + numFftChannels++; + } + } + + if (numFftChannels > 0) + { + fftConfigReg.FFT_Num_Channels = numFftChannels - 1; + + switch (pFftConfig->size) + { + case ADMW1001_FFT_SIZE_256: + fftConfigReg.FFT_Num_Bins = CORE_FFT_CONFIG_FFT_BINS_256; + break; + case ADMW1001_FFT_SIZE_512: + fftConfigReg.FFT_Num_Bins = CORE_FFT_CONFIG_FFT_BINS_512; + break; + case ADMW1001_FFT_SIZE_1024: + fftConfigReg.FFT_Num_Bins = CORE_FFT_CONFIG_FFT_BINS_1024; + break; + case ADMW1001_FFT_SIZE_2048: + fftConfigReg.FFT_Num_Bins = CORE_FFT_CONFIG_FFT_BINS_2048; + break; + default: + ADMW_LOG_ERROR("Invalid FFT size option %d specified", + pFftConfig->size); + return ADMW_INVALID_PARAM; + } + + switch (pFftConfig->window) + { + case ADMW1001_FFT_WINDOW_NONE: + fftConfigReg.FFT_Window = CORE_FFT_CONFIG_FFT_WINDOW_NONE; + break; + case ADMW1001_FFT_WINDOW_HANN: + fftConfigReg.FFT_Window = CORE_FFT_CONFIG_FFT_WINDOW_HANN; + break; + case ADMW1001_FFT_WINDOW_BLACKMAN_HARRIS: + fftConfigReg.FFT_Window = CORE_FFT_CONFIG_FFT_WINDOW_BLACKMANN_HARRIS; + break; + default: + ADMW_LOG_ERROR("Invalid FFT window option %d specified", + pFftConfig->window); + return ADMW_INVALID_PARAM; + } + + switch (pFftConfig->output) + { + case ADMW1001_FFT_OUTPUT_FULL: + fftConfigReg.FFT_Output = CORE_FFT_CONFIG_FFT_OUTPUT_FULL; + break; + case ADMW1001_FFT_OUTPUT_MAX16: + fftConfigReg.FFT_Output = CORE_FFT_CONFIG_FFT_OUTPUT_MAX16; + break; + case ADMW1001_FFT_OUTPUT_FULL_WITH_RAW: + fftConfigReg.FFT_Output = CORE_FFT_CONFIG_FFT_OUTPUT_FULL_WITH_RAW; + break; + default: + ADMW_LOG_ERROR("Invalid FFT output format option %d specified", + pFftConfig->output); + return ADMW_INVALID_PARAM; + } + } + WRITE_REG_U32(hDevice, fftConfigReg.VALUE32, CORE_FFT_CONFIG); + + if (numFftChannels > 0) + { + READ_REG_U8(hDevice, modeReg.VALUE8, CORE_MODE); + + if (pFftConfig->mode == ADMW1001_FFT_MODE_SINGLE) + { + modeReg.FFT_Mode = CORE_MODE_FFT_MODE_SINGLE; + } + else if (pFftConfig->mode == ADMW1001_FFT_MODE_CONTINUOUS) + { + modeReg.FFT_Mode = CORE_MODE_FFT_MODE_CONTINUOUS; + } + else + { + ADMW_LOG_ERROR("Invalid FFT mode %d specified", + pFftConfig->mode); + return ADMW_INVALID_PARAM; + } + + WRITE_REG_U8(hDevice, modeReg.VALUE8, CORE_MODE); + } + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetChannelCount( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + uint32_t nMeasurementsPerCycle) +{ + CORE_Channel_Count_t channelCountReg; + + channelCountReg.VALUE8 = REG_RESET_VAL(CORE_CHANNEL_COUNTn); + + if (nMeasurementsPerCycle > 0) + { + nMeasurementsPerCycle -= 1; + + CHECK_REG_FIELD_VAL(CORE_CHANNEL_COUNT_CHANNEL_COUNT, + nMeasurementsPerCycle); + + channelCountReg.Channel_Enable = 1; + channelCountReg.Channel_Count = nMeasurementsPerCycle; + } + else + { + channelCountReg.Channel_Enable = 0; + } + + WRITE_REG_U8(hDevice, channelCountReg.VALUE8, CORE_CHANNEL_COUNTn(eChannelId)); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetChannelOptions( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_CHANNEL_PRIORITY ePriority, + bool bEnableFft) +{ + CORE_Channel_Options_t channelOptionsReg; + + channelOptionsReg.VALUE8 = REG_RESET_VAL(CORE_CHANNEL_OPTIONSn); + + CHECK_REG_FIELD_VAL(CORE_CHANNEL_OPTIONS_CHANNEL_PRIORITY, ePriority); + channelOptionsReg.Channel_Priority = ePriority; + channelOptionsReg.FFT_Enable_Ch = bEnableFft ? 1 : 0; + + WRITE_REG_U8(hDevice, channelOptionsReg.VALUE8, CORE_CHANNEL_OPTIONSn(eChannelId)); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetChannelSkipCount( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + uint32_t nCycleSkipCount) +{ + CORE_Channel_Skip_t channelSkipReg; + + channelSkipReg.VALUE16 = REG_RESET_VAL(CORE_CHANNEL_SKIPn); + + CHECK_REG_FIELD_VAL(CORE_CHANNEL_SKIP_CHANNEL_SKIP, nCycleSkipCount); + + channelSkipReg.Channel_Skip = nCycleSkipCount; + + WRITE_REG_U16(hDevice, channelSkipReg.VALUE16, CORE_CHANNEL_SKIPn(eChannelId)); + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetChannelAdcSensorType( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_ADC_SENSOR_TYPE sensorType) +{ + CORE_Sensor_Type_t sensorTypeReg; + + sensorTypeReg.VALUE16 = REG_RESET_VAL(CORE_SENSOR_TYPEn); + + /* Ensure that the sensor type is valid for this channel */ + switch(sensorType) + { + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_1_DEF_L2: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_2_DEF_L2: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_3_DEF_L2: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_4_DEF_L2: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_J_ADV_L1: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_K_ADV_L1: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_T_ADV_L1: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_1_ADV_L2: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_2_ADV_L2: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_3_ADV_L2: + case ADMW1001_ADC_SENSOR_THERMOCOUPLE_4_ADV_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_1_DEF_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_2_DEF_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_3_DEF_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_4_DEF_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_1_ADV_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_2_ADV_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_3_ADV_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_4_ADV_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_1_DEF_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_2_DEF_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_3_DEF_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_4_DEF_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_1_ADV_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_2_ADV_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_3_ADV_L2: + case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_4_ADV_L2: + if (! ADMW1001_CHANNEL_IS_ADC_SENSOR(eChannelId)) + { + ADMW_LOG_ERROR( + "Invalid ADC sensor type %d specified for channel %d", + sensorType, eChannelId); + return ADMW_INVALID_PARAM; + } + break; + case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT1000_DEF_L1: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_1_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_2_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_3_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_4_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100_ADV_L1: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_PT1000_ADV_L1: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_1_ADV_L2: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_2_ADV_L2: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_3_ADV_L2: + case ADMW1001_ADC_SENSOR_RTD_2WIRE_4_ADV_L2: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_PT100_DEF_L1: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_PT1000_DEF_L1: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_1_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_2_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_3_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_4_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_PT100_ADV_L1: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_PT1000_ADV_L1: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_1_ADV_L2: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_2_ADV_L2: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_3_ADV_L2: + case ADMW1001_ADC_SENSOR_RTD_3WIRE_4_ADV_L2: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT100_DEF_L1: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT1000_DEF_L1: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_1_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_2_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_3_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_4_DEF_L2: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT100_ADV_L1: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_PT1000_ADV_L1: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_1_ADV_L2: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_2_ADV_L2: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_3_ADV_L2: + case ADMW1001_ADC_SENSOR_RTD_4WIRE_4_ADV_L2: + if (!ADMW1001_CHANNEL_IS_ADC_CJC(eChannelId)) + { + ADMW_LOG_ERROR( + "Invalid ADC sensor type %d specified for channel %d", + sensorType, eChannelId); + return ADMW_INVALID_PARAM; + } + break; + case ADMW1001_ADC_SENSOR_DIODE_2C_TYPEA_DEF_L1: + case ADMW1001_ADC_SENSOR_DIODE_3C_TYPEA_DEF_L1: + case ADMW1001_ADC_SENSOR_DIODE_2C_1_DEF_L2: + case ADMW1001_ADC_SENSOR_DIODE_3C_1_DEF_L2: + case ADMW1001_ADC_SENSOR_DIODE_2C_TYPEA_ADV_L1: + case ADMW1001_ADC_SENSOR_DIODE_3C_TYPEA_ADV_L1: + case ADMW1001_ADC_SENSOR_DIODE_2C_1_ADV_L2: + case ADMW1001_ADC_SENSOR_DIODE_3C_1_ADV_L2: + case ADMW1001_ADC_SENSOR_THERMISTOR_A_10K_DEF_L1: + case ADMW1001_ADC_SENSOR_THERMISTOR_B_10K_DEF_L1: + case ADMW1001_ADC_SENSOR_THERMISTOR_1_DEF_L2: + case ADMW1001_ADC_SENSOR_THERMISTOR_2_DEF_L2: + case ADMW1001_ADC_SENSOR_THERMISTOR_3_DEF_L2: + case ADMW1001_ADC_SENSOR_THERMISTOR_4_DEF_L2: + case ADMW1001_ADC_SENSOR_THERMISTOR_A_10K_ADV_L1: + case ADMW1001_ADC_SENSOR_THERMISTOR_B_10K_ADV_L1: + case ADMW1001_ADC_SENSOR_THERMISTOR_1_ADV_L2: + case ADMW1001_ADC_SENSOR_THERMISTOR_2_ADV_L2: + case ADMW1001_ADC_SENSOR_THERMISTOR_3_ADV_L2: + case ADMW1001_ADC_SENSOR_THERMISTOR_4_ADV_L2: + if (! (ADMW1001_CHANNEL_IS_ADC_SENSOR(eChannelId) || + ADMW1001_CHANNEL_IS_ADC_CJC(eChannelId))) + { + ADMW_LOG_ERROR( + "Invalid ADC sensor type %d specified for channel %d", + sensorType, eChannelId); + return ADMW_INVALID_PARAM; + } + break; + case ADMW1001_ADC_SENSOR_VOLTAGE: + case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1: + case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_B_DEF_L1: + case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_1_DEF_L2: + case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_2_DEF_L2: + case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_A_ADV_L1: + case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_B_ADV_L1: + case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_1_ADV_L2: + case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_2_ADV_L2: + if (! ADMW1001_CHANNEL_IS_ADC_VOLTAGE(eChannelId)) + { + ADMW_LOG_ERROR( + "Invalid ADC sensor type %d specified for channel %d", + sensorType, eChannelId); + return ADMW_INVALID_PARAM; + } + break; + case ADMW1001_ADC_SENSOR_CURRENT: + case ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1: + case ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_1_DEF_L2: + case ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_2_DEF_L2: + case ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_A_ADV_L1: + case ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_1_ADV_L2: + case ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_2_ADV_L2: + if (! ADMW1001_CHANNEL_IS_ADC_CURRENT(eChannelId)) + { + ADMW_LOG_ERROR( + "Invalid ADC sensor type %d specified for channel %d", + sensorType, eChannelId); + return ADMW_INVALID_PARAM; + } + break; + default: + ADMW_LOG_ERROR("Invalid/unsupported ADC sensor type %d specified", + sensorType); + return ADMW_INVALID_PARAM; + } + + sensorTypeReg.Sensor_Type = sensorType; + + WRITE_REG_U16(hDevice, sensorTypeReg.VALUE16, CORE_SENSOR_TYPEn(eChannelId)); + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetChannelAdcSensorDetails( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_CHANNEL_CONFIG *pChannelConfig) +/* + * TODO - it would be nice if the general- vs. ADC-specific sensor details could be split into separate registers + * General details: + * - Measurement_Units + * - Compensation_Channel + * - CJC_Publish (if "CJC" was removed from the name) + * ADC-specific details: + * - PGA_Gain + * - Reference_Select + * - Reference_Buffer_Disable + * - Vbias + */ +{ + ADMW1001_ADC_CHANNEL_CONFIG *pAdcChannelConfig = &pChannelConfig->adcChannelConfig; + ADMW1001_ADC_REFERENCE_CONFIG *pRefConfig = &pAdcChannelConfig->reference; + CORE_Sensor_Details_t sensorDetailsReg; + + sensorDetailsReg.VALUE32 = REG_RESET_VAL(CORE_SENSOR_DETAILSn); + + switch(pChannelConfig->measurementUnit) + { + case ADMW1001_MEASUREMENT_UNIT_FAHRENHEIT: + sensorDetailsReg.Measurement_Units = CORE_SENSOR_DETAILS_UNITS_DEGF; + break; + case ADMW1001_MEASUREMENT_UNIT_CELSIUS: + sensorDetailsReg.Measurement_Units = CORE_SENSOR_DETAILS_UNITS_DEGC; + break; + case ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED: + sensorDetailsReg.Measurement_Units = CORE_SENSOR_DETAILS_UNITS_UNSPECIFIED; + break; + default: + ADMW_LOG_ERROR("Invalid measurement unit %d specified", + pChannelConfig->measurementUnit); + return ADMW_INVALID_PARAM; + } + + if (pChannelConfig->compensationChannel == ADMW1001_CHANNEL_ID_NONE) + { + sensorDetailsReg.Compensation_Disable = 1; + sensorDetailsReg.Compensation_Channel = 0; + } + else + { + sensorDetailsReg.Compensation_Disable = 0; + sensorDetailsReg.Compensation_Channel = pChannelConfig->compensationChannel; + } + + switch(pRefConfig->type) + { + case ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1: + sensorDetailsReg.Reference_Select = CORE_SENSOR_DETAILS_REF_RINT1; + break; + case ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_2: + sensorDetailsReg.Reference_Select = CORE_SENSOR_DETAILS_REF_RINT2; + break; + case ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL: + sensorDetailsReg.Reference_Select = CORE_SENSOR_DETAILS_REF_INT; + break; + case ADMW1001_ADC_REFERENCE_VOLTAGE_AVDD: + sensorDetailsReg.Reference_Select = CORE_SENSOR_DETAILS_REF_AVDD; + break; + case ADMW1001_ADC_REFERENCE_RESISTOR_EXTERNAL_1: + sensorDetailsReg.Reference_Select = CORE_SENSOR_DETAILS_REF_REXT1; + break; + case ADMW1001_ADC_REFERENCE_RESISTOR_EXTERNAL_2: + sensorDetailsReg.Reference_Select = CORE_SENSOR_DETAILS_REF_REXT2; + break; + case ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_1: + sensorDetailsReg.Reference_Select = CORE_SENSOR_DETAILS_REF_VEXT1; + break; + case ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_2: + sensorDetailsReg.Reference_Select = CORE_SENSOR_DETAILS_REF_VEXT2; + break; + case ADMW1001_ADC_REFERENCE_BRIDGE_EXCITATION: + sensorDetailsReg.Reference_Select = CORE_SENSOR_DETAILS_REF_EXC; + break; + default: + ADMW_LOG_ERROR("Invalid ADC reference type %d specified", + pRefConfig->type); + return ADMW_INVALID_PARAM; + } + + switch(pAdcChannelConfig->gain) + { + case ADMW1001_ADC_GAIN_1X: + sensorDetailsReg.PGA_Gain = CORE_SENSOR_DETAILS_PGA_GAIN_1; + break; + case ADMW1001_ADC_GAIN_2X: + sensorDetailsReg.PGA_Gain = CORE_SENSOR_DETAILS_PGA_GAIN_2; + break; + case ADMW1001_ADC_GAIN_4X: + sensorDetailsReg.PGA_Gain = CORE_SENSOR_DETAILS_PGA_GAIN_4; + break; + case ADMW1001_ADC_GAIN_8X: + sensorDetailsReg.PGA_Gain = CORE_SENSOR_DETAILS_PGA_GAIN_8; + break; + case ADMW1001_ADC_GAIN_16X: + sensorDetailsReg.PGA_Gain = CORE_SENSOR_DETAILS_PGA_GAIN_16; + break; + case ADMW1001_ADC_GAIN_32X: + sensorDetailsReg.PGA_Gain = CORE_SENSOR_DETAILS_PGA_GAIN_32; + break; + case ADMW1001_ADC_GAIN_64X: + sensorDetailsReg.PGA_Gain = CORE_SENSOR_DETAILS_PGA_GAIN_64; + break; + case ADMW1001_ADC_GAIN_128X: + sensorDetailsReg.PGA_Gain = CORE_SENSOR_DETAILS_PGA_GAIN_128; + break; + default: + ADMW_LOG_ERROR("Invalid ADC gain %d specified", + pAdcChannelConfig->gain); + return ADMW_INVALID_PARAM; + } + + if (pAdcChannelConfig->enableVbias) + sensorDetailsReg.Vbias = 1; + else + sensorDetailsReg.Vbias = 0; + + if (pAdcChannelConfig->reference.disableBuffer) + sensorDetailsReg.Reference_Buffer_Disable = 1; + else + sensorDetailsReg.Reference_Buffer_Disable = 0; + + if (pChannelConfig->disablePublishing) + sensorDetailsReg.Do_Not_Publish = 1; + else + sensorDetailsReg.Do_Not_Publish = 0; + + if (pChannelConfig->enableUnityLut) + sensorDetailsReg.Unity_LUT_Select = 1; + else + sensorDetailsReg.Unity_LUT_Select = 0; + + WRITE_REG_U32(hDevice, sensorDetailsReg.VALUE32, CORE_SENSOR_DETAILSn(eChannelId)); + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetChannelAdcFilter( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_ADC_FILTER_CONFIG *pFilterConfig) +{ + CORE_Filter_Select_t filterSelectReg; + + filterSelectReg.VALUE32 = REG_RESET_VAL(CORE_FILTER_SELECTn); + + if (pFilterConfig->type == ADMW1001_ADC_FILTER_SINC4) + { + filterSelectReg.ADC_Filter_Type = CORE_FILTER_SELECT_FILTER_SINC4; + filterSelectReg.ADC_FS = pFilterConfig->fs; + } + else if (pFilterConfig->type == ADMW1001_ADC_FILTER_FIR_20SPS) + { + filterSelectReg.ADC_Filter_Type = CORE_FILTER_SELECT_FILTER_FIR_20SPS; + } + else if (pFilterConfig->type == ADMW1001_ADC_FILTER_FIR_25SPS) + { + filterSelectReg.ADC_Filter_Type = CORE_FILTER_SELECT_FILTER_FIR_25SPS; + } + else + { + ADMW_LOG_ERROR("Invalid ADC filter type %d specified", + pFilterConfig->type); + return ADMW_INVALID_PARAM; + } + + WRITE_REG_U32(hDevice, filterSelectReg.VALUE32, CORE_FILTER_SELECTn(eChannelId)); + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetChannelAdcCurrentConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_ADC_EXC_CURRENT_CONFIG *pCurrentConfig) +{ + CORE_Channel_Excitation_t channelExcitationReg; + + channelExcitationReg.VALUE8 = REG_RESET_VAL(CORE_CHANNEL_EXCITATIONn); + + if (pCurrentConfig->outputLevel == ADMW1001_ADC_EXC_CURRENT_NONE) + { + channelExcitationReg.IOUT_Excitation_Current = CORE_CHANNEL_EXCITATION_IEXC_OFF; + } + else + { + if (pCurrentConfig->outputLevel == ADMW1001_ADC_EXC_CURRENT_50uA) + channelExcitationReg.IOUT_Excitation_Current = CORE_CHANNEL_EXCITATION_IEXC_50UA; + else if (pCurrentConfig->outputLevel == ADMW1001_ADC_EXC_CURRENT_100uA) + channelExcitationReg.IOUT_Excitation_Current = CORE_CHANNEL_EXCITATION_IEXC_100UA; + else if (pCurrentConfig->outputLevel == ADMW1001_ADC_EXC_CURRENT_250uA) + channelExcitationReg.IOUT_Excitation_Current = CORE_CHANNEL_EXCITATION_IEXC_250UA; + else if (pCurrentConfig->outputLevel == ADMW1001_ADC_EXC_CURRENT_500uA) + channelExcitationReg.IOUT_Excitation_Current = CORE_CHANNEL_EXCITATION_IEXC_500UA; + else if (pCurrentConfig->outputLevel == ADMW1001_ADC_EXC_CURRENT_750uA) + channelExcitationReg.IOUT_Excitation_Current = CORE_CHANNEL_EXCITATION_IEXC_750UA; + else if (pCurrentConfig->outputLevel == ADMW1001_ADC_EXC_CURRENT_1000uA) + channelExcitationReg.IOUT_Excitation_Current = CORE_CHANNEL_EXCITATION_IEXC_1000UA; + else + { + ADMW_LOG_ERROR("Invalid ADC excitation current %d specified", + pCurrentConfig->outputLevel); + return ADMW_INVALID_PARAM; + } + } + + if (pCurrentConfig->diodeRatio == ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_DEFAULT) + { + channelExcitationReg.IOUT_Diode_Ratio = 0; + } + else + { + channelExcitationReg.IOUT_Diode_Ratio = 1; + } + + WRITE_REG_U8(hDevice, channelExcitationReg.VALUE8, CORE_CHANNEL_EXCITATIONn(eChannelId)); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw_SetAdcChannelConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_CHANNEL_CONFIG *pChannelConfig) +{ + ADMW_RESULT eRet; + ADMW1001_ADC_CHANNEL_CONFIG *pAdcChannelConfig = + &pChannelConfig->adcChannelConfig; + + eRet = admw_SetChannelAdcSensorType(hDevice, eChannelId, + pAdcChannelConfig->sensor); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set ADC sensor type for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetChannelAdcSensorDetails(hDevice, eChannelId, + pChannelConfig); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set ADC sensor details for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetChannelAdcFilter(hDevice, eChannelId, + &pAdcChannelConfig->filter); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set ADC filter for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetChannelAdcCurrentConfig(hDevice, eChannelId, + &pAdcChannelConfig->current); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set ADC current for channel %d", + eChannelId); + return eRet; + } + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetChannelDigitalSensorDetails( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_CHANNEL_CONFIG *pChannelConfig) +{ + CORE_Sensor_Details_t sensorDetailsReg; + + sensorDetailsReg.VALUE32 = REG_RESET_VAL(CORE_SENSOR_DETAILSn); + + if (pChannelConfig->compensationChannel == ADMW1001_CHANNEL_ID_NONE) + { + sensorDetailsReg.Compensation_Disable = 1; + sensorDetailsReg.Compensation_Channel = 0; + } + else + { + ADMW_LOG_ERROR("Invalid compensation channel specified for digital sensor"); + return ADMW_INVALID_PARAM; + } + + if (pChannelConfig->measurementUnit == ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED) + { + sensorDetailsReg.Measurement_Units = CORE_SENSOR_DETAILS_UNITS_UNSPECIFIED; + } + else + { + ADMW_LOG_ERROR("Invalid measurement unit specified for digital channel"); + return ADMW_INVALID_PARAM; + } + + if (pChannelConfig->disablePublishing) + sensorDetailsReg.Do_Not_Publish = 1; + else + sensorDetailsReg.Do_Not_Publish = 0; + + if (pChannelConfig->enableUnityLut) + sensorDetailsReg.Unity_LUT_Select = 1; + else + sensorDetailsReg.Unity_LUT_Select = 0; + + sensorDetailsReg.Vbias = 0; + sensorDetailsReg.Reference_Buffer_Disable = 1; + + WRITE_REG_U32(hDevice, sensorDetailsReg.VALUE32, CORE_SENSOR_DETAILSn(eChannelId)); + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetDigitalSensorCommands( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_DIGITAL_SENSOR_COMMAND *pConfigCommand, + ADMW1001_DIGITAL_SENSOR_COMMAND *pDataRequestCommand) +{ + CORE_Digital_Sensor_Num_Cmds_t numCmdsReg; + + numCmdsReg.VALUE8 = REG_RESET_VAL(CORE_DIGITAL_SENSOR_NUM_CMDSn); + + CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_CFG_CMDS, + pConfigCommand->commandLength); + CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_NUM_CMDS_DIGITAL_SENSOR_NUM_READ_CMDS, + pDataRequestCommand->commandLength); + + numCmdsReg.Digital_Sensor_Num_Cfg_Cmds = pConfigCommand->commandLength; + numCmdsReg.Digital_Sensor_Num_Read_Cmds = pDataRequestCommand->commandLength; + + WRITE_REG_U8(hDevice, numCmdsReg.VALUE8, + CORE_DIGITAL_SENSOR_NUM_CMDSn(eChannelId)); + + /* + * NOTE - the fall-through cases in the switch statement below are + * intentional, so temporarily disable related compiler warnings which may + * be produced here by GCC + */ +#ifndef __CC_ARM +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" +#endif + + switch (pConfigCommand->commandLength) + { + case 7: + WRITE_REG_U8(hDevice, pConfigCommand->command[6], + CORE_DIGITAL_SENSOR_COMMAND7n(eChannelId)); + case 6: + WRITE_REG_U8(hDevice, pConfigCommand->command[5], + CORE_DIGITAL_SENSOR_COMMAND6n(eChannelId)); + case 5: + WRITE_REG_U8(hDevice, pConfigCommand->command[4], + CORE_DIGITAL_SENSOR_COMMAND5n(eChannelId)); + case 4: + WRITE_REG_U8(hDevice, pConfigCommand->command[3], + CORE_DIGITAL_SENSOR_COMMAND4n(eChannelId)); + case 3: + WRITE_REG_U8(hDevice, pConfigCommand->command[2], + CORE_DIGITAL_SENSOR_COMMAND3n(eChannelId)); + case 2: + WRITE_REG_U8(hDevice, pConfigCommand->command[1], + CORE_DIGITAL_SENSOR_COMMAND2n(eChannelId)); + case 1: + WRITE_REG_U8(hDevice, pConfigCommand->command[0], + CORE_DIGITAL_SENSOR_COMMAND1n(eChannelId)); + case 0: + default: + break; + }; + + switch (pDataRequestCommand->commandLength) + { + case 7: + WRITE_REG_U8(hDevice, pDataRequestCommand->command[6], + CORE_DIGITAL_SENSOR_READ_CMD7n(eChannelId)); + case 6: + WRITE_REG_U8(hDevice, pDataRequestCommand->command[5], + CORE_DIGITAL_SENSOR_READ_CMD6n(eChannelId)); + case 5: + WRITE_REG_U8(hDevice, pDataRequestCommand->command[4], + CORE_DIGITAL_SENSOR_READ_CMD5n(eChannelId)); + case 4: + WRITE_REG_U8(hDevice, pDataRequestCommand->command[3], + CORE_DIGITAL_SENSOR_READ_CMD4n(eChannelId)); + case 3: + WRITE_REG_U8(hDevice, pDataRequestCommand->command[2], + CORE_DIGITAL_SENSOR_READ_CMD3n(eChannelId)); + case 2: + WRITE_REG_U8(hDevice, pDataRequestCommand->command[1], + CORE_DIGITAL_SENSOR_READ_CMD2n(eChannelId)); + case 1: + WRITE_REG_U8(hDevice, pDataRequestCommand->command[0], + CORE_DIGITAL_SENSOR_READ_CMD1n(eChannelId)); + case 0: + default: + break; + }; + + /* Re-enable the implicit-fallthrough warning */ +#ifndef __CC_ARM +#pragma GCC diagnostic pop +#endif + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetDigitalSensorFormat( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_DIGITAL_SENSOR_DATA_FORMAT *pDataFormat) +{ + CORE_Digital_Sensor_Config_t sensorConfigReg; + + sensorConfigReg.VALUE16 = REG_RESET_VAL(CORE_DIGITAL_SENSOR_CONFIGn); + + if (pDataFormat->coding != ADMW1001_DIGITAL_SENSOR_DATA_CODING_NONE) + { + if (pDataFormat->frameLength == 0) + { + ADMW_LOG_ERROR("Invalid frame length specified for digital sensor data format"); + return ADMW_INVALID_PARAM; + } + if (pDataFormat->numDataBits == 0) + { + ADMW_LOG_ERROR("Invalid frame length specified for digital sensor data format"); + return ADMW_INVALID_PARAM; + } + + CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_READ_BYTES, + pDataFormat->frameLength - 1); + CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_DATA_BITS, + pDataFormat->numDataBits - 1); + CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_CONFIG_DIGITAL_SENSOR_BIT_OFFSET, + pDataFormat->bitOffset); + + sensorConfigReg.Digital_Sensor_Read_Bytes = pDataFormat->frameLength - 1; + sensorConfigReg.Digital_Sensor_Data_Bits = pDataFormat->numDataBits - 1; + sensorConfigReg.Digital_Sensor_Bit_Offset = pDataFormat->bitOffset; + sensorConfigReg.Digital_Sensor_Left_Aligned = pDataFormat->leftJustified ? 1 : 0; + sensorConfigReg.Digital_Sensor_Little_Endian = pDataFormat->littleEndian ? 1 : 0; + + switch (pDataFormat->coding) + { + case ADMW1001_DIGITAL_SENSOR_DATA_CODING_UNIPOLAR: + sensorConfigReg.Digital_Sensor_Coding = CORE_DIGITAL_SENSOR_CONFIG_CODING_UNIPOLAR; + break; + case ADMW1001_DIGITAL_SENSOR_DATA_CODING_TWOS_COMPLEMENT: + sensorConfigReg.Digital_Sensor_Coding = CORE_DIGITAL_SENSOR_CONFIG_CODING_TWOS_COMPL; + break; + case ADMW1001_DIGITAL_SENSOR_DATA_CODING_OFFSET_BINARY: + sensorConfigReg.Digital_Sensor_Coding = CORE_DIGITAL_SENSOR_CONFIG_CODING_OFFSET_BINARY; + break; + default: + ADMW_LOG_ERROR("Invalid coding specified for digital sensor data format"); + return ADMW_INVALID_PARAM; + } + } + else + { + sensorConfigReg.Digital_Sensor_Coding = CORE_DIGITAL_SENSOR_CONFIG_CODING_NONE; + } + + WRITE_REG_U16(hDevice, sensorConfigReg.VALUE16, + CORE_DIGITAL_SENSOR_CONFIGn(eChannelId)); + + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetDigitalCalibrationParam( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_DIGITAL_CALIBRATION_COMMAND *pCalibrationParam) +{ + CORE_Calibration_Parameter_t calibrationParamReg; + + calibrationParamReg.VALUE32 = REG_RESET_VAL(CORE_CALIBRATION_PARAMETERn); + + if (pCalibrationParam->enableCalibrationParam == false) + calibrationParamReg.Calibration_Parameter_Enable = 0; + else + calibrationParamReg.Calibration_Parameter_Enable = 1; + + CHECK_REG_FIELD_VAL(CORE_CALIBRATION_PARAMETER_CALIBRATION_PARAMETER, + pCalibrationParam->calibrationParam); + + calibrationParamReg.Calibration_Parameter = pCalibrationParam->calibrationParam; + + WRITE_REG_U32(hDevice, calibrationParamReg.VALUE32, + CORE_CALIBRATION_PARAMETERn(eChannelId)); + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetChannelI2cSensorType( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_I2C_SENSOR_TYPE sensorType) +{ + CORE_Sensor_Type_t sensorTypeReg; + + sensorTypeReg.VALUE16 = REG_RESET_VAL(CORE_SENSOR_TYPEn); + + /* Ensure that the sensor type is valid for this channel */ + switch(sensorType) + { + case ADMW1001_I2C_SENSOR_HUMIDITY_A_DEF_L1: + case ADMW1001_I2C_SENSOR_HUMIDITY_B_DEF_L1: + case ADMW1001_I2C_SENSOR_HUMIDITY_A_DEF_L2: + case ADMW1001_I2C_SENSOR_HUMIDITY_B_DEF_L2: + case ADMW1001_I2C_SENSOR_HUMIDITY_A_ADV_L1: + case ADMW1001_I2C_SENSOR_HUMIDITY_B_ADV_L1: + case ADMW1001_I2C_SENSOR_HUMIDITY_A_ADV_L2: + case ADMW1001_I2C_SENSOR_HUMIDITY_B_ADV_L2: + case ADMW1001_I2C_SENSOR_AMBIENTLIGHT_A_DEF_L1: + case ADMW1001_I2C_SENSOR_AMBIENTLIGHT_A_DEF_L2: + case ADMW1001_I2C_SENSOR_AMBIENTLIGHT_A_ADV_L1: + case ADMW1001_I2C_SENSOR_AMBIENTLIGHT_A_ADV_L2: + sensorTypeReg.Sensor_Type = sensorType; + break; + default: + ADMW_LOG_ERROR("Unsupported I2C sensor type %d specified", sensorType); + return ADMW_INVALID_PARAM; + } + + WRITE_REG_U16(hDevice, sensorTypeReg.VALUE16, CORE_SENSOR_TYPEn(eChannelId)); + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetChannelI2cSensorAddress( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + uint32_t deviceAddress) +{ + CHECK_REG_FIELD_VAL(CORE_DIGITAL_SENSOR_ADDRESS_DIGITAL_SENSOR_ADDRESS, deviceAddress); + WRITE_REG_U8(hDevice, deviceAddress, CORE_DIGITAL_SENSOR_ADDRESSn(eChannelId)); + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetDigitalChannelComms( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_DIGITAL_SENSOR_COMMS *pDigitalComms) +{ + CORE_Digital_Sensor_Comms_t digitalSensorComms; + + digitalSensorComms.VALUE16 = REG_RESET_VAL(CORE_DIGITAL_SENSOR_COMMSn); + + if(pDigitalComms->useCustomCommsConfig) + { + digitalSensorComms.Digital_Sensor_Comms_En = 1; + + if(pDigitalComms->i2cClockSpeed == ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K) + { + digitalSensorComms.I2C_Clock = CORE_DIGITAL_SENSOR_COMMS_I2C_100K; + } + else if(pDigitalComms->i2cClockSpeed == ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_400K) + { + digitalSensorComms.I2C_Clock = CORE_DIGITAL_SENSOR_COMMS_I2C_400K; + } + else + { + ADMW_LOG_ERROR("Invalid I2C clock speed %d specified", + pDigitalComms->i2cClockSpeed); + return ADMW_INVALID_PARAM; + } + + if(pDigitalComms->spiMode == ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_0) + { + digitalSensorComms.SPI_Mode = CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_0; + } + else if(pDigitalComms->spiMode == ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_1) + { + digitalSensorComms.SPI_Mode = CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_1; + } + else if(pDigitalComms->spiMode == ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_2) + { + digitalSensorComms.SPI_Mode = CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_2; + } + else if(pDigitalComms->spiMode == ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_3) + { + digitalSensorComms.SPI_Mode = CORE_DIGITAL_SENSOR_COMMS_SPI_MODE_3; + } + else + { + ADMW_LOG_ERROR("Invalid SPI mode %d specified", + pDigitalComms->spiMode); + return ADMW_INVALID_PARAM; + } + + switch (pDigitalComms->spiClock) + { + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_13MHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_13MHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6_5MHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_6_5MHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3_25MHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_3_25MHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_625MHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_1_625MHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_812KHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_812KHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_406KHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_406KHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_203KHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_203KHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_101KHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_101KHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_50KHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_50KHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_25KHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_25KHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_12KHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_12KHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6KHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_6KHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3KHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_3KHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_5KHZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_1_5KHZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_793HZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_793HZ; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_396HZ: + digitalSensorComms.SPI_Clock = CORE_DIGITAL_SENSOR_COMMS_SPI_396HZ; + break; + default: + ADMW_LOG_ERROR("Invalid SPI clock %d specified", + pDigitalComms->spiClock); + return ADMW_INVALID_PARAM; + } + + switch (pDigitalComms->uartLineConfig) + { + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N1: + digitalSensorComms.Uart_Mode = CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N1; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N2: + digitalSensorComms.Uart_Mode = CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N2; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N3: + digitalSensorComms.Uart_Mode = CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8N3; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E1: + digitalSensorComms.Uart_Mode = CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E1; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E2: + digitalSensorComms.Uart_Mode = CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E2; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E3: + digitalSensorComms.Uart_Mode = CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8E3; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O1: + digitalSensorComms.Uart_Mode = CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O1; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O2: + digitalSensorComms.Uart_Mode = CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O2; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O3: + digitalSensorComms.Uart_Mode = CORE_DIGITAL_SENSOR_COMMS_LINECONTROL_8O3; + break; + default: + ADMW_LOG_ERROR("Invalid UART mode %d specified", + pDigitalComms->uartLineConfig); + return ADMW_INVALID_PARAM; + } + + switch (pDigitalComms->uartBaudRate) + { + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_115200: + digitalSensorComms.Uart_Baud = CORE_DIGITAL_SENSOR_COMMS_UART_115200; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_57600: + digitalSensorComms.Uart_Baud = CORE_DIGITAL_SENSOR_COMMS_UART_57600; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_38400: + digitalSensorComms.Uart_Baud = CORE_DIGITAL_SENSOR_COMMS_UART_38400; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_19200: + digitalSensorComms.Uart_Baud = CORE_DIGITAL_SENSOR_COMMS_UART_19200; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_9600: + digitalSensorComms.Uart_Baud = CORE_DIGITAL_SENSOR_COMMS_UART_9600; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_4800: + digitalSensorComms.Uart_Baud = CORE_DIGITAL_SENSOR_COMMS_UART_4800; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_2400: + digitalSensorComms.Uart_Baud = CORE_DIGITAL_SENSOR_COMMS_UART_2400; + break; + case ADMW1001_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_1200: + digitalSensorComms.Uart_Baud = CORE_DIGITAL_SENSOR_COMMS_UART_1200; + break; + default: + ADMW_LOG_ERROR("Invalid UART baud rate %d specified", + pDigitalComms->uartBaudRate); + return ADMW_INVALID_PARAM; + } + } + else + { + digitalSensorComms.Digital_Sensor_Comms_En = 0; + } + + WRITE_REG_U16(hDevice, digitalSensorComms.VALUE16, CORE_DIGITAL_SENSOR_COMMSn(eChannelId)); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw_SetI2cChannelConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_CHANNEL_CONFIG *pChannelConfig) +{ + ADMW_RESULT eRet; + ADMW1001_I2C_CHANNEL_CONFIG *pI2cChannelConfig = + &pChannelConfig->i2cChannelConfig; + + eRet = admw_SetChannelI2cSensorType(hDevice, eChannelId, + pI2cChannelConfig->sensor); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set I2C sensor type for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetChannelI2cSensorAddress(hDevice, eChannelId, + pI2cChannelConfig->deviceAddress); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set I2C sensor address for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetChannelDigitalSensorDetails(hDevice, eChannelId, + pChannelConfig); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set I2C sensor details for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetDigitalSensorCommands(hDevice, eChannelId, + &pI2cChannelConfig->configurationCommand, + &pI2cChannelConfig->dataRequestCommand); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set I2C sensor commands for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetDigitalSensorFormat(hDevice, eChannelId, + &pI2cChannelConfig->dataFormat); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set I2C sensor data format for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetDigitalCalibrationParam(hDevice, eChannelId, + &pI2cChannelConfig->digitalCalibrationParam); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set I2C digital calibration param for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetDigitalChannelComms(hDevice, eChannelId, + &pI2cChannelConfig->configureComms); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set I2C comms for channel %d", + eChannelId); + return eRet; + } + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetChannelSpiSensorType( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_SPI_SENSOR_TYPE sensorType) +{ + CORE_Sensor_Type_t sensorTypeReg; + + sensorTypeReg.VALUE16 = REG_RESET_VAL(CORE_SENSOR_TYPEn); + + /* Ensure that the sensor type is valid for this channel */ + switch(sensorType) + { + case ADMW1001_SPI_SENSOR_PRESSURE_A_DEF_L1: + case ADMW1001_SPI_SENSOR_PRESSURE_A_DEF_L2: + case ADMW1001_SPI_SENSOR_PRESSURE_A_ADV_L1: + case ADMW1001_SPI_SENSOR_PRESSURE_A_ADV_L2: + case ADMW1001_SPI_SENSOR_ACCELEROMETER_A_DEF_L1: + case ADMW1001_SPI_SENSOR_ACCELEROMETER_B_DEF_L1: + case ADMW1001_SPI_SENSOR_ACCELEROMETER_A_DEF_L2: + case ADMW1001_SPI_SENSOR_ACCELEROMETER_B_DEF_L2: + case ADMW1001_SPI_SENSOR_ACCELEROMETER_A_ADV_L1: + case ADMW1001_SPI_SENSOR_ACCELEROMETER_B_ADV_L1: + case ADMW1001_SPI_SENSOR_ACCELEROMETER_A_ADV_L2: + case ADMW1001_SPI_SENSOR_ACCELEROMETER_B_ADV_L2: + sensorTypeReg.Sensor_Type = sensorType; + break; + default: + ADMW_LOG_ERROR("Unsupported SPI sensor type %d specified", sensorType); + return ADMW_INVALID_PARAM; + } + + WRITE_REG_U16(hDevice, sensorTypeReg.VALUE16, CORE_SENSOR_TYPEn(eChannelId)); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw_SetSpiChannelConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_CHANNEL_CONFIG *pChannelConfig) +{ + ADMW_RESULT eRet; + ADMW1001_SPI_CHANNEL_CONFIG *pSpiChannelConfig = + &pChannelConfig->spiChannelConfig; + + eRet = admw_SetChannelSpiSensorType(hDevice, eChannelId, + pSpiChannelConfig->sensor); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set SPI sensor type for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetChannelDigitalSensorDetails(hDevice, eChannelId, + pChannelConfig); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set SPI sensor details for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetDigitalSensorCommands(hDevice, eChannelId, + &pSpiChannelConfig->configurationCommand, + &pSpiChannelConfig->dataRequestCommand); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set SPI sensor commands for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetDigitalSensorFormat(hDevice, eChannelId, + &pSpiChannelConfig->dataFormat); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set SPI sensor data format for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetDigitalCalibrationParam(hDevice, eChannelId, + &pSpiChannelConfig->digitalCalibrationParam); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set SPI digital calibration param for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetDigitalChannelComms(hDevice, eChannelId, + &pSpiChannelConfig->configureComms); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set SPI comms for channel %d", + eChannelId); + return eRet; + } + + return ADMW_SUCCESS; +} + +static ADMW_RESULT admw_SetChannelUartSensorType( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_UART_SENSOR_TYPE sensorType) +{ + CORE_Sensor_Type_t sensorTypeReg; + + sensorTypeReg.VALUE16 = REG_RESET_VAL(CORE_SENSOR_TYPEn); + + /* Ensure that the sensor type is valid for this channel */ + switch(sensorType) + { + case ADMW1001_UART_SENSOR_UART_CO2_A_DEF_L1: + case ADMW1001_UART_SENSOR_UART_CO2_B_DEF_L1: + case ADMW1001_UART_SENSOR_UART_CO2_A_DEF_L2: + case ADMW1001_UART_SENSOR_UART_CO2_B_DEF_L2: + case ADMW1001_UART_SENSOR_UART_CO2_A_ADV_L1: + case ADMW1001_UART_SENSOR_UART_CO2_B_ADV_L1: + case ADMW1001_UART_SENSOR_UART_CO2_A_ADV_L2: + case ADMW1001_UART_SENSOR_UART_CO2_B_ADV_L2: + sensorTypeReg.Sensor_Type = sensorType; + break; + default: + ADMW_LOG_ERROR("Unsupported UART sensor type %d specified", sensorType); + return ADMW_INVALID_PARAM; + } + + WRITE_REG_U16(hDevice, sensorTypeReg.VALUE16, CORE_SENSOR_TYPEn(eChannelId)); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw_SetUartChannelConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_CHANNEL_CONFIG *pChannelConfig) +{ + ADMW_RESULT eRet; + ADMW1001_UART_CHANNEL_CONFIG *pUartChannelConfig = + &pChannelConfig->uartChannelConfig; + + eRet = admw_SetChannelUartSensorType(hDevice, eChannelId, + pUartChannelConfig->sensor); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set UART sensor type for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetChannelDigitalSensorDetails(hDevice, eChannelId, + pChannelConfig); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set UART sensor details for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetDigitalCalibrationParam(hDevice, eChannelId, + &pUartChannelConfig->digitalCalibrationParam); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set UART digital calibration param for channel %d", + eChannelId); + return eRet; + } + + eRet = admw_SetDigitalChannelComms(hDevice, eChannelId, + &pUartChannelConfig->configureComms); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set UART comms for channel %d", + eChannelId); + return eRet; + } + + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetChannelThresholdLimits( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + float32_t fHighThresholdLimit, + float32_t fLowThresholdLimit) +{ + /* + * If the low/high limits are *both* set to 0 in memory, or NaNs, assume + * that they are unset, or not required, and use infinity defaults instead + */ + if (fHighThresholdLimit == 0.0f && fLowThresholdLimit == 0.0f) + { + fHighThresholdLimit = INFINITY; + fLowThresholdLimit = -INFINITY; + } + else + { + if (isnan(fHighThresholdLimit)) + fHighThresholdLimit = INFINITY; + if (isnan(fLowThresholdLimit)) + fLowThresholdLimit = -INFINITY; + } + + WRITE_REG_FLOAT(hDevice, fHighThresholdLimit, + CORE_HIGH_THRESHOLD_LIMITn(eChannelId)); + WRITE_REG_FLOAT(hDevice, fLowThresholdLimit, + CORE_LOW_THRESHOLD_LIMITn(eChannelId)); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetOffsetGain( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + float32_t fOffsetAdjustment, + float32_t fGainAdjustment) +{ + /* Replace with default values if NaNs are specified (or 0.0 for gain) */ + if (isnan(fGainAdjustment) || (fGainAdjustment == 0.0f)) + fGainAdjustment = 1.0f; + if (isnan(fOffsetAdjustment)) + fOffsetAdjustment = 0.0f; + + WRITE_REG_FLOAT(hDevice, fGainAdjustment, CORE_SENSOR_GAINn(eChannelId)); + WRITE_REG_FLOAT(hDevice, fOffsetAdjustment, CORE_SENSOR_OFFSETn(eChannelId)); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetSensorParameter( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + float32_t fSensorParam) +{ + if (fSensorParam == 0.0f) + fSensorParam = NAN; + + WRITE_REG_FLOAT(hDevice, fSensorParam, CORE_SENSOR_PARAMETERn(eChannelId)); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetChannelSettlingTime( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + uint32_t nSettlingTime) +{ + CORE_Settling_Time_t settlingTimeReg; + + if (nSettlingTime < (1 << 12)) + { + settlingTimeReg.Settling_Time_Units = CORE_SETTLING_TIME_MICROSECONDS; + } + else if (nSettlingTime < (1000 * (1 << 12))) + { + settlingTimeReg.Settling_Time_Units = CORE_SETTLING_TIME_MILLISECONDS; + nSettlingTime /= 1000; + } + else + { + settlingTimeReg.Settling_Time_Units = CORE_SETTLING_TIME_SECONDS; + nSettlingTime /= 1000000; + } + + CHECK_REG_FIELD_VAL(CORE_SETTLING_TIME_SETTLING_TIME, nSettlingTime); + settlingTimeReg.Settling_Time = nSettlingTime; + + WRITE_REG_U16(hDevice, settlingTimeReg.VALUE16, CORE_SETTLING_TIMEn(eChannelId)); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetChannelConfig( + ADMW_DEVICE_HANDLE hDevice, + ADMW1001_CHANNEL_ID eChannelId, + ADMW1001_CHANNEL_CONFIG *pChannelConfig) +{ + ADMW_RESULT eRet; + + if (! ADMW1001_CHANNEL_IS_VIRTUAL(eChannelId)) + { + eRet = admw1001_SetChannelCount(hDevice, eChannelId, + pChannelConfig->enableChannel ? + pChannelConfig->measurementsPerCycle : 0); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set measurement count for channel %d", + eChannelId); + return eRet; + } + + eRet = admw1001_SetChannelOptions(hDevice, eChannelId, + pChannelConfig->priority, + pChannelConfig->enableFFT); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set priority for channel %d", + eChannelId); + return eRet; + } + + /* If the channel is not enabled, we can skip the following steps */ + if (pChannelConfig->enableChannel || pChannelConfig->enableFFT) + { + eRet = admw1001_SetChannelSkipCount(hDevice, eChannelId, + pChannelConfig->cycleSkipCount); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set cycle skip count for channel %d", + eChannelId); + return eRet; + } + + switch (eChannelId) + { + case ADMW1001_CHANNEL_ID_CJC_0: + case ADMW1001_CHANNEL_ID_CJC_1: + case ADMW1001_CHANNEL_ID_SENSOR_0: + case ADMW1001_CHANNEL_ID_SENSOR_1: + case ADMW1001_CHANNEL_ID_SENSOR_2: + case ADMW1001_CHANNEL_ID_SENSOR_3: + case ADMW1001_CHANNEL_ID_VOLTAGE_0: + case ADMW1001_CHANNEL_ID_CURRENT_0: + eRet = admw_SetAdcChannelConfig(hDevice, eChannelId, pChannelConfig); + break; + case ADMW1001_CHANNEL_ID_I2C_0: + case ADMW1001_CHANNEL_ID_I2C_1: + eRet = admw_SetI2cChannelConfig(hDevice, eChannelId, pChannelConfig); + break; + case ADMW1001_CHANNEL_ID_SPI_0: + eRet = admw_SetSpiChannelConfig(hDevice, eChannelId, pChannelConfig); + break; + case ADMW1001_CHANNEL_ID_UART: + eRet = admw_SetUartChannelConfig(hDevice, eChannelId, pChannelConfig); + break; + default: + ADMW_LOG_ERROR("Invalid channel ID %d specified", eChannelId); + return ADMW_INVALID_PARAM; + } + + eRet = admw1001_SetChannelSettlingTime(hDevice, eChannelId, + pChannelConfig->extraSettlingTime); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set settling time for channel %d", + eChannelId); + return eRet; + } + } + } + + if (pChannelConfig->enableChannel || pChannelConfig->enableFFT) + { + /* Threshold limits can be configured individually for virtual channels */ + eRet = admw1001_SetChannelThresholdLimits(hDevice, eChannelId, + pChannelConfig->highThreshold, + pChannelConfig->lowThreshold); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set threshold limits for channel %d", + eChannelId); + return eRet; + } + + /* Offset and gain can be configured individually for virtual channels */ + eRet = admw1001_SetOffsetGain(hDevice, eChannelId, + pChannelConfig->offsetAdjustment, + pChannelConfig->gainAdjustment); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set offset/gain for channel %d", + eChannelId); + return eRet; + } + + /* Set sensor specific parameter */ + eRet = admw1001_SetSensorParameter(hDevice, eChannelId, + pChannelConfig->sensorParameter); + if (eRet != ADMW_SUCCESS) + { + ADMW_LOG_ERROR("Failed to set sensor parameter for channel %d", + eChannelId); + return eRet; + } + } + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw_SetConfig( + ADMW_DEVICE_HANDLE const hDevice, + ADMW_CONFIG * const pConfig) +{ + ADMW1001_CONFIG *pDeviceConfig; + ADMW_PRODUCT_ID productId; + ADMW_RESULT eRet; + + if (pConfig->productId != ADMW_PRODUCT_ID_ADMW1001) + { + ADMW_LOG_ERROR("Configuration Product ID (0x%X) is not supported (0x%0X)", + pConfig->productId, ADMW_PRODUCT_ID_ADMW1001); + return ADMW_INVALID_PARAM; + } + + /* Check that the actual Product ID is a match? */ + eRet = admw_GetProductID(hDevice, &productId); + if (eRet) + { + ADMW_LOG_ERROR("Failed to read device Product ID register"); + return eRet; + } + if (pConfig->productId != productId) + { + ADMW_LOG_ERROR("Configuration Product ID (0x%X) does not match device (0x%0X)", + pConfig->productId, productId); + return ADMW_INVALID_PARAM; + } + + pDeviceConfig = &pConfig->admw1001; + + eRet = admw1001_SetPowerConfig(hDevice, &pDeviceConfig->power); + if (eRet) + { + ADMW_LOG_ERROR("Failed to set power configuration"); + return eRet; + } + + eRet = admw1001_SetMeasurementConfig(hDevice, &pDeviceConfig->measurement); + if (eRet) + { + ADMW_LOG_ERROR("Failed to set measurement configuration"); + return eRet; + } + + eRet = admw1001_SetDiagnosticsConfig(hDevice, &pDeviceConfig->diagnostics); + if (eRet) + { + ADMW_LOG_ERROR("Failed to set diagnostics configuration"); + return eRet; + } + + for (ADMW1001_CHANNEL_ID id = ADMW1001_CHANNEL_ID_CJC_0; + id < ADMW1001_MAX_CHANNELS; + id++) + { + eRet = admw1001_SetChannelConfig(hDevice, id, + &pDeviceConfig->channels[id]); + if (eRet) + { + ADMW_LOG_ERROR("Failed to set channel %d configuration", id); + return eRet; + } + } + + eRet = admw1001_SetFftConfig(hDevice, &pDeviceConfig->fft, + pDeviceConfig->channels); + if (eRet) + { + ADMW_LOG_ERROR("Failed to set FFT configuration"); + return eRet; + } + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetLutData( + ADMW_DEVICE_HANDLE const hDevice, + ADMW1001_LUT * const pLutData) +{ + ADMW1001_LUT_HEADER *pLutHeader = &pLutData->header; + ADMW1001_LUT_TABLE *pLutTable = pLutData->tables; + unsigned actualLength = 0; + + if (pLutData->header.signature != ADMW_LUT_SIGNATURE) + { + ADMW_LOG_ERROR("LUT signature incorrect (expected 0x%X, actual 0x%X)", + ADMW_LUT_SIGNATURE, pLutHeader->signature); + return ADMW_INVALID_SIGNATURE; + } + + for (unsigned i = 0; i < pLutHeader->numTables; i++) + { + ADMW1001_LUT_DESCRIPTOR *pDesc = &pLutTable->descriptor; + ADMW1001_LUT_TABLE_DATA *pData = &pLutTable->data; + unsigned short calculatedCrc; + + switch (pDesc->geometry) + { + case ADMW1001_LUT_GEOMETRY_COEFFS: + switch (pDesc->equation) + { + case ADMW1001_LUT_EQUATION_POLYN: + case ADMW1001_LUT_EQUATION_POLYNEXP: + case ADMW1001_LUT_EQUATION_QUADRATIC: + case ADMW1001_LUT_EQUATION_STEINHART: + case ADMW1001_LUT_EQUATION_LOGARITHMIC: + case ADMW1001_LUT_EQUATION_BIVARIATE_POLYN: + break; + default: + ADMW_LOG_ERROR("Invalid equation %u specified for LUT table %u", + pDesc->equation, i); + return ADMW_INVALID_PARAM; + } + break; + case ADMW1001_LUT_GEOMETRY_NES_1D: + case ADMW1001_LUT_GEOMETRY_NES_2D: + case ADMW1001_LUT_GEOMETRY_ES_1D: + case ADMW1001_LUT_GEOMETRY_ES_2D: + if (pDesc->equation != ADMW1001_LUT_EQUATION_LUT) { + ADMW_LOG_ERROR("Invalid equation %u specified for LUT table %u", + pDesc->equation, i); + return ADMW_INVALID_PARAM; + } + break; + default: + ADMW_LOG_ERROR("Invalid geometry %u specified for LUT table %u", + pDesc->geometry, i); + return ADMW_INVALID_PARAM; + } + + switch (pDesc->dataType) + { + case ADMW1001_LUT_DATA_TYPE_FLOAT32: + case ADMW1001_LUT_DATA_TYPE_FLOAT64: + break; + default: + ADMW_LOG_ERROR("Invalid vector format %u specified for LUT table %u", + pDesc->dataType, i); + return ADMW_INVALID_PARAM; + } + + calculatedCrc = admw_crc16_ccitt(pData, pDesc->length); + if (calculatedCrc != pDesc->crc16) + { + ADMW_LOG_ERROR("CRC validation failed on LUT table %u (expected 0x%04X, actual 0x%04X)", + i, pDesc->crc16, calculatedCrc); + return ADMW_CRC_ERROR; + } + + actualLength += sizeof(*pDesc) + pDesc->length; + + /* Move to the next look-up table */ + pLutTable = (ADMW1001_LUT_TABLE *)((uint8_t *)pLutTable + sizeof(*pDesc) + pDesc->length); + } + + if (actualLength != pLutHeader->totalLength) + { + ADMW_LOG_ERROR("LUT table length mismatch (expected %u, actual %u)", + pLutHeader->totalLength, actualLength); + return ADMW_WRONG_SIZE; + } + + if (sizeof(*pLutHeader) + pLutHeader->totalLength > ADMW_LUT_MAX_SIZE) + { + ADMW_LOG_ERROR("Maximum LUT table length (%u bytes) exceeded", + ADMW_LUT_MAX_SIZE); + return ADMW_WRONG_SIZE; + } + + /* Write the LUT data to the device */ + unsigned lutSize = sizeof(*pLutHeader) + pLutHeader->totalLength; + WRITE_REG_U16(hDevice, 0, CORE_LUT_OFFSET); + WRITE_REG_U8_ARRAY(hDevice, (uint8_t *)pLutData, lutSize, CORE_LUT_DATA); + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_SetLutDataRaw( + ADMW_DEVICE_HANDLE const hDevice, + ADMW1001_LUT_RAW * const pLutData) +{ + return admw1001_SetLutData(hDevice, + (ADMW1001_LUT *)pLutData); +} + +static ADMW_RESULT getLutTableSize( + ADMW1001_LUT_DESCRIPTOR * const pDesc, + ADMW1001_LUT_TABLE_DATA * const pData, + unsigned *pLength) +{ + switch (pDesc->geometry) + { + case ADMW1001_LUT_GEOMETRY_COEFFS: + if (pDesc->equation == ADMW1001_LUT_EQUATION_BIVARIATE_POLYN) + *pLength = ADMW1001_LUT_2D_POLYN_COEFF_LIST_SIZE(pData->coeffList2d); + else + *pLength = ADMW1001_LUT_COEFF_LIST_SIZE(pData->coeffList); + break; + case ADMW1001_LUT_GEOMETRY_NES_1D: + *pLength = ADMW1001_LUT_1D_NES_SIZE(pData->lut1dNes); + break; + case ADMW1001_LUT_GEOMETRY_NES_2D: + *pLength = ADMW1001_LUT_2D_NES_SIZE(pData->lut2dNes); + break; + case ADMW1001_LUT_GEOMETRY_ES_1D: + *pLength = ADMW1001_LUT_1D_ES_SIZE(pData->lut1dEs); + break; + case ADMW1001_LUT_GEOMETRY_ES_2D: + *pLength = ADMW1001_LUT_2D_ES_SIZE(pData->lut2dEs); + break; + default: + ADMW_LOG_ERROR("Invalid LUT table geometry %d specified\r\n", + pDesc->geometry); + return ADMW_INVALID_PARAM; + } + + return ADMW_SUCCESS; +} + +ADMW_RESULT admw1001_AssembleLutData( + ADMW1001_LUT * pLutBuffer, + unsigned nLutBufferSize, + unsigned const nNumTables, + ADMW1001_LUT_DESCRIPTOR * const ppDesc[], + ADMW1001_LUT_TABLE_DATA * const ppData[]) +{ + ADMW1001_LUT_HEADER *pHdr = &pLutBuffer->header; + uint8_t *pLutTableData = (uint8_t *)pLutBuffer + sizeof(*pHdr); + + if (sizeof(*pHdr) > nLutBufferSize) + { + ADMW_LOG_ERROR("Insufficient LUT buffer size provided"); + return ADMW_INVALID_PARAM; + } + + /* First initialise the top-level header */ + pHdr->signature = ADMW_LUT_SIGNATURE; + pHdr->version.major = 1; + pHdr->version.minor = 0; + pHdr->numTables = 0; + pHdr->totalLength = 0; + + /* + * Walk through the list of table pointers provided, appending the table + * descriptor+data from each one to the provided LUT buffer + */ + for (unsigned i = 0; i < nNumTables; i++) + { + ADMW1001_LUT_DESCRIPTOR * const pDesc = ppDesc[i]; + ADMW1001_LUT_TABLE_DATA * const pData = ppData[i]; + ADMW_RESULT res; + unsigned dataLength = 0; + + /* Calculate the length of the table data */ + res = getLutTableSize(pDesc, pData, &dataLength); + if (res != ADMW_SUCCESS) + return res; + + /* Fill in the table descriptor length and CRC fields */ + pDesc->length = dataLength; + pDesc->crc16 = admw_crc16_ccitt(pData, dataLength); + + if ((sizeof(*pHdr) + pHdr->totalLength + sizeof(*pDesc) + dataLength) > nLutBufferSize) + { + ADMW_LOG_ERROR("Insufficient LUT buffer size provided"); + return ADMW_INVALID_PARAM; + } + + /* Append the table to the LUT buffer (desc + data) */ + memcpy(pLutTableData + pHdr->totalLength, pDesc, sizeof(*pDesc)); + pHdr->totalLength += sizeof(*pDesc); + memcpy(pLutTableData + pHdr->totalLength, pData, dataLength); + pHdr->totalLength += dataLength; + + pHdr->numTables++; + } + + return ADMW_SUCCESS; +} +
--- a/src/crc16.c Tue Jun 04 10:09:11 2019 +0000 +++ b/src/crc16.c Wed Jun 05 05:39:15 2019 +0000 @@ -64,7 +64,7 @@ 0x6e17,0x7e36,0x4e55,0x5e74,0x2e93,0x3eb2,0x0ed1,0x1ef0 }; -unsigned short adi_sense_crc16_ccitt(const void *buf, int len) +unsigned short admw_crc16_ccitt(const void *buf, int len) { register int counter; register unsigned short crc = 0; @@ -73,4 +73,3 @@ crc = (crc<<8) ^ crc16tab[((crc>>8) ^ *(char *)pBuf++)&0x00FF]; return crc; } -
--- a/src/crc16.h Tue Jun 04 10:09:11 2019 +0000 +++ b/src/crc16.h Wed Jun 05 05:39:15 2019 +0000 @@ -32,7 +32,7 @@ extern "C" { #endif -unsigned short adi_sense_crc16_ccitt(const void *buf, int len); +unsigned short admw_crc16_ccitt(const void *buf, int len); #ifdef __cplusplus }
--- a/src/mbed/adi_sense_gpio.cpp Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,290 +0,0 @@ -/****************************************************************************** -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: ADISENSE OS-dependent wrapper layer for GPIO interface - *----------------------------------------------------------------------------- - */ - -#include <mbed.h> - -#include "inc/adi_sense_gpio.h" -#include "inc/adi_sense_log.h" - -class GpioContext -{ -public: - GpioContext( - PinName resetPin, - PinName errorPin, - PinName alertPin, - PinName datareadyPin) - : _reset(resetPin), - _error(errorPin), - _alert(alertPin), - _dataready(datareadyPin), - _errorIrq(errorPin), - _alertIrq(alertPin), - _datareadyIrq(datareadyPin) {} - - ADI_SENSE_RESULT get( - ADI_SENSE_GPIO_PIN ePinId, - bool *pState); - - ADI_SENSE_RESULT set( - ADI_SENSE_GPIO_PIN ePinId, - bool state); - - ADI_SENSE_RESULT enableIrq( - ADI_SENSE_GPIO_PIN ePinId, - ADI_SENSE_GPIO_CALLBACK callbackFn, - void *pArg); - - ADI_SENSE_RESULT disableIrq( - ADI_SENSE_GPIO_PIN ePinId); - -private: - DigitalOut _reset; - - DigitalIn _error; - DigitalIn _alert; - DigitalIn _dataready; - - InterruptIn _errorIrq; - InterruptIn _alertIrq; - InterruptIn _datareadyIrq; - - ADI_SENSE_GPIO_CALLBACK _errorIrqCallback; - ADI_SENSE_GPIO_CALLBACK _alertIrqCallback; - ADI_SENSE_GPIO_CALLBACK _datareadyIrqCallback; - - void *_errorIrqArg; - void *_alertIrqArg; - void *_datareadyIrqArg; - - void _errorIrqHandler() - { - _errorIrqCallback(ADI_SENSE_GPIO_PIN_ERROR, _errorIrqArg); - } - void _alertIrqHandler() - { - _alertIrqCallback(ADI_SENSE_GPIO_PIN_ALERT, _alertIrqArg); - } - void _datareadyIrqHandler() - { - _datareadyIrqCallback(ADI_SENSE_GPIO_PIN_DATAREADY, _datareadyIrqArg); - } -}; - -ADI_SENSE_RESULT GpioContext::get( - ADI_SENSE_GPIO_PIN ePinId, - bool *pState) -{ - switch(ePinId) - { - case ADI_SENSE_GPIO_PIN_ERROR: - *pState = _error; - return ADI_SENSE_SUCCESS; - case ADI_SENSE_GPIO_PIN_ALERT: - *pState = _alert; - return ADI_SENSE_SUCCESS; - case ADI_SENSE_GPIO_PIN_DATAREADY: - *pState = _dataready; - return ADI_SENSE_SUCCESS; - case ADI_SENSE_GPIO_PIN_RESET: - *pState = _reset; - return ADI_SENSE_SUCCESS; - default: - return ADI_SENSE_INVALID_DEVICE_NUM; - } -} - -ADI_SENSE_RESULT GpioContext::set( - ADI_SENSE_GPIO_PIN ePinId, - bool state) -{ - switch(ePinId) - { - case ADI_SENSE_GPIO_PIN_RESET: - _reset = state; - break; - default: - return ADI_SENSE_INVALID_DEVICE_NUM; - } - - return ADI_SENSE_SUCCESS; -} - -ADI_SENSE_RESULT GpioContext::enableIrq( - ADI_SENSE_GPIO_PIN ePinId, - ADI_SENSE_GPIO_CALLBACK callbackFn, - void *pArg) -{ - switch(ePinId) - { - case ADI_SENSE_GPIO_PIN_ERROR: - _errorIrqCallback = callbackFn; - _errorIrqArg = pArg; - _errorIrq.rise(callback(this, &GpioContext::_errorIrqHandler)); - return ADI_SENSE_SUCCESS; - case ADI_SENSE_GPIO_PIN_ALERT: - _alertIrqCallback = callbackFn; - _alertIrqArg = pArg; - _alertIrq.rise(callback(this, &GpioContext::_alertIrqHandler)); - return ADI_SENSE_SUCCESS; - case ADI_SENSE_GPIO_PIN_DATAREADY: - _datareadyIrqCallback = callbackFn; - _datareadyIrqArg = pArg; - _datareadyIrq.rise(callback(this, &GpioContext::_datareadyIrqHandler)); - return ADI_SENSE_SUCCESS; - default: - return ADI_SENSE_INVALID_DEVICE_NUM; - } -} - -ADI_SENSE_RESULT GpioContext::disableIrq( - ADI_SENSE_GPIO_PIN ePinId) -{ - switch(ePinId) - { - case ADI_SENSE_GPIO_PIN_ERROR: - _errorIrq.rise(NULL); - return ADI_SENSE_SUCCESS; - case ADI_SENSE_GPIO_PIN_ALERT: - _alertIrq.rise(NULL); - return ADI_SENSE_SUCCESS; - case ADI_SENSE_GPIO_PIN_DATAREADY: - _datareadyIrq.rise(NULL); - return ADI_SENSE_SUCCESS; - default: - return ADI_SENSE_INVALID_DEVICE_NUM; - } -} - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Open the GPIO interface and allocate resources - */ -ADI_SENSE_RESULT adi_sense_GpioOpen( - ADI_SENSE_PLATFORM_GPIO_CONFIG *pConfig, - ADI_SENSE_GPIO_HANDLE *phDevice) -{ - GpioContext *pCtx = new GpioContext((PinName)pConfig->resetPin, - (PinName)pConfig->errorPin, - (PinName)pConfig->alertPin, - (PinName)pConfig->datareadyPin); - if (!pCtx) - { - ADI_SENSE_LOG_ERROR("Failed to allocate memory for GPIO context"); - return ADI_SENSE_NO_MEM; - } - - *phDevice = reinterpret_cast<ADI_SENSE_GPIO_HANDLE>(pCtx); - return ADI_SENSE_SUCCESS; -} - -/* - * Get the state of the specified GPIO pin - */ -ADI_SENSE_RESULT adi_sense_GpioGet( - ADI_SENSE_GPIO_HANDLE hDevice, - ADI_SENSE_GPIO_PIN ePinId, - bool *pbState) -{ - GpioContext *pCtx = reinterpret_cast<GpioContext *>(hDevice); - - return pCtx->get(ePinId, pbState); -} - -/* - * Set the state of the specified GPIO pin - */ -ADI_SENSE_RESULT adi_sense_GpioSet( - ADI_SENSE_GPIO_HANDLE hDevice, - ADI_SENSE_GPIO_PIN ePinId, - bool bState) -{ - GpioContext *pCtx = reinterpret_cast<GpioContext *>(hDevice); - - return pCtx->set(ePinId, bState); -} - -/* - * Enable interrupt notifications on the specified GPIO pin - */ -ADI_SENSE_RESULT adi_sense_GpioIrqEnable( - ADI_SENSE_GPIO_HANDLE hDevice, - ADI_SENSE_GPIO_PIN ePinId, - ADI_SENSE_GPIO_CALLBACK callback, - void *arg) -{ - GpioContext *pCtx = reinterpret_cast<GpioContext *>(hDevice); - - return pCtx->enableIrq(ePinId, callback, arg); -} - -/* - * Disable interrupt notifications on the specified GPIO pin - */ -ADI_SENSE_RESULT adi_sense_GpioIrqDisable( - ADI_SENSE_GPIO_HANDLE hDevice, - ADI_SENSE_GPIO_PIN ePinId) -{ - GpioContext *pCtx = reinterpret_cast<GpioContext *>(hDevice); - - return pCtx->disableIrq(ePinId); -} - -/* - * Close the GPIO interface and free resources - */ -void adi_sense_GpioClose( - ADI_SENSE_GPIO_HANDLE hDevice) -{ - GpioContext *pCtx = reinterpret_cast<GpioContext *>(hDevice); - - delete pCtx; -} - -#ifdef __cplusplus -} -#endif -
--- a/src/mbed/adi_sense_log.cpp Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/****************************************************************************** -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: ADISENSE OS-dependent wrapper layer for log functions - *----------------------------------------------------------------------------- - */ - -#include <mbed.h> -#include "inc/adi_sense_log.h" - -static Serial *gpUartDevice; - -static ADI_SENSE_LOG_LEVEL gLogLevel = ADI_SENSE_LOG_LEVEL_DEBUG; - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Open the Log interface and allocate resources - */ -ADI_SENSE_RESULT adi_sense_LogOpen( - ADI_SENSE_PLATFORM_LOG_CONFIG *pConfig) -{ - if (pConfig->disableLogs) - return ADI_SENSE_SUCCESS; - - gpUartDevice = new Serial((PinName)pConfig->txPin, - (PinName)pConfig->rxPin, - pConfig->baudRate); - if (!gpUartDevice) - { - ADI_SENSE_LOG_ERROR("Failed to allocate memory for Log UART context"); - return ADI_SENSE_NO_MEM; - } - - return ADI_SENSE_SUCCESS; -} - -/* - * Close the Log interface and free resources - */ -void adi_sense_LogClose(void) -{ - if (gpUartDevice) - { - delete gpUartDevice; - gpUartDevice = 0; - } -} - -/* - * Set the log level for uart communication - */ -void adi_sense_LogLevel(ADI_SENSE_LOG_LEVEL maxLevel) -{ - gLogLevel = maxLevel; -} - -/* - * Print a log message to the platform log interface - */ -void adi_sense_Log(ADI_SENSE_LOG_LEVEL level, const char* format, ...) -{ - char buffer[256]; - va_list va_args; - - if (!gpUartDevice) - return; - - if (level > gLogLevel) - return; - - va_start(va_args, format); - vsnprintf(buffer, sizeof(buffer), format, va_args); - va_end(va_args); - - gpUartDevice->printf("%s\r\n", buffer); -} - -#ifdef __cplusplus -} -#endif -
--- a/src/mbed/adi_sense_spi.cpp Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,171 +0,0 @@ -/****************************************************************************** -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: ADISENSE OS-dependent wrapper layer for SPI interface - *----------------------------------------------------------------------------- - */ - -#include <mbed.h> - -#include "inc/adi_sense_spi.h" -#include "inc/adi_sense_log.h" - -#define ADI_SENSE_SPI_MODE 0 /* CPOL=0, CPHA=0 */ -#define ADI_SENSE_SPI_FRAME_SIZE 8 /* 8-bit frame size */ - -class SpiContext -{ -public: - SpiContext( - PinName mosiPin, - PinName misoPin, - PinName sckPin, - PinName csPin, - unsigned maxSpeed); - - int transfer( - void *pTxData, - void *pRxData, - unsigned nLength, - bool bCsHold); - -private: - SPI _spi; - DigitalOut _cs; -}; - -SpiContext::SpiContext(PinName mosiPin, - PinName misoPin, - PinName sckPin, - PinName csPin, - unsigned maxSpeed) - : _spi(mosiPin, misoPin, sckPin), - _cs(csPin, 1) -{ - - _spi.format(ADI_SENSE_SPI_FRAME_SIZE, ADI_SENSE_SPI_MODE); - _spi.frequency(maxSpeed); -} - -int SpiContext::transfer( - void *pTxData, - void *pRxData, - unsigned nLength, - bool bCsHold) -{ - int rc = 0; - - _cs = 0; - - rc = _spi.write((char*)(pTxData), pTxData ? nLength : 0, - (char*)(pRxData), pRxData ? nLength : 0); - - if ((rc < 0) || !bCsHold) - _cs = 1; - - return rc; -} - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Open the SPI interface and allocate resources - */ -ADI_SENSE_RESULT adi_sense_SpiOpen( - ADI_SENSE_PLATFORM_SPI_CONFIG *pConfig, - ADI_SENSE_SPI_HANDLE *phDevice) -{ - SpiContext *pCtx = new SpiContext((PinName)pConfig->mosiPin, - (PinName)pConfig->misoPin, - (PinName)pConfig->sckPin, - (PinName)pConfig->csPin, - pConfig->maxSpeedHz); - if (!pCtx) - { - ADI_SENSE_LOG_ERROR("Failed to allocate memory for SPI interface"); - return ADI_SENSE_NO_MEM; - } - - *phDevice = reinterpret_cast<ADI_SENSE_SPI_HANDLE>(pCtx); - return ADI_SENSE_SUCCESS; -} - -/* - * Execute a bi-directional data transfer on the SPI interface - */ -ADI_SENSE_RESULT -adi_sense_SpiTransfer( - ADI_SENSE_SPI_HANDLE hDevice, - void *pTxData, - void *pRxData, - unsigned nLength, - bool bCsHold) -{ - SpiContext *pCtx = reinterpret_cast<SpiContext *>(hDevice); - - if (pCtx->transfer(pTxData, pRxData, nLength, bCsHold) < 0) - { - ADI_SENSE_LOG_ERROR("Failed to complete SPI transfer"); - return ADI_SENSE_FAILURE; - } - - return ADI_SENSE_SUCCESS; -} - -/* - * Close the SPI interface and free resources - */ -void adi_sense_SpiClose( - ADI_SENSE_SPI_HANDLE hDevice) -{ - SpiContext *pCtx = reinterpret_cast<SpiContext *>(hDevice); - - delete pCtx; -} - -#ifdef __cplusplus -} -#endif - -/*! - * @} - */ -
--- a/src/mbed/adi_sense_time.cpp Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/****************************************************************************** -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: ADISENSE OS-dependent wrapper layer for time functions - *----------------------------------------------------------------------------- - */ - -#include <mbed.h> - -#include "inc/adi_sense_time.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Wait for a specified number of microseconds - */ -void adi_sense_TimeDelayUsec( - const unsigned microseconds) -{ - wait_us(microseconds); -} - -#ifdef __cplusplus -} -#endif -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/mbed/admw_gpio.cpp Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,266 @@ +/****************************************************************************** +Copyright 2017 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/*! + ****************************************************************************** + * @file: + * @brief: ADMW OS-dependent wrapper layer for GPIO interface + *----------------------------------------------------------------------------- + */ + +#include <mbed.h> + +#include "inc/admw_gpio.h" +#include "inc/admw_log.h" + +class GpioContext +{ +public: + GpioContext( + PinName resetPin, + PinName alertErrorPin, + PinName datareadyPin) + : _reset(resetPin), + _alertError(alertErrorPin), + _dataready(datareadyPin), + _alertErrorIrq(alertErrorPin), + _datareadyIrq(datareadyPin) {} + + ADMW_RESULT get( + ADMW_GPIO_PIN ePinId, + bool *pState); + + ADMW_RESULT set( + ADMW_GPIO_PIN ePinId, + bool state); + + ADMW_RESULT enableIrq( + ADMW_GPIO_PIN ePinId, + ADMW_GPIO_CALLBACK callbackFn, + void *pArg); + + ADMW_RESULT disableIrq( + ADMW_GPIO_PIN ePinId); + +private: + DigitalOut _reset; + + DigitalIn _alertError; + DigitalIn _dataready; + + InterruptIn _alertErrorIrq; + InterruptIn _datareadyIrq; + + ADMW_GPIO_CALLBACK _alertErrorIrqCallback; + ADMW_GPIO_CALLBACK _datareadyIrqCallback; + + void *_alertErrorIrqArg; + void *_datareadyIrqArg; + + void _alertErrorIrqHandler() + { + _alertErrorIrqCallback(ADMW_GPIO_PIN_ALERT_ERROR, _alertErrorIrqArg); + } + void _datareadyIrqHandler() + { + _datareadyIrqCallback(ADMW_GPIO_PIN_DATAREADY, _datareadyIrqArg); + } +}; + +ADMW_RESULT GpioContext::get( + ADMW_GPIO_PIN ePinId, + bool *pState) +{ + switch(ePinId) + { + case ADMW_GPIO_PIN_ALERT_ERROR: + *pState = _alertError; + return ADMW_SUCCESS; + case ADMW_GPIO_PIN_DATAREADY: + *pState = _dataready; + return ADMW_SUCCESS; + case ADMW_GPIO_PIN_RESET: + *pState = _reset; + return ADMW_SUCCESS; + default: + return ADMW_INVALID_DEVICE_NUM; + } +} + +ADMW_RESULT GpioContext::set( + ADMW_GPIO_PIN ePinId, + bool state) +{ + switch(ePinId) + { + case ADMW_GPIO_PIN_RESET: + _reset = state; + break; + default: + return ADMW_INVALID_DEVICE_NUM; + } + + return ADMW_SUCCESS; +} + +ADMW_RESULT GpioContext::enableIrq( + ADMW_GPIO_PIN ePinId, + ADMW_GPIO_CALLBACK callbackFn, + void *pArg) +{ + switch(ePinId) + { + case ADMW_GPIO_PIN_ALERT_ERROR: + _alertErrorIrqCallback = callbackFn; + _alertErrorIrqArg = pArg; + _alertErrorIrq.rise(callback(this, &GpioContext::_alertErrorIrqHandler)); + return ADMW_SUCCESS; + case ADMW_GPIO_PIN_DATAREADY: + _datareadyIrqCallback = callbackFn; + _datareadyIrqArg = pArg; + _datareadyIrq.rise(callback(this, &GpioContext::_datareadyIrqHandler)); + return ADMW_SUCCESS; + default: + return ADMW_INVALID_DEVICE_NUM; + } +} + +ADMW_RESULT GpioContext::disableIrq( + ADMW_GPIO_PIN ePinId) +{ + switch(ePinId) + { + case ADMW_GPIO_PIN_ALERT_ERROR: + _alertErrorIrq.rise(NULL); + return ADMW_SUCCESS; + case ADMW_GPIO_PIN_DATAREADY: + _datareadyIrq.rise(NULL); + return ADMW_SUCCESS; + default: + return ADMW_INVALID_DEVICE_NUM; + } +} + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Open the GPIO interface and allocate resources + */ +ADMW_RESULT admw_GpioOpen( + ADMW_PLATFORM_GPIO_CONFIG *pConfig, + ADMW_GPIO_HANDLE *phDevice) +{ + GpioContext *pCtx = new GpioContext((PinName)pConfig->resetPin, + (PinName)pConfig->alertErrorPin, + (PinName)pConfig->datareadyPin); + if (!pCtx) + { + ADMW_LOG_ERROR("Failed to allocate memory for GPIO context"); + return ADMW_NO_MEM; + } + + *phDevice = reinterpret_cast<ADMW_GPIO_HANDLE>(pCtx); + return ADMW_SUCCESS; +} + +/* + * Get the state of the specified GPIO pin + */ +ADMW_RESULT admw_GpioGet( + ADMW_GPIO_HANDLE hDevice, + ADMW_GPIO_PIN ePinId, + bool *pbState) +{ + GpioContext *pCtx = reinterpret_cast<GpioContext *>(hDevice); + + return pCtx->get(ePinId, pbState); +} + +/* + * Set the state of the specified GPIO pin + */ +ADMW_RESULT admw_GpioSet( + ADMW_GPIO_HANDLE hDevice, + ADMW_GPIO_PIN ePinId, + bool bState) +{ + GpioContext *pCtx = reinterpret_cast<GpioContext *>(hDevice); + + return pCtx->set(ePinId, bState); +} + +/* + * Enable interrupt notifications on the specified GPIO pin + */ +ADMW_RESULT admw_GpioIrqEnable( + ADMW_GPIO_HANDLE hDevice, + ADMW_GPIO_PIN ePinId, + ADMW_GPIO_CALLBACK callback, + void *arg) +{ + GpioContext *pCtx = reinterpret_cast<GpioContext *>(hDevice); + + return pCtx->enableIrq(ePinId, callback, arg); +} + +/* + * Disable interrupt notifications on the specified GPIO pin + */ +ADMW_RESULT admw_GpioIrqDisable( + ADMW_GPIO_HANDLE hDevice, + ADMW_GPIO_PIN ePinId) +{ + GpioContext *pCtx = reinterpret_cast<GpioContext *>(hDevice); + + return pCtx->disableIrq(ePinId); +} + +/* + * Close the GPIO interface and free resources + */ +void admw_GpioClose( + ADMW_GPIO_HANDLE hDevice) +{ + GpioContext *pCtx = reinterpret_cast<GpioContext *>(hDevice); + + delete pCtx; +} + +#ifdef __cplusplus +} +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/mbed/admw_log.cpp Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,119 @@ +/****************************************************************************** +Copyright 2017 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/*! + ****************************************************************************** + * @file: + * @brief: ADMW OS-dependent wrapper layer for log functions + *----------------------------------------------------------------------------- + */ + +#include <mbed.h> +#include "inc/admw_log.h" + +static Serial *gpUartDevice; + +static ADMW_LOG_LEVEL gLogLevel = ADMW_LOG_LEVEL_DEBUG; + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Open the Log interface and allocate resources + */ +ADMW_RESULT admw_LogOpen( + ADMW_PLATFORM_LOG_CONFIG *pConfig) +{ + if (pConfig->disableLogs) + return ADMW_SUCCESS; + + gpUartDevice = new Serial((PinName)pConfig->txPin, + (PinName)pConfig->rxPin, + pConfig->baudRate); + if (!gpUartDevice) + { + ADMW_LOG_ERROR("Failed to allocate memory for Log UART context"); + return ADMW_NO_MEM; + } + + return ADMW_SUCCESS; +} + +/* + * Close the Log interface and free resources + */ +void admw_LogClose(void) +{ + if (gpUartDevice) + { + delete gpUartDevice; + gpUartDevice = 0; + } +} + +/* + * Set the log level for uart communication + */ +void admw_LogLevel(ADMW_LOG_LEVEL maxLevel) +{ + gLogLevel = maxLevel; +} + +/* + * Print a log message to the platform log interface + */ +void admw_Log(ADMW_LOG_LEVEL level, const char* format, ...) +{ + char buffer[256]; + va_list va_args; + + if (!gpUartDevice) + return; + + if (level > gLogLevel) + return; + + va_start(va_args, format); + vsnprintf(buffer, sizeof(buffer), format, va_args); + va_end(va_args); + + gpUartDevice->printf("%s\r\n", buffer); +} + +#ifdef __cplusplus +} +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/mbed/admw_spi.cpp Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,155 @@ +/****************************************************************************** +Copyright 2017 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/*! + ****************************************************************************** + * @file: + * @brief: ADMW OS-dependent wrapper layer for SPI interface + *----------------------------------------------------------------------------- + */ + +#include <mbed.h> + +#include "inc/admw_spi.h" +#include "inc/admw_log.h" + +#define ADMW_SPI_MODE 0 /* CPOL=0, CPHA=0 */ +#define ADMW_SPI_FRAME_SIZE 8 /* 8-bit frame size */ + + +#ifdef __cplusplus +extern "C" { +#endif + + +// Struct to contain anything needed to identify the SPI device +// This is returned as a ADMW_SPI_HANDLE*, and is required to use +// the other SPI functions +typedef struct { + SPI *_spi; + DigitalOut *_cs; + DigitalOut *_wakeup; +} SpiContext_t; + + +/* + * Open the SPI interface and allocate resources + */ +ADMW_RESULT admw_SpiOpen( + ADMW_PLATFORM_SPI_CONFIG *pConfig, + ADMW_SPI_HANDLE *phDevice) +{ + SpiContext_t *pCtx = (SpiContext_t*)malloc(sizeof(*pCtx)); + if(!pCtx) { + ADMW_LOG_ERROR("Failed to allocate memory for SPI device"); + return ADMW_NO_MEM; + } + + pCtx->_spi = new SPI((PinName)pConfig->mosiPin, + (PinName)pConfig->misoPin, + (PinName)pConfig->sckPin); + pCtx->_cs = new DigitalOut((PinName)pConfig->csPin, 1); + + pCtx->_spi->format(ADMW_SPI_FRAME_SIZE, ADMW_SPI_MODE); + pCtx->_spi->frequency(pConfig->maxSpeedHz); + + pCtx->_wakeup = new DigitalOut((PinName)pConfig->wakeupPin, 1); + + *phDevice = (ADMW_SPI_HANDLE)pCtx; + + return ADMW_SUCCESS; +} + +/* + * Execute a bi-directional data transfer on the SPI interface + */ +ADMW_RESULT +admw_SpiTransfer( + ADMW_SPI_HANDLE hDevice, + void *pTxData, + void *pRxData, + unsigned nLength, + bool bCsHold) +{ + int rc = 0; + + SpiContext_t *pCtx = (SpiContext_t*)hDevice; + + *(pCtx->_wakeup) = 0; + + wait_us(60); + + *(pCtx->_cs) = 0; + + rc = pCtx->_spi->write((char*)(pTxData), pTxData ? nLength : 0, + (char*)(pRxData), pRxData ? nLength : 0); + + if ((rc < 0) || !bCsHold) + *(pCtx->_cs) = 1; + + *(pCtx->_wakeup) = 1; + + if (rc < 0) + { + ADMW_LOG_ERROR("Failed to complete SPI transfer"); + return ADMW_FAILURE; + } + + return ADMW_SUCCESS; +} + +/* + * Close the SPI interface and free resources + */ +void admw_SpiClose( + ADMW_SPI_HANDLE hDevice) +{ + SpiContext_t *pCtx = (SpiContext_t *)hDevice; + + delete pCtx->_spi; + delete pCtx->_cs; + delete pCtx->_wakeup; + + free(pCtx); +} + +#ifdef __cplusplus +} +#endif + +/*! + * @} + */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/mbed/admw_time.cpp Wed Jun 05 05:39:15 2019 +0000 @@ -0,0 +1,63 @@ +/****************************************************************************** +Copyright 2017 (c) Analog Devices, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + - Neither the name of Analog Devices, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + - The use of this software may or may not infringe the patent rights + of one or more patent holders. This license does not release you + from the requirement that you obtain separate licenses from these + patent holders to use this software. + - Use of the software either in source or binary form, must be run + on or directly connected to an Analog Devices Inc. component. + +THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/*! + ****************************************************************************** + * @file: + * @brief: ADMW OS-dependent wrapper layer for time functions + *----------------------------------------------------------------------------- + */ + +#include <mbed.h> + +#include "inc/admw_time.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Wait for a specified number of microseconds + */ +void admw_TimeDelayUsec( + const unsigned microseconds) +{ + wait_us(microseconds); +} + +#ifdef __cplusplus +} +#endif
--- a/uart_cozirCO2_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG uart_cozirCO2_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_UART] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementsPerCycle = 10, - .extraSettlingTime = 2000, - .sensorParameter = 32.0, /* This is a filter value configurable by the user */ - .uartChannelConfig = { - .sensor = ADI_SENSE_1000_UART_SENSOR_UART_CO2_A_DEF_L1, - }, - }, - }, - }, -}; -
--- a/voltage_honeywellPressure_config.c Tue Jun 04 10:09:11 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -Copyright 2017 (c) Analog Devices, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of Analog Devices, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - The use of this software may or may not infringe the patent rights - of one or more patent holders. This license does not release you - from the requirement that you obtain separate licenses from these - patent holders to use this software. - - Use of the software either in source or binary form, must be run - on or directly connected to an Analog Devices Inc. component. - -THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - *****************************************************************************/ - -/*! - ****************************************************************************** - * @file: - * @brief: - *----------------------------------------------------------------------------- - */ -#include "adi_sense_config_types.h" - -ADI_SENSE_CONFIG voltage_honeywellPressure_config = { - .versionId = { .major = 1, .minor = 4 }, - .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000, - .adisense1000 = { - .power = { - .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, - }, - .measurement = { - .operatingMode = ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE, - .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, - }, - .channels = { - [ADI_SENSE_1000_CHANNEL_ID_VOLTAGE_0] = { - .enableChannel = true, - .disablePublishing = false, - .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, - .measurementsPerCycle = 10, - .extraSettlingTime = 0, - .adcChannelConfig = { - .sensor = ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1, - .gain = ADI_SENSE_1000_ADC_GAIN_2X, - .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, - }, - .reference = { - .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL, - .disableBuffer = true, - }, - .enableVbias = false, - }, - }, - }, - }, -}; -