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.
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: i2c.h
- Revision:
- 220:2aeab83212e6
- Parent:
- 215:570251b23c7b
--- a/i2c.h Sun Jul 03 15:28:43 2016 +0000
+++ b/i2c.h Mon Jul 04 05:24:35 2016 +0000
@@ -45,7 +45,6 @@
}
if(((pdirr1 & 0x03000000)==0x03000000))//if SCL and SDA are both high
{
- TIME_LATEST_I2C_SPEED = FCTN_CDMS_RD_RTC() >> 7;
gPC.printf("\n\rData received from PL");
}
else
@@ -58,6 +57,7 @@
else if (read_ack == 1)
{
I2C_busreset();
+ CDMS_I2C_ERR_SPEED_COUNTER++;
}
PL_I2C_GPIO = 0;
i2c_count = 0;
@@ -80,7 +80,6 @@
}
if(((pdirw1 & 0x03000000)==0x03000000))
{
- TIME_LATEST_I2C_SPEED = FCTN_CDMS_RD_RTC() >> 7;
gPC.printf("\n\r Data sent to PL");
}
else
@@ -93,6 +92,7 @@
if (write_ack == 1)
{
I2C_busreset();
+ CDMS_I2C_ERR_SPEED_COUNTER++;
}
i2c_count = 0;
return write_ack;
@@ -127,6 +127,7 @@
else if (read_ack == 1)
{
I2C_busreset();
+ CDMS_I2C_ERR_BAE_COUNTER++;
}
CDMS_I2C_GPIO = 0;
i2c_count = 0;
@@ -150,7 +151,6 @@
}
if(((pdirw1 & 0x03000000)==0x03000000))
{
- TIME_LATEST_I2C_BAE = FCTN_CDMS_RD_RTC() >> 7;
gPC.printf("\n\r Data sent BAE");
}
else
@@ -163,6 +163,7 @@
if (write_ack == 1)
{
I2C_busreset();
+ CDMS_I2C_ERR_BAE_COUNTER++;
}
CDMS_I2C_GPIO = 0;
i2c_count = 0;
