We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc2b3d4 commit 6cf28baCopy full SHA for 6cf28ba
interfaces/i2c_example/i2c_task.c
@@ -116,12 +116,17 @@ OS_TASK_FUNCTION (i2c_master_task, pvParameters )
116
HW_I2C_F_ADD_STOP);
117
OS_EVENT_WAIT(i2c_event, OS_EVENT_FOREVER);
118
#else
119
- I2C_error_code = ad_i2c_write_read(_master_handle,
120
- _req,
121
- I2C_REQUEST_SIZE,//reduce this to simulate incomplete send
122
- resp,
123
- I2C_RESPONSE_SIZE,
124
- HW_I2C_F_ADD_STOP);
+ I2C_error_code = ad_i2c_write(_master_handle,
+ _req,
+ I2C_REQUEST_SIZE,
+ HW_I2C_F_ADD_STOP);
+
+ vTaskDelayUntil(&xNextWakeTime, OS_TICKS_2_MS(40)); //delay wait as per datasheet
125
126
+ I2C_error_code = ad_i2c_read(_master_handle,
127
+ resp,
128
+ I2C_RESPONSE_SIZE,
129
130
#endif
131
if(0 == I2C_error_code){
132
/*
0 commit comments