Skip to content
systemcoding.dev

Tag

c

362 posts

Flat illustration of user space above the system call boundary, the kernel and the hardware, with the Linux, C and Rust logos.
Kernels

Write an Input Driver for Buttons and Keys

Write a Linux 6.12 input driver for a GPIO button: devm_input_allocate_device, capability bits, a threaded IRQ, debounce, and events visible to evtest.

7 min read
Flat illustration of a microcontroller wired to an LED and a sensor, with the STMicroelectronics, Arm and C logos.
Embedded

Copy Memory to Memory With STM32 DMA

Copy and fill memory blocks with the STM32F4 DMA2 controller using HAL_DMA_Start_IT or polling, with the FIFO setting it requires and the common mistakes.

8 min read
Flat illustration of a CPU core with its cache levels and main memory, with the Arm, C and Intel logos.
Embedded

What DMA Does and Why It Frees the CPU

Understand what a DMA controller does, how it moves data as a bus master, and why one interrupt per buffer instead of per byte frees the CPU.

7 min read