Merge remote-tracking branch 'origin/master' into httpd

This commit is contained in:
Sebastien
2020-02-27 09:41:38 -05:00
14 changed files with 301 additions and 65 deletions

View File

@@ -45,9 +45,11 @@ const i2c_config_t * config_i2c_get(int * i2c_port) {
.sda_pullup_en = GPIO_PULLUP_ENABLE,
.scl_io_num = -1,
.scl_pullup_en = GPIO_PULLUP_ENABLE,
.master.clk_speed = 400000,
.master.clk_speed = 0,
};
i2c.master.clk_speed = i2c_system_speed;
nvs_item = config_alloc_get(NVS_TYPE_STR, "i2c_config");
if (nvs_item) {
if ((p = strcasestr(nvs_item, "scl")) != NULL) i2c.scl_io_num = atoi(strchr(p, '=') + 1);

View File

@@ -24,6 +24,7 @@
#define SPI_SYSTEM_HOST SPI2_HOST
extern int i2c_system_port;
extern int i2c_system_speed;
extern int spi_system_host;
extern int spi_system_dc_gpio;
extern bool gpio36_39_used;

View File

@@ -23,6 +23,7 @@ extern void monitor_svc_init(void);
extern void led_svc_init(void);
int i2c_system_port = I2C_SYSTEM_PORT;
int i2c_system_speed = 400000;
int spi_system_host = SPI_SYSTEM_HOST;
int spi_system_dc_gpio = -1;