Skip to content

Commit 68fc4eb

Browse files
committed
Removed Writer and usart conf
1 parent 6e93286 commit 68fc4eb

2 files changed

Lines changed: 0 additions & 38 deletions

File tree

boards/nucleo_u545re_q/src/io.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,8 @@
33
// Copyright Tock Contributors 2024.
44
// Copyright OxidOS Automotive 2026.
55

6-
use core::fmt::Write;
76
use core::panic::PanicInfo;
8-
97
use kernel::debug;
10-
use kernel::utilities::io_write::IoWrite;
11-
12-
/// Writer is used by kernel::debug to print messages to the serial port.
13-
pub struct Writer {}
14-
15-
/// Global static for debug writer
16-
#[no_mangle]
17-
pub static mut WRITER: Writer = Writer {};
18-
19-
impl Write for Writer {
20-
fn write_str(&mut self, s: &str) -> core::fmt::Result {
21-
self.write(s.as_bytes());
22-
Ok(())
23-
}
24-
}
25-
26-
impl IoWrite for Writer {
27-
fn write(&mut self, buf: &[u8]) -> usize {
28-
let uart = stm32u545::usart::Usart::new(stm32u545::usart::USART1_BASE);
29-
30-
for &c in buf {
31-
uart.transmit_byte(c);
32-
}
33-
buf.len()
34-
}
35-
}
368

379
/// Panic handler.
3810
#[panic_handler]

boards/nucleo_u545re_q/src/main.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,16 +162,6 @@ unsafe fn start() -> (
162162
periphs.tim2.start();
163163
set_pin_primary_functions(periphs);
164164

165-
// Driver Config
166-
use kernel::hil::uart::Configure;
167-
let _ = periphs.usart1.configure(kernel::hil::uart::Parameters {
168-
baud_rate: 115200,
169-
stop_bits: kernel::hil::uart::StopBits::One,
170-
parity: kernel::hil::uart::Parity::None,
171-
hw_flow_control: false,
172-
width: kernel::hil::uart::Width::Eight,
173-
});
174-
175165
// Kernel and Muxes
176166
let processes = components::process_array::ProcessArrayComponent::new()
177167
.finalize(components::process_array_component_static!(NUM_PROCS));

0 commit comments

Comments
 (0)