Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: inc/admw1001/admw1001_lut_data.h
- Revision:
- 6:9d393a9677f4
- Parent:
- 5:0728bde67bdb
- Child:
- 50:d84305e5e1c0
--- a/inc/admw1001/admw1001_lut_data.h Wed Jun 05 05:39:15 2019 +0000
+++ b/inc/admw1001/admw1001_lut_data.h Sat Jun 15 14:30:49 2019 +0000
@@ -1,5 +1,5 @@
/*
-Copyright 2017 (c) Analog Devices, Inc.
+Copyright 2019 (c) Analog Devices, Inc.
All rights reserved.
@@ -36,7 +36,7 @@
/*!
******************************************************************************
* @file:
- * @brief: Look-Up Table data-type definitions for ADSNS1000 API.
+ * @brief: Look-Up Table data-type definitions for ADMW1001 API.
*-----------------------------------------------------------------------------
*/
@@ -69,7 +69,7 @@
typedef enum {
ADMW1001_LUT_GEOMETRY_RESERVED = 0x00,
/**< reserved - for internal use only */
- ADMW1001_LUT_GEOMETRY_COEFFS = 0x01,
+ ADMW1001_LUT_GEOMETRY_COEFFS = 0x01,
/**< 1D/2D equation coefficient list */
ADMW1001_LUT_GEOMETRY_NES_1D = 0x02,
/**< 1-dimensional not-equally-spaced look-up table */
@@ -83,49 +83,49 @@
/*! Linearisation equation type */
typedef enum {
- ADMW1001_LUT_EQUATION_POLYN,
+ ADMW1001_LUT_EQUATION_POLYN,
/**< Polynomial equation, typically used for Thermocouple and RTD
* linearisation */
- ADMW1001_LUT_EQUATION_POLYNEXP,
+ ADMW1001_LUT_EQUATION_POLYNEXP,
/**< Polynomial + exponential equation, typically used for Thermocouple
* inverse linearisation */
- ADMW1001_LUT_EQUATION_QUADRATIC,
+ ADMW1001_LUT_EQUATION_QUADRATIC,
/**< Quadratic linearisation equation, typically used for RTD
* linearisation */
- ADMW1001_LUT_EQUATION_STEINHART,
+ ADMW1001_LUT_EQUATION_STEINHART,
/**< Steinhart-Hart equation, typically used for Thermistor
* linearisation */
- ADMW1001_LUT_EQUATION_LOGARITHMIC,
+ ADMW1001_LUT_EQUATION_LOGARITHMIC,
/**< Beta-based logarithmic equation, typically used for Thermistor
* linearisation */
- ADMW1001_LUT_EQUATION_BIVARIATE_POLYN,
+ 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,
+ ADMW1001_LUT_EQUATION_COUNT,
/**< Enum count value - for internal use only */
- ADMW1001_LUT_EQUATION_LUT,
+ ADMW1001_LUT_EQUATION_LUT,
/**< Hard-coded Look-Up Table - for internal use only */
} ADMW1001_LUT_EQUATION;
typedef enum {
- ADMW1001_LUT_TC_DIRECTION_FORWARD,
+ 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,
+ ADMW1001_LUT_TC_DIRECTION_BACKWARD,
/**< Thermocouple inverse (Celsius to mV) linearisation */
- ADMW1001_LUT_TC_DIRECTION_COUNT,
+ 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,
+ ADMW1001_LUT_DATA_TYPE_RESERVED = 0,
/**< Reserved - for internal use only */
- ADMW1001_LUT_DATA_TYPE_FLOAT32 = 1,
+ ADMW1001_LUT_DATA_TYPE_FLOAT32 = 1,
/**< Single-precision 32-bit floating-point */
- ADMW1001_LUT_DATA_TYPE_FLOAT64 = 2,
+ ADMW1001_LUT_DATA_TYPE_FLOAT64 = 2,
/**< Double-precision 64-bit floating-point */
} ADMW1001_LUT_DATA_TYPE;
@@ -137,7 +137,7 @@
/**< look-up table range - minimum */
float32_t rangeMax;
/**< look-up table range - maximum */
- float64_t coeffs[];
+ float64_t coeffs[];
/**< C99 flexible array: sorted by ascending exponent in polynomials */
} ADMW1001_LUT_COEFF_LIST;
@@ -145,11 +145,11 @@
typedef struct __attribute__((packed, aligned(4))){
uint32_t nElements;
/**< number of elements. */
- float32_t initInputValue;
+ float32_t initInputValue;
/**< initial input value, corresponding to first table element */
- float32_t inputValueIncrement;
+ float32_t inputValueIncrement;
/**< interval between successive input values */
- float32_t lut[];
+ float32_t lut[];
/**< C99 flexible array */
} ADMW1001_LUT_1D_ES;
@@ -317,21 +317,21 @@
/*! LUT data header structure */
typedef struct __attribute__((packed, aligned(4))) {
uint32_t signature;
- /**< Hard-coded signature value (@ref ADMW1001_LUT_SIGNATURE) */
+ /**< Hard-coded signature value (@ref ADMW_LUT_SIGNATURE) */
ADMW1001_LUT_VERSION version;
- /**< LUT data format version (@ref ADMW1001_LUT_VERSION) */
+ /**< LUT data format version (@ref ADMW_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
+ * This, plus the header length, must not exceed ADMW_LUT_MAX_SIZE
*/
} ADMW1001_LUT_HEADER;
/*! LUT data top-level structure */
typedef struct __attribute__((packed, aligned(4))) {
- ADMW1001_LUT_HEADER header;
+ 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 */
@@ -341,10 +341,10 @@
*
* @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.
+ * to the ADMW_LUT type for further parsing/processing.
*/
typedef struct __attribute__((packed, aligned(4))) {
- ADMW1001_LUT_HEADER header;
+ 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 */
@@ -359,4 +359,3 @@
*/
#endif /* __ADMW1001_LUT_DATA_H__ */
-