FM
Dependencies: SimpleDMA eeprom mbed-rtos mbed FreescaleIAP
Fork of CDMS_CODE by
Diff: i2c.h
- Revision:
- 354:0da912441c7b
- Parent:
- 353:e1803e801e20
--- a/i2c.h Tue Feb 21 06:30:56 2017 +0000 +++ b/i2c.h Sat Mar 11 04:46:31 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)) {