diff --git a/Boards/CYD-8048S043C/Source/CYD8048S043C.cpp b/Boards/CYD-8048S043C/Source/CYD8048S043C.cpp index 2417c7f2..ba5e49c7 100644 --- a/Boards/CYD-8048S043C/Source/CYD8048S043C.cpp +++ b/Boards/CYD-8048S043C/Source/CYD8048S043C.cpp @@ -37,14 +37,14 @@ const Configuration cyd_8048s043c_config = { i2c::Configuration { .name = "External", .port = I2C_NUM_1, - .initMode = i2c::InitMode::ByTactility, + .initMode = i2c::InitMode::Disabled, .isMutable = true, .config = (i2c_config_t) { .mode = I2C_MODE_MASTER, .sda_io_num = GPIO_NUM_17, .scl_io_num = GPIO_NUM_18, - .sda_pullup_en = true, - .scl_pullup_en = true, + .sda_pullup_en = false, + .scl_pullup_en = false, .master = { .clk_speed = 400000 }, @@ -77,5 +77,31 @@ const Configuration cyd_8048s043c_config = { .isMutable = false, .lock = nullptr } + }, + .uart { + //P4 header, JST SH 1.0, GND / 3.3V / IO17 / IO18 + uart::Configuration { + .name = "UART1", + .port = UART_NUM_1, + .rxPin = GPIO_NUM_17, + .txPin = GPIO_NUM_18, + .rtsPin = GPIO_NUM_NC, + .ctsPin = GPIO_NUM_NC, + .rxBufferSize = 1024, + .txBufferSize = 1024, + .config = { + .baud_rate = 9600, + .data_bits = UART_DATA_8_BITS, + .parity = UART_PARITY_DISABLE, + .stop_bits = UART_STOP_BITS_1, + .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, + .rx_flow_ctrl_thresh = 0, + .source_clk = UART_SCLK_DEFAULT, + .flags = { + .allow_pd = 0, + .backup_before_sleep = 0, + } + } + } } }; diff --git a/Boards/CYD-JC2432W328C/Source/JC2432W328C.cpp b/Boards/CYD-JC2432W328C/Source/JC2432W328C.cpp index e00c599c..6237185a 100644 --- a/Boards/CYD-JC2432W328C/Source/JC2432W328C.cpp +++ b/Boards/CYD-JC2432W328C/Source/JC2432W328C.cpp @@ -54,7 +54,7 @@ const Configuration cyd_jc2432w328c_config = { i2c::Configuration { .name = "External", .port = I2C_NUM_1, - .initMode = i2c::InitMode::ByTactility, + .initMode = i2c::InitMode::Disabled, .isMutable = true, .config = (i2c_config_t) { .mode = I2C_MODE_MASTER, @@ -117,6 +117,32 @@ const Configuration cyd_jc2432w328c_config = { .initMode = spi::InitMode::ByTactility, .isMutable = false, .lock = nullptr - }, + } + }, + .uart { + //CN1 header, JST SH 1.25, GND / IO22 / IO21 / 3.3V + uart::Configuration { + .name = "UART1", + .port = UART_NUM_1, + .rxPin = GPIO_NUM_21, + .txPin = GPIO_NUM_22, + .rtsPin = GPIO_NUM_NC, + .ctsPin = GPIO_NUM_NC, + .rxBufferSize = 1024, + .txBufferSize = 1024, + .config = { + .baud_rate = 9600, + .data_bits = UART_DATA_8_BITS, + .parity = UART_PARITY_DISABLE, + .stop_bits = UART_STOP_BITS_1, + .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, + .rx_flow_ctrl_thresh = 0, + .source_clk = UART_SCLK_DEFAULT, + .flags = { + .allow_pd = 0, + .backup_before_sleep = 0, + } + } + } } }; diff --git a/Boards/CYD-JC8048W550C/Source/JC8048W550C.cpp b/Boards/CYD-JC8048W550C/Source/JC8048W550C.cpp index c2f019ae..1f69379a 100644 --- a/Boards/CYD-JC8048W550C/Source/JC8048W550C.cpp +++ b/Boards/CYD-JC8048W550C/Source/JC8048W550C.cpp @@ -38,7 +38,7 @@ const Configuration cyd_jc8048w550c_config = { i2c::Configuration { .name = "External", .port = I2C_NUM_1, - .initMode = i2c::InitMode::ByTactility, + .initMode = i2c::InitMode::Disabled, .isMutable = true, .config = (i2c_config_t) { .mode = I2C_MODE_MASTER, @@ -78,5 +78,31 @@ const Configuration cyd_jc8048w550c_config = { .isMutable = false, .lock = nullptr } + }, + .uart { + //P4 header, JST SH 1.0, GND / 3.3V / IO17 / IO18 + uart::Configuration { + .name = "UART1", + .port = UART_NUM_1, + .rxPin = GPIO_NUM_17, + .txPin = GPIO_NUM_18, + .rtsPin = GPIO_NUM_NC, + .ctsPin = GPIO_NUM_NC, + .rxBufferSize = 1024, + .txBufferSize = 1024, + .config = { + .baud_rate = 9600, + .data_bits = UART_DATA_8_BITS, + .parity = UART_PARITY_DISABLE, + .stop_bits = UART_STOP_BITS_1, + .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, + .rx_flow_ctrl_thresh = 0, + .source_clk = UART_SCLK_DEFAULT, + .flags = { + .allow_pd = 0, + .backup_before_sleep = 0, + } + } + } } };