@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user