Output to the serial interface that initialisation is finished

This commit is contained in:
Paul van Tilburg 2019-03-15 22:18:18 +01:00
parent ad809e2bc4
commit bdd1e869c7
1 changed files with 4 additions and 1 deletions

View File

@ -62,11 +62,14 @@ const APP: () = {
let clocks = rcc.cfgr.freeze();
let mut serial = Serial::usart2(device.USART2, (tx, rx), config, clocks).unwrap();
serial.listen(serial::Event::Rxne);
let (serial_tx, serial_rx) = serial.split();
let (mut serial_tx, serial_rx) = serial.split();
// Set up the serial interface command buffer.
let buffer = Vec::new();
// Output to the serial interface that initialisation is finished.
writeln!(serial_tx, "init\r").unwrap();
init::LateResources {
button,
buffer,