Increased I2C timeout from 1000 to 5000 mSec.

Sun, 24 Nov 2019 11:34:36 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 24 Nov 2019 11:34:36 +0100
changeset 39
c3fcc599a119
parent 38
46e2c385e9de
child 40
4d8cca2d5b68

Increased I2C timeout from 1000 to 5000 mSec.

CMakeLists.txt file | annotate | diff | comparison | revisions
main/u8g2_esp32_hal.c file | annotate | diff | comparison | revisions
sdkconfig file | annotate | diff | comparison | revisions
--- a/CMakeLists.txt	Sat Nov 23 22:31:49 2019 +0100
+++ b/CMakeLists.txt	Sun Nov 24 11:34:36 2019 +0100
@@ -2,7 +2,7 @@
 # in this exact order for cmake to work correctly
 cmake_minimum_required(VERSION 3.5)
 
-set(PROJECT_VER "0.1.0")
+set(PROJECT_VER "0.2.0")
 set(PROJECT_NAME "co2meter")
 
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
--- a/main/u8g2_esp32_hal.c	Sat Nov 23 22:31:49 2019 +0100
+++ b/main/u8g2_esp32_hal.c	Sun Nov 24 11:34:36 2019 +0100
@@ -10,7 +10,7 @@
 #include "u8g2_esp32_hal.h"
 
 static const char *TAG = "u8g2_hal";
-static const unsigned int I2C_TIMEOUT_MS = 1000;
+static const unsigned int I2C_TIMEOUT_MS = 5000;
 
 static spi_device_handle_t handle_spi;      // SPI handle.
 static i2c_cmd_handle_t    handle_i2c;      // I2C handle.
--- a/sdkconfig	Sat Nov 23 22:31:49 2019 +0100
+++ b/sdkconfig	Sun Nov 24 11:34:36 2019 +0100
@@ -83,7 +83,7 @@
 CONFIG_I2C_MASTER_SCL=22
 CONFIG_I2C_MASTER_SDA=21
 CONFIG_I2C_MASTER_PORT_NUM=0
-CONFIG_I2C_MASTER_FREQUENCY=400000
+CONFIG_I2C_MASTER_FREQUENCY=200000
 CONFIG_ROT_ENC_A_GPIO=26
 CONFIG_ROT_ENC_B_GPIO=27
 CONFIG_ROT_ENC_SW_GPIO=14

mercurial