Mbed Development branch for MeasrueWare

Revision:
70:420fac5132f5
Parent:
65:d91e1d63153d
Child:
72:35ea0b4e725b
--- a/src/admw_1001.c	Mon Apr 20 06:23:42 2020 +0000
+++ b/src/admw_1001.c	Thu Apr 23 08:30:42 2020 +0000
@@ -316,9 +316,9 @@
 
     if (!statusReg.Cmd_Running) /* Active-low, so invert it */
         pStatus->deviceStatus |= ADMW_DEVICE_STATUS_BUSY;
-    if (statusReg.Drdy)
+    else if (statusReg.Drdy)
         pStatus->deviceStatus |= ADMW_DEVICE_STATUS_DATAREADY;
-    if (statusReg.FIFO_Error)
+    else if(statusReg.FIFO_Error == ADMW_DEVICE_STATUS_FIFO_ERROR)
         pStatus->deviceStatus |= ADMW_DEVICE_STATUS_FIFO_ERROR;
     if (statusReg.Alert_Active) {
         pStatus->deviceStatus |= ADMW_DEVICE_STATUS_ALERT;
@@ -357,7 +357,7 @@
             pStatus->deviceStatus |= ADMW_DEVICE_STATUS_LUT_ERROR;
     }
 
-    if (statusReg.Error) {
+    if (statusReg.Error == ADMW_DEVICE_STATUS_ERROR) {
         pStatus->deviceStatus |= ADMW_DEVICE_STATUS_ERROR;
 
         ADMW_CORE_Error_Code_t errorCodeReg;
@@ -1155,6 +1155,13 @@
     return ADMW_SUCCESS;
 }
 
+uint16_t totalChannelCount(ADMW_DEVICE_HANDLE hDevice,ADMW1001_CHANNEL_CONFIG*pChannelConfig)
+{
+    uint16_t channelCount=0;
+    channelCount=pChannelConfig->measurementsPerCycle;
+    return channelCount;
+}
+
 ADMW_RESULT admw1001_SetChannelCount(
     ADMW_DEVICE_HANDLE hDevice,
     ADMW1001_CH_ID eChannelId,