Skip to content

Commit 278d53c

Browse files
author
Chuck Todd
committed
missed
too many deletions
1 parent d841b2a commit 278d53c

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

cores/esp32/esp32-hal-i2c.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ void i2cInitFix(i2c_t * i2c){
348348
{
349349
log_e("Busy at initialization!");
350350
}
351+
i2c->dev->ctr.trans_start = 1;
351352
uint16_t count = 50000;
352353
while ((!i2c->dev->command[2].done) && (--count > 0));
353354
I2C_MUTEX_UNLOCK();
@@ -365,13 +366,6 @@ void i2cReset(i2c_t* i2c){
365366
I2C_MUTEX_UNLOCK();
366367
}
367368

368-
//** 11/2017 Stickbreaker attempt at ISR for I2C hardware
369-
// liberally stolen from ESP_IDF /drivers/i2c.c
370-
esp_err_t i2c_isr_free(intr_handle_t handle){
371-
372-
return esp_intr_free(handle);
373-
}
374-
375369
/* Stickbreaker ISR mode debug support
376370
*/
377371
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_ERROR
@@ -1163,7 +1157,7 @@ return reason;
11631157

11641158
i2c_err_t i2cReleaseISR(i2c_t * i2c){
11651159
if(i2c->intr_handle){
1166-
esp_err_t error =i2c_isr_free(i2c->intr_handle);
1160+
esp_err_t error =esp_intr_free(i2c->intr_handle);
11671161
// log_e("released ISR=%d",error);
11681162
i2c->intr_handle=NULL;
11691163
}

0 commit comments

Comments
 (0)