Vybhav Kadaba
/
EV-PRO-MW1001_Development_code_cleaup
Removed unwanted enums and unused functions
Diff: src/admw_1001.c
- Revision:
- 58:aa9cd5072f66
- Parent:
- 57:c6275de14bc5
- Child:
- 61:0f16a2e3b58b
--- a/src/admw_1001.c Fri Mar 06 05:32:12 2020 +0000 +++ b/src/admw_1001.c Mon Mar 16 09:02:06 2020 +0000 @@ -1378,14 +1378,8 @@ case ADMW1001_ADC_SENSOR_RTD_3WIRE_NI120: case ADMW1001_ADC_SENSOR_RTD_3WIRE_CUSTOM: - case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_1: - case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_2: - case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_3: - case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_4: - case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_1: - case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_2: - case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_3: - case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE_4: + case ADMW1001_ADC_SENSOR_BRIDGE_4WIRE: + case ADMW1001_ADC_SENSOR_BRIDGE_6WIRE: case ADMW1001_ADC_SENSOR_DIODE: case ADMW1001_ADC_SENSOR_THERMISTOR_44004_44033_2P252K_AT_25C: case ADMW1001_ADC_SENSOR_THERMISTOR_44005_44030_3K_AT_25C: @@ -1409,11 +1403,6 @@ return ADMW_INVALID_PARAM; } break; - case ADMW1001_ADC_SENSOR_VOLTAGE: - case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_A: - case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_B: - case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_1: - case ADMW1001_ADC_SENSOR_VOLTAGE_PRESSURE_2: case ADMW1001_ADC_SENSOR_THERMOCOUPLE_J: case ADMW1001_ADC_SENSOR_THERMOCOUPLE_K: case ADMW1001_ADC_SENSOR_THERMOCOUPLE_T: @@ -1430,17 +1419,6 @@ return ADMW_INVALID_PARAM; } break; - case ADMW1001_ADC_SENSOR_CURRENT: - case ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_A: - case ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_1: - case ADMW1001_ADC_SENSOR_CURRENT_PRESSURE_2: - 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); @@ -1827,8 +1805,7 @@ /* Ensure that the sensor type is valid for this channel */ switch(sensorType) { - case ADMW1001_I2C_SENSOR_HUMIDITY_A: - case ADMW1001_I2C_SENSOR_HUMIDITY_B: + case ADMW1001_I2C_SENSOR_HUMIDITY: case ADMW1001_I2C_SENSOR_TEMPERATURE_ADT742X: sensorTypeReg.Sensor_Type = sensorType; break; @@ -2021,9 +1998,7 @@ /* Ensure that the sensor type is valid for this channel */ switch(sensorType) { - case ADMW1001_SPI_SENSOR_PRESSURE_A: - case ADMW1001_SPI_SENSOR_ACCELEROMETER_A: - case ADMW1001_SPI_SENSOR_ACCELEROMETER_B: + case ADMW1001_SPI_SENSOR: sensorTypeReg.Sensor_Type = sensorType; break;