X86 Kernel Notes_2_Driver Development

X86 Kernel Notes_2_Driver Development

This article is a highlight from the Kanxue ForumAuthor from Kanxue ForumID: SSH Landscape Painting 1 Creating a Driver Project Creating the Project Reference article for WDK and VS installation: X86 Kernel Notes 0 Configuring Dual Machine Debugging Environment Open VS2017, create a new project, select Visual C++ -> Windows Drivers -> Legacy -> Empty … Read more

Windows PCI Device Driver Development Guide: How to Bind Context to WDF Objects

Windows PCI Device Driver Development Guide: How to Bind Context to WDF Objects

When writing WDF drivers, we often need to bind some driver-defined data structures to WDF objects (such as device objects, queue objects, request objects). These data structures provide the driver with the capability to store and manage state information specific to the object, which we commonly refer to as context. These contexts are essentially data … Read more

In-Depth Explanation of LCD Driver at the Kernel Level in Embedded Linux Systems

In-Depth Explanation of LCD Driver at the Kernel Level in Embedded Linux Systems

1. The LCD from the Perspective of Application Engineers An LCD is composed of individual pixels: each row has xres pixels and there are yres rows, resulting in a resolution of: xres * yres. 2. How Colors are Represented in Pixels Colors can be represented using red, green, and blue. This can be done using … Read more

Windows PCI Device Driver Development Guide: PnP Callback

Windows PCI Device Driver Development Guide: PnP Callback

In the previous article, we introduced the driver code generated by the VS KMDF template, providing a preliminary understanding of the driver code. It should be evident that this driver is quite simple, essentially lacking any real functionality. After installing the driver we wrote, this PCIe device remains in the D0 state (if you are … Read more

Essential Knowledge for Embedded Projects – Basics of Operating Systems

Essential Knowledge for Embedded Projects - Basics of Operating Systems

RTOS (Real-Time Operating System) Real-Time Characteristics: The ability to respond to external events and execute tasks within a specified time frame, such as in industrial control, ensuring precise timing for sensor signal acquisition and actuator control operations, thereby maintaining the stable and efficient operation of automated production lines. Task Scheduling Mechanism: Understanding preemptive scheduling (where … Read more

Driver for MPU6050 on RK3588S

Driver for MPU6050 on RK3588S

1. Main Registers of MPU6050 1.1 Initialization Registers and Their Settings 1.2 Data Registers 2. Hardware Connections 3. Device Tree Configuration 4. Writing Driver Code 4.1 i2c_mpu6050.h 4.2 mpu6050.c 5. Timing Observations of Initialization Functions in Probe 5.1 Overall Timing 5.2 CLK 5.3 Host Writing One Byte to Slave 5.4 Host Reading One Byte from … Read more

Private Data Hiding in Embedded C Language

Private Data Hiding in Embedded C Language

Content In Linux driver development, have you encountered the problem of how to store private data for different device instances? For example, a USB camera needs to store resolution parameters, while a GPIO device needs to record interrupt handler functions. Directly modifying the kernel’s <span>struct device</span> structure? This would obviously break the encapsulation of the … Read more

How to Write Your Own .NET IoT Device Driver from Scratch

How to Write Your Own .NET IoT Device Driver from Scratch

This article will detail how to write a .NET IoT device driver from scratch using the NV3030B LCD device driver as an example. We will use the Raspberry Pi as the hardware platform and refer to the official .NET IoT Ili934x TFT LCD driver library. 1. Background In the previous article “Getting Started with .NET … Read more

Analyzing the Elegant C Language Functions dev_get_drvdata and dev_set_drvdata in the Linux Kernel

Analyzing the Elegant C Language Functions dev_get_drvdata and dev_set_drvdata in the Linux Kernel

Hello everyone, I am the Intelligence Guy~ In Linux driver development, have you ever encountered the problem of how to save private data for different device instances? For example, a USB camera needs to store resolution parameters, and a GPIO device needs to record interrupt handler functions. Directly modifying the <span>struct device</span> structure? This would … Read more

HarmonyOS Device Driver Development: Design and Implementation of the Hardware Adaptation Layer

HarmonyOS Device Driver Development: Design and Implementation of the Hardware Adaptation Layer

Hello, today let’s talk about something hardcore! The development of device drivers for HarmonyOS—this seemingly profound but actually quite interesting topic. Don’t be intimidated by the jargon; follow me step by step, and I guarantee you’ll have a clear understanding of the Hardware Adaptation Layer. I’ve been tinkering with Harmony drivers for over two years, … Read more