Bumped Mbed FW version to 01.20.0080
ADMW1001 Host Library API
[ADMW Host Library API]
Detailed Description
ADMW1001 device-specific API function prototypes. These are supplementary to the common ADMW Host Library API.
Enumeration Type Documentation
ADMW1001 analog sensor excitation current output level options
- Note:
- applicable only to ADC analog sensor channels, and specific sensor types
- Enumerator:
Definition at line 220 of file admw1001_config.h.
ADMW1001 analog sensor excitation current ratios used for diode sensor
- Note:
- applicable only to a diode sensor
- Enumerator:
Definition at line 243 of file admw1001_config.h.
ADMW1001 analog sensor excitation state options
- Note:
- applicable only to ADC analog sensor channels, and specific sensor types
- Enumerator:
ADMW1001_ADC_EXC_STATE_CYCLE_POWER Excitation for measurement is active only during measurement
ADMW1001_ADC_EXC_STATE_ALWAYS_ON Excitation for measurement is always on
Definition at line 206 of file admw1001_config.h.
ADMW1001 analog filter selection options
- Note:
- applicable only to ADC analog sensor channels
- Enumerator:
ADMW1001_ADC_FILTER_SINC4 SINC4 - 4th order sinc response filter
ADMW1001_ADC_FILTER_SINC3 SINC3 - 3rd order sinc response filter
Definition at line 309 of file admw1001_config.h.
enum ADMW1001_ADC_GAIN |
ADMW1001 analog input signal amplification gain options
- Note:
- applicable only to ADC analog sensor channels
- Enumerator:
Definition at line 182 of file admw1001_config.h.
enum ADMW1001_ADC_GND_SW |
ADMW1001 ADC Reference configuration
- Note:
- applicable only to ADC analog sensor channels
- Enumerator:
ADMW1001_ADC_GND_SW_OPEN Ground switch not enabled for measurement.
ADMW1001_ADC_GND_SW_CLOSED Ground switch enabled for measurement.
Definition at line 284 of file admw1001_config.h.
ADMW1001 analog reference selection options
- Note:
- applicable only to ADC analog sensor channels, and specific sensor types
- Enumerator:
Definition at line 269 of file admw1001_config.h.
ADMW1001 analog input signal amplification gain options
- Note:
- applicable only to ADC analog sensor channels
- Enumerator:
Definition at line 166 of file admw1001_config.h.
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.
- Enumerator:
Definition at line 96 of file admw1001_sensor_types.h.
- Enumerator:
ADMW1001_BUFFER_BYPASSS_DISABLED Buffer Bypass Disabled
ADMW1001_BUFFER_BYPASSS_ENABLED Buffer Bypass Enabled
Definition at line 153 of file admw1001_config.h.
enum ADMW1001_CH_ID |
ADMW1001 measurement channel identifiers
- Enumerator:
Definition at line 55 of file admw1001_sensor_types.h.
ADMW1001 channel priority options
Definition at line 61 of file admw1001_config.h.
enum ADMW1001_CHOP_MD |
ADMW1001 analog filter chop mode
- Note:
- applicable only to ADC analog sensor channels
Definition at line 297 of file admw1001_config.h.
ADMW1001 data ready mode options
- Enumerator:
ADMW1001_DATAREADY_PER_CONVERSION 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_FIFO_FILL The DATAREADY signal is asserted after each fill of the data FIFO
- applicable only when ADMW1001_OPERATING_MODE_CONTINUOUS or ADMW1001_OPERATING_MODE_MULTICYCLE is also selected
Definition at line 93 of file admw1001_config.h.
ADMW1001 I2C clock speed options
- Note:
- applicable only for I2C sensors
- Enumerator:
ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K 100kHz I2C clock speed
ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_400K 400kHz I2C clock speed
Definition at line 345 of file admw1001_config.h.
ADMW1001 digital sensor data encoding
- Note:
- applicable only to SPI and I2C digital sensor channels
- Enumerator:
Definition at line 499 of file admw1001_config.h.
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
- Enumerator:
Definition at line 428 of file admw1001_sensor_types.h.
Linearisation data vector format
- Enumerator:
Definition at line 118 of file admw1001_lut_data.h.
Linearisation equation type
- Enumerator:
Definition at line 80 of file admw1001_lut_data.h.
Linearisation look-up table / co-efficient list geometry
- Enumerator:
Definition at line 70 of file admw1001_lut_data.h.
enum ADMW1001_LUT_SELECT |
ADMW1001 look-up table selection Select table used to linearise the measurement.
- Enumerator:
ADMW1001_LUT_DEFAULT Default LUT
ADMW1001_LUT_CUSTOM User defined custom LUT
ADMW1001_LUT_RESERVED Reserved for future use
Definition at line 484 of file admw1001_config.h.
- Enumerator:
Definition at line 107 of file admw1001_lut_data.h.
ADMW1001 measurement unit options
Optionally select a measurement unit for final conversion results. Currently applicable only to specific temperature sensor types.
- Enumerator:
Definition at line 142 of file admw1001_config.h.
ADMW1001 operating mode options
- Enumerator:
ADMW1001_OPERATING_MODE_SINGLECYCLE Executes a single measurement cycle and stops
ADMW1001_OPERATING_MODE_CONTINUOUS Continuously executes measurement cycles
Definition at line 83 of file admw1001_config.h.
enum ADMW1001_POWER_MODE |
ADMW1001 power mode options
- Enumerator:
Definition at line 115 of file admw1001_config.h.
ADMW1001 Sinc Filter range (SF)
- Note:
- applicable only to ADC analog sensor channels
- SF must be set in conjunction with chop mode and sinc filter type to achieve the desired sampling rate.
- Enumerator:
Definition at line 324 of file admw1001_config.h.
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
Definition at line 451 of file admw1001_sensor_types.h.
ADMW1001 External Vref Buffer Mode options
- Enumerator:
Definition at line 125 of file admw1001_config.h.
Function Documentation
struct __attribute__ | ( | (packed, aligned(4)) | ) | [read, write] |
Struct for a list of coefficients to be used in an equation
Struct for a 1-dimensional equally-spaced look-up table
Struct for a 1-dimensional not-equally-spaced look-up table
Look-Up Table descriptor
Look-Up Table structure
LUT data format versions
LUT data header structure
LUT data top-level structure
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 ADMW_LUT type for further parsing/processing.
< number of coefficients
< look-up table range - minimum
< look-up table range - maximum
< C99 flexible array: sorted by ascending exponent in polynomials
< number of elements.
< initial input value, corresponding to first table element
< interval between successive input values
< C99 flexible array
< number of elements of each array.
< C99 flexible array, first X's array then Y's array
< ADMW1001_LUT_GEOMETRY
< ADMW1001_ADC_CHANNEL
< ADMW1001_LUT_EQUATION
< ADMW1001_LUT_TC_DIRECTION
< ADMW1001_ADC_SENSOR_TYPE
< ADMW1001_LUT_DATA_TYPE
< Length (bytes) of table data section (excl. this header)
< Look-Up Table descriptor
< Look-Up Table data
< Major version number
< Minor version number
< Hard-coded signature value (ADMW_LUT_SIGNATURE)
< LUT data format version (ADMW_LUT_VERSION)
< Total number of tables
< Total length (in bytes) of all table descriptors and data (excluding this header) This, plus the header length, must not exceed ADMW_LUT_MAX_SIZE
< LUT data top-level header structure
< Variable-length array of one-or-more look-up table structures
< LUT data top-level header structure
< Variable-length byte array of look-up tables in raw binary format
Definition at line 128 of file admw1001_lut_data.h.
ADMW_RESULT admw1001_AssembleLutData | ( | ADMW1001_LUT * | pLutBuffer, |
unsigned | nLutBufferSize, | ||
unsigned const | nNumTables, | ||
ADMW1001_LUT_DESCRIPTOR *const | ppDesc[], | ||
ADMW1001_LUT_TABLE_DATA *const | ppData[] | ||
) |
Assemble a list of separate Look-Up Tables into a single buffer.
- Parameters:
-
[out] pLutBuffer Pointer to the Look-Up Table data buffer where the assembled Look-Up Table data will be placed [in] nLutBufferSize Allocated size, in bytes, of the output data buffer [in] nNumTables Number of tables to add to the Look-Up Table buffer [in] ppDesc Array of pointers to the table descriptors to be added [in] ppData Array of pointers to the table data to be added
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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 admw1001_SetLutData.
Definition at line 2106 of file admw_1001.c.
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 | ||
) |
Get the number of samples available when DATAREADY status is asserted.
- Parameters:
-
[in] hDevice ADMW device context handle [in] eMeasurementMode Must be set to the same value used for admw_StartMeasurement(). [out] peOperatingMode Pointer to return the configured operating mode [out] peDataReadyMode Pointer to return the configured data publishing mode [out] pnSamplesPerDataready Pointer to return the calculated number of samples available when DATAREADY is asserted [out] pnSamplesPerCycle Pointer to return the calculated number of samples produced per measurement cycle [out] pnBytesPerSample Pointer to return the size, in bytes, of each sample
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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.
Definition at line 795 of file admw_1001.c.
ADMW_RESULT admw1001_Read_Debug_Register | ( | ADMW_DEVICE_HANDLE const | hDevice, |
uint16_t const | nAddress, | ||
void *const | pData, | ||
unsigned const | nLength | ||
) |
Read one or more device registers at the specified debug register address.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] nAddress Register map address to read from [out] pData Pointer to return the register map data [in] nLength Number of bytes of data to read from the register map
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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 | ||
) |
Read one or more device registers at the specified register address.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] nAddress Register map address to read from [out] pData Pointer to return the register map data [in] nLength Number of bytes of data to read from the register map
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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.
Definition at line 754 of file admw_1001.c.
ADMW_RESULT admw1001_SetAdvancedAccess | ( | ADMW_DEVICE_HANDLE | hDevice, |
ADMW1001_ADVANCED_ACCESS_KEY | key | ||
) |
Enable access to advanced sensor configuration options.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] key Key to unlock advanced access
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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 admw_ApplyConfigUpdates() is called
ADMW_RESULT admw1001_SetChannelConfig | ( | ADMW_DEVICE_HANDLE | hDevice, |
ADMW1001_CH_ID | eChannelId, | ||
ADMW1001_CHANNEL_CONFIG * | pChannelConfig | ||
) |
Update channel configuration settings for a specific channel.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] eChannelId Selects the channel to be updated [in] pChannelConfig Channel configuration details
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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 admw_ApplyConfigUpdates() is called
Definition at line 1908 of file admw_1001.c.
ADMW_RESULT admw1001_SetChannelCount | ( | ADMW_DEVICE_HANDLE | hDevice, |
ADMW1001_CH_ID | eChannelId, | ||
uint32_t | nMeasurementsPerCycle | ||
) |
Update number of measurements-per-cycle for a specific channel.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] eChannelId Selects the channel to be updated [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).
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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 admw_ApplyConfigUpdates() is called
Definition at line 1201 of file admw_1001.c.
ADMW_RESULT admw1001_SetChannelPriority | ( | ADMW_DEVICE_HANDLE | hDevice, |
ADMW1001_CH_ID | eChannelId, | ||
ADMW1001_CHANNEL_PRIORITY | ePriority | ||
) |
Update priority level for a specific channel.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] eChannelId Selects the channel to be updated [in] ePriority Specifies the channel priority level
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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 admw_ApplyConfigUpdates() is called
ADMW_RESULT admw1001_SetChannelSettlingTime | ( | ADMW_DEVICE_HANDLE | hDevice, |
ADMW1001_CH_ID | eChannelId, | ||
uint32_t | nSettlingTime | ||
) |
Update the extra settling time for a specified channel.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] eChannelId Selects the channel to be updated [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.
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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 admw_ApplyConfigUpdates() is called
Definition at line 1893 of file admw_1001.c.
ADMW_RESULT admw1001_SetChannelThresholdLimits | ( | ADMW_DEVICE_HANDLE | hDevice, |
ADMW1001_CH_ID | eChannelId, | ||
float32_t | fHighThresholdLimit, | ||
float32_t | fLowThresholdLimit | ||
) |
Update the measurement threshold limits for a specified channel.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] eChannelId Selects the channel to be updated [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. [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.
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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 admw_ApplyConfigUpdates() is called
Definition at line 1834 of file admw_1001.c.
ADMW_RESULT admw1001_SetDiagnosticsConfig | ( | ADMW_DEVICE_HANDLE | hDevice, |
ADMW1001_DIAGNOSTICS_CONFIG * | pDiagnosticsConfig | ||
) |
Update diagnostics configuration settings on the device.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] pDiagnosticsConfig Diagnostics configuration details
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
Translates configuration details provided into device-specific register settings and updates device configuration registers.
- Note:
- Settings are not applied until admw_ApplyConfigUpdates() is called
Definition at line 1169 of file admw_1001.c.
ADMW_RESULT admw1001_SetLutData | ( | ADMW_DEVICE_HANDLE | hDevice, |
ADMW1001_LUT *const | pLutData | ||
) |
Write Look-Up Table data to the device memory.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [out] pLutData Pointer to the Look-Up Table data structure
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
Validates the Look-Up Table data format and loads it into device memory via dedicated keyhole registers.
- Note:
- Settings are not applied until admw_ApplyConfigUpdates() is called
Definition at line 2165 of file admw_1001.c.
ADMW_RESULT admw1001_SetLutDataRaw | ( | ADMW_DEVICE_HANDLE | hDevice, |
ADMW1001_LUT_RAW *const | pLutData | ||
) |
Write Look-Up Table raw data to the device memory.
- Parameters:
-
[in] hDevice ADMW device context handle [out] pLutData Pointer to the Look-Up Table raw data structure
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
This can be used instead of admw1001_SetLutData for loading LUT data from the alternative raw data format. See admw1001_SetLutData for more information.
- Note:
- Settings are not applied until admw_ApplyConfigUpdates() is called
Definition at line 2080 of file admw_1001.c.
ADMW_RESULT admw1001_SetMeasurementConfig | ( | ADMW_DEVICE_HANDLE | hDevice, |
ADMW1001_MEASUREMENT_CONFIG * | pMeasurementConfig | ||
) |
Update measurement configuration settings on the device.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] pMeasurementConfig Measurement configuration details
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
Translates configuration details provided into device-specific register settings and updates device configuration registers.
- Note:
- Settings are not applied until admw_ApplyConfigUpdates() is called
Definition at line 1096 of file admw_1001.c.
ADMW_RESULT admw1001_SetSensorParameter | ( | ADMW_DEVICE_HANDLE | hDevice, |
ADMW1001_CH_ID | eChannelId, | ||
float32_t | fSensorParam | ||
) |
Set a sensor specific parameter for a specified channel.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] eChannelId Selects the channel to be updated [in] fSensorParam Sensor specific parameter
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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 admw_ApplyConfigUpdates() is called
Definition at line 1880 of file admw_1001.c.
ADMW_RESULT admw1001_Write_Debug_Register | ( | ADMW_DEVICE_HANDLE const | hDevice, |
uint16_t const | nAddress, | ||
void *const | pData, | ||
unsigned const | nLength | ||
) |
Write one or more device registers at the specified debug register address.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] nAddress Register map address to read from [out] pData Pointer to return the register map data [in] nLength Number of bytes of data to read from the register map
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
Provides direct byte-level write access to the device register map. The size and format of the register(s) must be known.
ADMW_RESULT admw1001_WriteRegister | ( | ADMW_DEVICE_HANDLE const | hDevice, |
uint16_t const | nAddress, | ||
void *const | pData, | ||
unsigned const | nLength | ||
) |
Write one or more device registers at the specified register address.
- Parameters:
-
[in] hDevice ADMW1001 device context handle [in] nAddress Register map address to read from [out] pData Pointer to return the register map data [in] nLength Number of bytes of data to read from the register map
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully.
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.
- Writes to special "keyhole" registers will be handled according to documentation for those registers.
Definition at line 700 of file admw_1001.c.
Generated on Thu Jul 14 2022 10:33:00 by 1.7.2