Skip to content

Commit 5a8d58d

Browse files
authored
Correctly handle Arduino as Component when disable HAL Locks
Add condition compile directive to debug dump code, When used as a component under IDF, and DISABLE_HAL_LOCKS was asserted, my debug code still tried to access the HAL Mutex Lock. my Bad.
1 parent b502fd7 commit 5a8d58d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/esp32/esp32-hal-i2c.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,9 @@ log_n("Enable Core Debug Level \"Error\"");
608608
void i2cDumpI2c(i2c_t * i2c){
609609
log_e("i2c=%p",i2c);
610610
log_e("dev=%p date=%p",i2c->dev,i2c->dev->date);
611+
#if !CONFIG_DISABLE_HAL_LOCKS
611612
log_e("lock=%p",i2c->lock);
613+
#endif
612614
log_e("num=%d",i2c->num);
613615
log_e("mode=%d",i2c->mode);
614616
log_e("stage=%d",i2c->stage);

0 commit comments

Comments
 (0)