调整 con 波特率为460800

Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
2023-02-13 09:31:53 +08:00
parent a8e6be3cfe
commit e75971d084
3 changed files with 17 additions and 2 deletions

View File

@@ -407,6 +407,10 @@ static int _iap_entry(rt_bool_t is_boot)
ports[i] = rt_device_find(name);
RT_ASSERT(ports[i]);
struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT;
config.baud_rate = BAUD_RATE_460800;
rt_device_control(ports[i], RT_DEVICE_CTRL_CONFIG, &config);
rt_device_set_rx_indicate(ports[i], port_rx_ind);
rt_device_open(ports[i], RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX);
}
@@ -418,6 +422,11 @@ static int _iap_entry(rt_bool_t is_boot)
odev_rx_ind = ports[0]->rx_indicate;
rt_device_set_rx_indicate(ports[0], port_rx_ind);
struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT;
config.baud_rate = BAUD_RATE_460800;
rt_device_control(ports[0], RT_DEVICE_CTRL_CONFIG, &config);
rt_device_open(ports[0], RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX);
}