const cpu = @import("cpu.zig"); const gpio = @import("gpio.zig"); const rcc: *[39]u32 = @ptrFromInt(0x40021000); const gpioa = gpio.gpioa; const gpioc = gpio.gpioc; export fn _start() callconv(.C) noreturn { cpu.interrupt_disable(); rcc[19] |= 5; // gpio a and c gpioa.set_mode(5, .output); gpioc.set_mode(13, .input); while (true) { const state = gpioc.read(13); gpioa.write(5, state); } } export fn fault_handler() callconv(.C) void { while (true) {} }