Vybhav Kadaba
/
EV-PRO-MW1001_Development_code_cleaup
Removed unwanted enums and unused functions
Diff: inc/admw1001/admw1001_config.h
- Revision:
- 63:6d048b2f3f32
- Parent:
- 61:0f16a2e3b58b
--- a/inc/admw1001/admw1001_config.h Wed Apr 08 10:05:08 2020 +0000 +++ b/inc/admw1001/admw1001_config.h Thu Apr 09 12:01:25 2020 +0000 @@ -86,8 +86,6 @@ /*!< 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; @@ -123,16 +121,6 @@ } ADMW1001_POWER_MODE; -/*! 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, - /*!< Skip settling time between consecutive measurements from an analog sensor */ - -} ADMW1001_FILTER_SETTLING; - /*! ADMW1001 measurement unit options * * Optionally select a measurement unit for final conversion results. @@ -194,8 +182,6 @@ /*!< x32 amplification gain */ ADMW1001_ADC_GAIN_64X, /*!< x64 amplification gain */ - ADMW1001_ADC_GAIN_128X, - /*!< x128 amplification gain */ } ADMW1001_ADC_GAIN; @@ -297,14 +283,10 @@ */ typedef enum { - ADMW1001_CHOP_MD_NONE = 0, + ADMW1001_CHOP_MD_OFF = 0, /*!< No chop performed. */ - ADMW1001_CHOP_MD_HW, - /*!< Hardware only chop performed. */ - ADMW1001_CHOP_MD_SW, - /*!< Software only chop performed. */ - ADMW1001_CHOP_MD_HWSW, - /*!< Hardware and software chop performed. */ + ADMW1001_CHOP_MD_ON = 1, + /*!< Chop performed. */ } ADMW1001_CHOP_MD; @@ -329,12 +311,6 @@ */ typedef enum { - ADMW1001_SF_976HZ = 0, - /*!< SF setting for 976Hz sample rate. */ - ADMW1001_SF_488HZ = 1, - /*!< SF setting for 488Hz sample rate. */ - ADMW1001_SF_244HZ = 3, - /*!< SF setting for 244Hz sample rate. */ ADMW1001_SF_122HZ = 7, /*!< SF setting for 122Hz sample rate. */ ADMW1001_SF_61HZ = 31, @@ -367,18 +343,6 @@ * * @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 * @@ -434,14 +398,6 @@ * @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 @@ -450,18 +406,6 @@ /*!< Operating mode - specifies how measurement cycles are scheduled */ ADMW1001_DATAREADY_MODE dataReadyMode; /*!< Data read mode - specifies how output samples are stored for reading */ - ADMW1001_MULTICYCLE_CONFIG multiCycleConfig; - /*!< Multi-Cycle configuration - specifies how bursts of measurement cycles - * are scheduled. Applicable only when operatingMode is - * ADMW1001_OPERATING_MODE_MULTICYCLE - */ - 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. - */ uint8_t excitationState; /*!< Excitation current state */ uint8_t groundSwitch; @@ -612,18 +556,6 @@ } 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 * @@ -653,10 +585,6 @@ /*!< 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; @@ -672,28 +600,11 @@ /*!< I2C device address (7-bit) */ uint8_t reserved; /*!< Reserved for future use and ensure word alignment. */ - 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. @@ -702,45 +613,6 @@ } 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 */ - uint8_t reserved[2]; - /*!< Reserved for future use and ensure word alignment. */ - 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 Measurement Channel configuration details */ typedef struct @@ -827,8 +699,6 @@ /*!< 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 */ }; /*!< Only one of adcChannelConfig, i2cChannelConfig, spiChannelConfig * is required, depending on the channel designation @@ -861,9 +731,6 @@ } ADMW1001_DIAGNOSTICS_CONFIG; -typedef uint16_t ADMW1001_ADVANCED_ACCESS_KEY; - -/*! ADMW1001 Device configuration details */ typedef struct { ADMW1001_POWER_CONFIG power; @@ -874,8 +741,6 @@ /*!< FFT configuration details */ ADMW1001_CHANNEL_CONFIG channels[ADMW1001_MAX_CHANNELS]; /*!< Channel-specific configuration details */ - ADMW1001_ADVANCED_ACCESS_KEY advancedAccessKey; - /*!< Key to enable access to advanced sensor configuration options */ } ADMW1001_CONFIG;