@@ -2,36 +2,17 @@ const std = @import("std");
22const microzig = @import ("microzig" );
33const board = microzig .board ;
44const nrf = microzig .hal ;
5- const time = nrf .time ;
65
76const semihosting = microzig .core .experimental .ARM_semihosting ;
8- var TimeNow : isize = 0 ;
9-
10- // DELETEME>>
11- const uart = nrf .uart .num (0 );
12-
13- pub const microzig_options = microzig.Options {
14- .log_level = .debug ,
15- .logFn = nrf .uart .log ,
16- };
17- // DELETEME<<
187
198pub fn main () void {
209 board .init ();
21- // DELETEME>>
22- uart .apply (.{
23- .tx_pin = board .uart_tx ,
24- .rx_pin = board .uart_rx ,
25- });
26-
27- nrf .uart .init_logger (uart );
28- // DELETEME<<
2910 const path = "" ;
3011 const file_name = path ++ "foo.txt" ;
3112 const new_name = path ++ "bar.txt" ;
3213 var some_buf : [80 ]u8 = undefined ;
3314
34- //debug features
15+ // Debug features
3516 semihosting .Debug .print ("Hello World\n " , .{});
3617
3718 const args = semihosting .Debug .get_cmd_args (& some_buf ) catch return ;
@@ -45,11 +26,11 @@ pub fn main() void {
4526 const stdout = semihosting .Debug .stdout () catch return ;
4627 stdout .print ("hello STDOUT!!!!\n " , .{});
4728
48- //time features
29+ // Time features
4930 const clock = semihosting .Time .absolute ();
5031 const host_time = semihosting .Time .system_time ();
5132
52- //fs features
33+ // fs features
5334 const file = semihosting .fs .open (file_name , .@"W+" ) catch {
5435 semihosting .Debug .print ("fail to open {s}!" , .{file_name });
5536 return ;
0 commit comments