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:
- 14:266ab283b086
- Parent:
- 13:97cb32670539
- Child:
- 17:2f0028880874
--- a/src/admw_1001.c Thu Jul 25 06:38:45 2019 +0000
+++ b/src/admw_1001.c Thu Jul 25 11:46:20 2019 +0000
@@ -2697,6 +2697,28 @@
return ADMW_SUCCESS;
}
+
+ADMW_RESULT deviceInformation(ADMW_DEVICE_HANDLE hDevice)
+{
+ uint16_t nAddress = REG_CORE_REVISION;
+ char nData[ADMW_VERSION_REG_VAL_SIZE]; //4 Bytes of version register data
+ ADMW_RESULT res;
+ res=admw1001_ReadRegister(hDevice,nAddress,nData,sizeof(nData));
+ if(res != ADMW_SUCCESS)
+ {
+ //if reading version register failed, sending 00.00.0000 as ADMW1001 firmware version
+ //strcat(nData, ADMW1001_FIRMWARE_VERSION_DEFAULT);
+ ADMW_LOG_INFO("Firmware Version Id is %X.%X",nData[2],nData[0]);
+ }
+ else
+ {
+ char buffer[ADMW_FORMATTED_VERSION_SIZE]; //00.00.0000 8 digits + 2 Bytes "." + one null character at the end
+ strcat(nData, buffer);
+ ADMW_LOG_INFO("Firmware Version Id is %X.%X",nData[2],nData[0]);
+ }
+ return ADMW_SUCCESS;
+}
+
ADMW_RESULT admw1001_getFirmwareStatus(
ADMW_DEVICE_HANDLE const hDevice,
bool * const bFirmwareStatus)
@@ -2842,4 +2864,4 @@
}
return eRet;
-}
+}
\ No newline at end of file