Browse Source

i2c: use correct delay macro

master
Franz Levin 2 years ago
parent
commit
ded84d9002
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      bmp180.c
  2. +2
    -2
      ws2801.c

+ 2
- 2
bmp180.c View File

@ -90,7 +90,7 @@ int16_t ICACHE_FLASH_ATTR bmp180_read_temp_raw(bmp180_t* bmp180)
return 0;
}
os_delay_us(BMP180_CONVERSION_TIME_TEMERATURE);
I2C_DELAY_US(BMP180_CONVERSION_TIME_TEMERATURE);
return read16(bmp180, BMP180_REG_MSB);
}
@ -132,7 +132,7 @@ int32_t ICACHE_FLASH_ATTR bmp180_read_pressure_raw(bmp180_t* bmp180, uint8_t oss
return 0;
}
os_delay_us(delay);
I2C_DELAY_US(delay);
return read24(bmp180, BMP180_REG_MSB) >> (8 - oss);


+ 2
- 2
ws2801.c View File

@ -73,7 +73,7 @@ static uint32_t ICACHE_FLASH_ATTR gpio_func(uint8_t gpio)
static void ICACHE_FLASH_ATTR write_clock(int pin)
{
GPIO_OUTPUT_SET(pin, 1);
os_delay_us(10);
I2C_DELAY_US(10);
GPIO_OUTPUT_SET(pin, 0);
}
@ -162,7 +162,7 @@ bool ICACHE_FLASH_ATTR ws2801_init(ws2801_data_t* ws2801)
ETS_GPIO_INTR_ENABLE();
os_delay_us(1000);
I2C_DELAY_US(1000);
return true;
}

Loading…
Cancel
Save