working version
Dependencies: mbed mbed-rtos SimpleDMA FreescaleIAP eeprom
Fork of CDMS_CODE_FM_28JAN2017 by
Diff: i2c.h
- Revision:
- 354:eb6c863756a8
- Parent:
- 353:e1803e801e20
- Child:
- 356:197c93dc2012
diff -r e1803e801e20 -r eb6c863756a8 i2c.h --- a/i2c.h Tue Feb 21 06:30:56 2017 +0000 +++ b/i2c.h Sat Mar 11 05:52:18 2017 +0000 @@ -139,20 +139,17 @@ { // gPC.printf("i2C_wr\r\n"); CDMS_I2C_GPIO = 1; - wait_us(1); write_ack = master.write(addr_bae|0x00,data,tc_len2); Thread::wait(1); //As per the tests Thread::wait is not required on master side but its safe to give 1ms pdirw1=PTE->PDIR; uint8_t i2c_count = 0; if(write_ack == 0) { - gPC.printf("\n\r before count loop"); while(((pdirw1 & 0x03000000)!=0x03000000)&& i2c_count<10) { Thread::wait(1); pdirw1=PTE->PDIR; i2c_count++; - } if(((pdirw1 & 0x03000000)==0x03000000)) {