Skip to content

Commit 4fd7dd1

Browse files
stickbreakerme-no-dev
authored andcommitted
fix debug optimization (#1365)
incorrect optimization for debugging tick markers.
1 parent 86e04aa commit 4fd7dd1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: cores/esp32/esp32-hal-i2c.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -959,12 +959,15 @@ i2c_err_t i2cProcQueue(i2c_t * i2c, uint32_t *readCount, uint16_t timeOutMillis)
959959

960960
i2c->dev->ctr.trans_start=1; // go for it
961961

962+
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_ERROR
963+
portTickType tBefore=xTaskGetTickCount();
964+
#endif
965+
962966
uint32_t eBits = xEventGroupWaitBits(i2c->i2c_event,EVENT_DONE,pdFALSE,pdTRUE,ticksTimeOut);
963967

964968
//log_e("after WaitBits=%x @tick=%d",eBits,xTaskGetTickCount());
965969

966970
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_ERROR
967-
portTickType tBefore=xTaskGetTickCount();
968971
portTickType tAfter=xTaskGetTickCount();
969972
#endif
970973

0 commit comments

Comments
 (0)