Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f9a382a

Browse filesBrowse files
committed
fix some compilation error and warnings in i2c
1 parent d854dc1 commit f9a382a
Copy full SHA for f9a382a

File tree

1 file changed

+5
-3
lines changed
Filter options

1 file changed

+5
-3
lines changed

‎cores/esp32/esp32-hal-i2c.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-i2c.c
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ static i2c_t _i2c_bus_array[2] = {
205205
#define I2C_MUTEX_UNLOCK() xSemaphoreGive(i2c->lock)
206206

207207
static i2c_t _i2c_bus_array[2] = {
208-
{(volatile i2c_dev_t *)(DR_REG_I2C_EXT_BASE_FIXED), NULL, 0, -1, -1, I2C_NONE,I2C_NONE,I2C_ERROR_OK,NULL,NULL,NULL,0,0,0,0},
209-
{(volatile i2c_dev_t *)(DR_REG_I2C1_EXT_BASE_FIXED), NULL, 1, -1, -1,I2C_NONE,I2C_NONE,I2C_ERROR_OK,NULL,NULL,NULL,0,0,0,0}
208+
{(volatile i2c_dev_t *)(DR_REG_I2C_EXT_BASE_FIXED), NULL, 0, -1, -1, I2C_NONE,I2C_NONE,I2C_ERROR_OK,NULL,NULL,NULL,0,0,0,0,0},
209+
{(volatile i2c_dev_t *)(DR_REG_I2C1_EXT_BASE_FIXED), NULL, 1, -1, -1,I2C_NONE,I2C_NONE,I2C_ERROR_OK,NULL,NULL,NULL,0,0,0,0,0}
210210
};
211211
#endif
212212

@@ -637,7 +637,9 @@ static void IRAM_ATTR i2c_isr_handler_default(void* arg)
637637
uint32_t activeInt = p_i2c->dev->int_status.val&0x7FF;
638638

639639
if(p_i2c->stage==I2C_DONE) { //get Out, can't service, not configured
640+
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
640641
uint32_t raw = p_i2c->dev->int_raw.val;
642+
#endif
641643
p_i2c->dev->int_ena.val = 0;
642644
p_i2c->dev->int_clr.val = 0x1FFF;
643645
log_v("eject raw=%p, int=%p",raw,activeInt);
@@ -1435,7 +1437,7 @@ void i2cDumpDqData(i2c_t * i2c)
14351437
tdq=&i2c->dq[a];
14361438
log_e("[%d] %sbit %x %c %s buf@=%p, len=%d, pos=%d, eventH=%p bits=%x",a,
14371439
(tdq->ctrl.addr>0x100)?"10":"7",
1438-
(tdq->ctrl.addr>0x100)?((tdq->ctrl.addr&0x600)>>1)|tdq->ctrl.addr&0xff:(tdq->ctrl.addr>>1),
1440+
(tdq->ctrl.addr>0x100)?(((tdq->ctrl.addr&0x600)>>1)|(tdq->ctrl.addr&0xff)):(tdq->ctrl.addr>>1),
14391441
(tdq->ctrl.mode)?'R':'W',
14401442
(tdq->ctrl.stop)?"STOP":"",
14411443
tdq->data,tdq->length,tdq->position,tdq->queueEvent,(tdq->queueEvent)?xEventGroupGetBits(tdq->queueEvent):0);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.