Introduction to Embedded C Language Design
Transition from Standard C to Embedded C Programming
Characteristics of C Language
As a fundamental high-level programming language, C has evolved into various extensions. In embedded systems design, the primary enhancement involves hardware device drivers. This extension offers a more adaptable environment for application development. My un ...
Posted on Thu, 18 Jun 2026 16:32:45 +0000 by danger2oo6
Using Semaphores to Enforce Exclusive Access to an LED Device in Linux Kernel Driver
This example demonstrates how to implement a GPIO-controlled LED driver that ensures only one user process can access the LED at a time using a counting semaphore initialized to 1 (binary semaphore). The semaphore is acquired in the open() handler and released in the release() handler, effectively serializign access across multiple processes.
D ...
Posted on Tue, 16 Jun 2026 17:08:44 +0000 by Distant_storm
Rockchip RK3308 GPIO Controller Implementation
1, Overview
1.1, General Description
The General Purpose Input/Output (GPIO) peripheral represents a programmable I/O interface that operates as an APB slave device. It controls external I/O signal outputs and their direction configuration. Additionally, it enables reading external signals through memory-mapped registers. Key features include:
...
Posted on Sun, 14 Jun 2026 16:22:03 +0000 by Charles256
Implementing External Interrupts (EXTI) on STM32 with Standard Peripheral Library
External interrupts allow a microcontroller to respond immediately too external events by pausing its current program execution, handling the interrupt request, and then resuming normal operation. The STM32 EXTI controller manages up to 20 interrupt/event lines, with GPIO pins 0-15 connected to EXTI lines 0-15. Additional lines serve specific p ...
Posted on Thu, 11 Jun 2026 17:08:35 +0000 by developerdave
STM32 USART Communication with Button-Triggered Data Transmission
USART Serial Communication Fundamentals
Communication Concepts
Communication refers to the process of information exchange between computers and external devices. Communication protocols define the rules that both parties must follow during data transmission.
Common Communication Methods
Parallel Communication
All binary data bits are transmitt ...
Posted on Sat, 30 May 2026 00:02:15 +0000 by adityakonda
Implementing OpenHarmony HDF Platform Drivers for SoC Porting
Drivers in OpenHarmony are categorized into platform drivers and device drivers. Platform drivers handle on-SoC peripherals such as GPIO, I2C, and SPI controllers. Device drivers manage external components like LCD displays, touch panels, and WLAN modules connected to the SoC.The HDF (Hardware Driver Foundation) framework enables cross-operatin ...
Posted on Mon, 18 May 2026 23:35:21 +0000 by alwaysinit
Button Scan Routine with Release Detection for MCU Sleep Control
This button scanning routine is designed to manage a power-saving feature: a long press of the button triggers a shutdown of all MCU peripherals (simulated by turning off an LED), but the actual sleep mode is only entered after the button is released. This prevents accidental wake-ups by ensuring the user intentional completes the press-and-rel ...
Posted on Fri, 15 May 2026 11:36:59 +0000 by stylefrog
Reading DHT11 Temperature and Humidity Sensor Data with C# in .NET 5
Development environment: VS2019 + .NET 5 Console Application.
To access Raspberry Pi GPIO data with C#, install the System.Device.Gpio package from NuGet. The DHT11 temperature and humidity sensor connects to the Raspberry Pi via GPIO pins, and its data protocol can be obtained with the sensor documentation. In .NET 5, DHT11 sensor data is ret ...
Posted on Thu, 14 May 2026 10:51:56 +0000 by cobaltblue
Understanding GPIO, LED, and Buzzer Control in Microcontrollers
GPIO (General Purpose Input/Output)
GPIO pins are versatile pins on microcontrollers that can be configured as either inputs or outputs to interface with various electronic components.
GPIO Configuration Modes
Floating Input: The pin is left unconnected, which can lead to unpredictable states due to noise. Not recommended for practical applica ...
Posted on Sun, 10 May 2026 16:15:03 +0000 by spivey
Raspberry Pi 4B Button-Controlled LED Operation
Button Operation Principal
A push button functions by connecting or disconnecting a circuit. When pressed, the circuit closes; when released, it opens. To read this state via a Genarel Purpose Input/Output (GPIO) pin, the pin must not be left floating, as ambient electrical noise could cause erratic readings. To prevent this, a pull-up or pull- ...
Posted on Sun, 10 May 2026 16:06:37 +0000 by bladechob