In my previous Rust video, I did some pretty hacky code to get my Raspberry Pi to Blink an LED. We used the Raspberry Pi Datasheet to come up with some hacky unsafe code that enabled a GPIO pin to be an output, and then blinked it on and off. We did this ALL BAREMETAL with no operating system underneath our code.
The code WORKED. But, it doesn't port well, and it's not very RUSTY. In this video, I'll take my previous embedded Rust code and make it more Rusty by creating parts to a Peripheral Access Crate. A Peripheral Access Crate or PAC is a component to a Hardware Abstraction Layer in Rust. Hardware Abstraction Layers abstract away the memory addresses and pointers to memory mapped IO to make programming embedded systems a little easier.
🏫 COURSES 🏫
C Programming 101 for Aspiring Embedded Developers: www.udemy.com/course/c-progra...
🔥 SOCIALS 🔥
Low Level Merch!: www.linktr.ee/lowlevellearning
Follow me on Twitter: / lowleveltweets
Follow me on Twitch: / lowlevellearning
Join me on Discord!: / discord
0:00 Intro
0:21 Code Review
0:41 Lets Code!
0:59 Making a Clean Interface
1:37 Datasheet 4 Life
2:30 Match Statements
3:46 Unsafe but LESS
4:21 Binary Math
6:35 PUT IT BACK
7:20 One Down Two to Go
7:47 NEXT!
9:29 DOUBLE KILL
10:13 Linker Hack
11:03 Outro
6 авг 2024