Tried to get STM32 led Blink to wrok on the Blackpill stm32g411

Hello,

I was able to get my STM32F411 Blackpill to work somewhat with the Blink LED example guide. The LED lights up, but it does not turn off when I call:

$0.raw.br1 = 1

I think the register files I’m using might have been generated incorrectly. Embedded development is not my area of expertise—I’m a native iOS developer—so I’m a bit lost with some of the low-level configurations.

For reference, I’ve uploaded my project to GitHub:

Any guidance from people experienced with Swift on STM32 microcontrollers, especially regarding register files and GPIO handling, would be greatly appreciated. I’d really like to get this working without having to dive deeply back into C/C++.

Thank you in advance!