Vybhav Kadaba
/
EV-PRO-MW1001_Development_code_cleaup
Removed unwanted enums and unused functions
Diff: src/admw_1001.c
- Revision:
- 45:f5f553b8c0d5
- Parent:
- 44:94bdfaefddac
- Child:
- 48:5731f1aa2c5a
--- a/src/admw_1001.c Thu Jan 16 06:52:27 2020 +0000 +++ b/src/admw_1001.c Mon Jan 20 10:40:06 2020 +0000 @@ -1152,6 +1152,15 @@ return ADMW_SUCCESS; } +static ADMW_RESULT admw_SetAVDDVoltage( + ADMW_DEVICE_HANDLE hDevice, + float32_t AVDDVoltage) + { + + WRITE_REG_FLOAT(hDevice, AVDDVoltage, CORE_AVDD_VOLTAGE); + + return ADMW_SUCCESS; + } ADMW_RESULT admw1001_SetMeasurementConfig( ADMW_DEVICE_HANDLE hDevice, @@ -1180,7 +1189,11 @@ eRet = admw_SetExternalReferenceValues(hDevice, pMeasConfig->externalRef1Value); } - + if((pMeasConfig->AVDDVoltage >= 3.0) && (pMeasConfig->AVDDVoltage <= 3.6)) + { + eRet = admw_SetAVDDVoltage(hDevice, + pMeasConfig->AVDDVoltage); + } if (eRet != ADMW_SUCCESS) { ADMW_LOG_ERROR("Failed to set external reference values"); return eRet; @@ -1511,7 +1524,6 @@ switch (pChannelConfig->lutSelect) { case ADMW1001_LUT_DEFAULT: - case ADMW1001_LUT_UNITY: case ADMW1001_LUT_CUSTOM: sensorDetailsReg.LUT_Select = pChannelConfig->lutSelect; break;