mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
186:707f6e361f3e
Parent:
157:ff67d9f36b67
--- a/targets/TARGET_Maxim/TARGET_MAX32630/i2c_api.c	Thu Apr 19 17:12:19 2018 +0100
+++ b/targets/TARGET_Maxim/TARGET_MAX32630/i2c_api.c	Fri Jun 22 16:45:37 2018 +0100
@@ -78,7 +78,7 @@
 //******************************************************************************
 void i2c_frequency(i2c_t *obj, int hz)
 {
-    I2CM_Init(obj->i2c, &obj->sys_cfg, hz);
+    I2CM_Init(obj->i2c, &obj->sys_cfg, (i2cm_speed_t)hz);
 }
 
 //******************************************************************************
@@ -100,7 +100,6 @@
 //******************************************************************************
 int i2c_read(i2c_t *obj, int address, char *data, int length, int stop)
 {
-    MBED_ASSERT(stop != 0);
     return I2CM_Read(obj->i2c, address >> 1, NULL, 0, (uint8_t *)data, length);
 }
 
@@ -146,11 +145,6 @@
         if (I2CM_WriteTxFifo(i2cm, fifo, MXC_S_I2CM_TRANS_TAG_RXDATA_NACK) != E_NO_ERROR) {
             goto byte_read_err;
         }
-
-        // Send the stop condition
-        if (I2CM_WriteTxFifo(i2cm, fifo, MXC_S_I2CM_TRANS_TAG_STOP) != E_NO_ERROR) {
-            goto byte_read_err;
-        }
     } else {
         if (I2CM_WriteTxFifo(i2cm, fifo, MXC_S_I2CM_TRANS_TAG_RXDATA_COUNT) != E_NO_ERROR) {
             goto byte_read_err;