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: src/admw_1001.c
- Revision:
- 45:f5f553b8c0d5
- Parent:
- 44:94bdfaefddac
--- 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;