News for hackers. Stuff that matters.
Re:Bare Metal STM32 Programming and a Quadcopters Awakening by dmitrygr on Tuesday March 05, 2019 @08:23PM (#19315732)

    *(uint32_t *)0x40021018 = 0x00000004;

Actually that line is not ok. But for another reason. Without "volatile" in there, the compiler may reorder this access with others, or remove it, or combine it with others. None of that is good.
Re:Bare Metal STM32 Programming and a Quadcopters Awakening by arcticbull on Tuesday March 05, 2019 @08:42PM (#19315798)
That's a very important call-out. This is the kind of tear-your-hair-out stuff that's going to be very difficult to track down unless you get it exactly right. I echo that using the definitions makes the code infinitely more readable and writeable, and makes zero difference in terms of performance.
Re:Bare Metal STM32 Programming and a Quadcopters Awakening by timakro on Wednesday March 06, 2019 @11:07AM (#19319928)
Thanks, I updated the post.