mbed

Fork of mbed-dev by mbed official

Revision:
179:79309dc6340a
Parent:
160:d5399cc887bb
--- a/targets/TARGET_ONSEMI/TARGET_NCS36510/i2c_api.c	Wed Nov 08 13:50:44 2017 +0000
+++ b/targets/TARGET_ONSEMI/TARGET_NCS36510/i2c_api.c	Thu Nov 23 11:57:25 2017 +0000
@@ -169,9 +169,7 @@
         return Count;
     }
 
-    while(obj->membase->STATUS.WORD & I2C_STATUS_CMD_FIFO_OFL_BIT); /* Wait till command overflow ends */
-
-    if(obj->membase->STATUS.WORD & I2C_STATUS_BUS_ERR_BIT) {
+    if(I2C_BUS_ERR_CHECK) {
         /* Bus error means NAK received */
         return 0;
     } else {
@@ -180,4 +178,4 @@
     }
 }
 
-#endif /* DEVICE_I2C */
\ No newline at end of file
+#endif /* DEVICE_I2C */