How I program GPIOs in C | Embedded System Project Series #12

Описание к видео How I program GPIOs in C | Embedded System Project Series #12

I program the I/O-pins on my robot (and development board) according to the pin assignment in my schematic. Writing to registers is cumbersome, so to make things easier, I implement a code abstraction in C that lets me configure and initialize all pins in a single place.

The git repository:
https://github.com/artfulbytes/nsumo_...

0:00 Recap
0:44 Introduction
1:57 Why start here?
3:18 Setup
4:00 Pin Mapping
5:40 How are IO pins configured?
7:25 Memory-mapped registers
8:56 Blinky example
9:42 Defining the interface (io.h)
10:15 Select register
11:32 Direction register
11:59 Resistor register (pullup/pulldown)
13:22 Input register
13:57 First commit
14:39 How to implement?
15:39 Bitwise operation (code trick!)
17:29 Array indexing (code trick!)
18:52 Implementation (io.c)
19:53 Testing the code
22:38 Second commit
22:55 Initialize all pins
28:27 Third commit
28:44 Last words

#embeddedsystems #gpio #cprogramming

⌨️ My development environment
https://www.artfulbytes.com/devenv

🌍 Links
GitHub - https://github.com/artfulbytes
Website - https://www.artfulbytes.com

👨‍💻 About me
Hi and welcome. I'm Niklas, an embedded systems engineer from Sweden. On this channel, I make practical videos about embedded systems or, in general terms, about building and programming hardware.

Комментарии

Информация по комментариям в разработке