This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

初学者关于I2C发送数据的问题



您好!

      我的开发板是ompl137,当我尝试用测试代码测试I2C时,总是只能发送第一个数据data[0]给 I2C_ICDXR,其他的就没用了,下面是测试代码中I2C写的部分代码:

           for ( i = 0 ; i < len ; i++ )         {            

            I2C_ICDXR = data[i];            // Write

            timeout = i2c_timeout;            

             do {    if ( timeout-- < 0  )                

                                {   EVMOMAPL137_I2C_reset( );                    

                                                                    return -1;                

                               }            

                   } while ( ( I2C_ICSTR & ICSTR_ICXRDY ) == 0 );// Wait for Tx Ready        

           }

期待您的回复。