Tagged articles
14 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Jan 27, 2026 · Fundamentals

Master STM32 GPIO: All 8 Modes Explained with Code Samples

This tutorial walks through STM32's eight GPIO operating modes—four inputs and four outputs—detailing their electrical behavior, typical use cases, configuration steps, and providing complete HAL code examples to help embedded developers choose the right mode for reliable designs.

GPIOHALHardware
0 likes · 16 min read
Master STM32 GPIO: All 8 Modes Explained with Code Samples
Liangxu Linux
Liangxu Linux
Nov 12, 2025 · Fundamentals

Mastering Button Management in Embedded C with lwbtn: A Deep Dive

This article introduces the lightweight lwbtn library for embedded C, explains its core features, shows how to integrate it on STM32 with a complete demo, and provides an in‑depth analysis of its architecture, state‑machine processing, click detection algorithm, configuration options, and practical usage tips.

GPIOSTM32button
0 likes · 13 min read
Mastering Button Management in Embedded C with lwbtn: A Deep Dive
Liangxu Linux
Liangxu Linux
Jul 31, 2025 · Backend Development

How to Build and Test a Simulated GPIO Character Driver on Linux

This tutorial walks through creating a Linux kernel character driver that simulates four GPIO devices, compiles the module, loads it to automatically generate /dev/mygpio0‑3 nodes, and provides a user‑space program to control the GPIO states via ioctl, including full build and cleanup steps.

GPIOMakefilec++
0 likes · 12 min read
How to Build and Test a Simulated GPIO Character Driver on Linux
Liangxu Linux
Liangxu Linux
Feb 16, 2025 · Fundamentals

Unlock Hidden MCU Tricks: Advanced Techniques Every Embedded Engineer Should Know

This article showcases a collection of sophisticated MCU practices—from UART idle‑line interrupts and timer‑based frequency measurement to RTOS scheduling, DVFS power management, flash wear‑leveling, hardware AES, Kalman filtering, bus arbitration, and a GPIO‑driven camera interface—demonstrating how microcontrollers can achieve high‑performance, low‑power, and secure solutions.

Camera InterfaceGPIOHardware Encryption
0 likes · 10 min read
Unlock Hidden MCU Tricks: Advanced Techniques Every Embedded Engineer Should Know
Linux Kernel Journey
Linux Kernel Journey
Nov 25, 2024 · Fundamentals

Simulating MDIO Communication with GPIO on Linux

This guide explains why and how to implement MDIO over GPIO on a Linux system, covering MDIO fundamentals, Clause22/Clause45 frame structures, YT8521 PHY pinout, required kernel drivers, device‑tree configuration, log verification, and command‑line usage.

Device TreeEmbedded LinuxEthernet PHY
0 likes · 8 min read
Simulating MDIO Communication with GPIO on Linux
Liangxu Linux
Liangxu Linux
Apr 9, 2024 · Fundamentals

How Linux Detects Headphone Plug/Unplug Events via the ASoC Jack Driver

This article explains the Linux kernel's built‑in headphone jack detection mechanism, detailing the asoc_simple_init_jack function, device‑tree GPIO lookup, jack registration, event reporting flow, and highlights platform‑specific alternatives for Rockchip and MediaTek hardware.

ASoCGPIOJack Detection
0 likes · 10 min read
How Linux Detects Headphone Plug/Unplug Events via the ASoC Jack Driver
Liangxu Linux
Liangxu Linux
Dec 12, 2022 · Fundamentals

Master STM32 GPIO: Light Up an LED in Minutes

This guide walks you through the fundamentals of STM32 GPIO, covering pin naming, push‑pull vs open‑drain modes, wiring an LED, configuring PB8 with CubeMX, and using HAL functions to programmatically toggle the LED with concise code examples.

CubeMXGPIOHAL
0 likes · 8 min read
Master STM32 GPIO: Light Up an LED in Minutes
Liangxu Linux
Liangxu Linux
Jul 10, 2022 · Fundamentals

Lighting an LED on Linux with mmap: From Folklore to Kernel Memory Mapping

The article uses a cultural analogy about Emperor Yongzheng to introduce the concept of mapping, then explains how Linux's mmap can map a physical GPIO register into user space, provides a complete code example for toggling an LED, and discusses mmap's broader uses and performance trade‑offs.

GPIOLinuxembedded
0 likes · 10 min read
Lighting an LED on Linux with mmap: From Folklore to Kernel Memory Mapping
Liangxu Linux
Liangxu Linux
May 19, 2021 · Fundamentals

Understanding Linux NEC Infrared Remote Drivers: From Protocol Basics to Kernel Implementation

This article explains how infrared remote controls work, details the NEC protocol timing and encoding, and walks through the Linux kernel driver implementation—including GPIO‑IR receiver code, NEC decoder logic, device‑tree configuration, and key‑event reporting—providing a complete technical guide for developers.

Device TreeGPIOIR remote
0 likes · 17 min read
Understanding Linux NEC Infrared Remote Drivers: From Protocol Basics to Kernel Implementation