Skip to content

Commit

Permalink
Fix Unused Variable Warning (#2940)
Browse files Browse the repository at this point in the history
Some Debugging variables were enabled at ERROR level instead of DEBUG.  Specifically `tAfter` and `tBefore`
  • Loading branch information
stickbreaker authored and me-no-dev committed Jul 9, 2019
1 parent 2e32022 commit d2816b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cores/esp32/esp32-hal-i2c.c
Expand Up @@ -1270,15 +1270,15 @@ i2c_err_t i2cProcQueue(i2c_t * i2c, uint32_t *readCount, uint16_t timeOutMillis)

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

#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_ERROR
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
portTickType tBefore=xTaskGetTickCount();
#endif

// wait for ISR to complete the transfer, or until timeOut in case of bus fault, hardware problem

uint32_t eBits = xEventGroupWaitBits(i2c->i2c_event,EVENT_DONE,pdFALSE,pdTRUE,ticksTimeOut);

#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_ERROR
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
portTickType tAfter=xTaskGetTickCount();
#endif

Expand Down

0 comments on commit d2816b2

Please sign in to comment.