File tree Expand file tree Collapse file tree
boards/nucleo_u545re_q/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33// Copyright Tock Contributors 2024.
44// Copyright OxidOS Automotive 2026.
55
6- use core:: fmt:: Write ;
76use core:: panic:: PanicInfo ;
8-
97use 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]
Original file line number Diff line number Diff 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 ) ) ;
You can’t perform that action at this time.
0 commit comments