Basics of Device Driver Development in C Language

Basics of Device Driver Development in C Language

Basics of Device Driver Development in C Language A device driver is a bridge between the operating system and hardware, responsible for managing and controlling hardware devices. This article will introduce how to develop simple device drivers using the C language, suitable for beginners. 1. What is a Device Driver? A device driver is a … Read more

Illustrating the Relationship Between Embedded Linux Applications, Kernel, Drivers, and Hardware

Illustrating the Relationship Between Embedded Linux Applications, Kernel, Drivers, and Hardware

Currently, Linux software engineers can be roughly divided into two levels: 01 Linux Application Software Engineer: Mainly writes application software using C library functions and Linux APIs; Those engaged in this type of development work mainly need to learn: API functions and system calls that comply with the Linux POSIX standard, Linux multitasking programming techniques: … Read more

Miscellaneous Devices in Linux Drivers

Miscellaneous Devices in Linux Drivers

1. The Three Major Types of Linux Device Drivers 1. Character Devices: The IO transfer process is done in characters without buffering, such as I2C and SPI, which are character devices. 2. Block Devices: The IO transfer process is done in blocks, related to storage, such as TF cards. 3. Network Devices: Unlike the previous … Read more

Linux Power Management (14): Power Management from the Perspective of Device Drivers

Linux Power Management (14): Power Management from the Perspective of Device Drivers

Original:Wowotech Technology http://www.wowotech.net/pm_subsystem/pm_architecture.html 1. Introduction It is well known among Linux driver engineers who have been working for a while: In the past, implementing power management functions for a device was a straightforward task. Most devices were abstracted as platform devices, and the driver only needed to provide callback functions for suspend/resume/shutdown and register them … Read more

Dynamic Debugging in the Linux Kernel: A Powerful Tool for Runtime Debugging

Dynamic Debugging in the Linux Kernel: A Powerful Tool for Runtime Debugging

Introduction Previously, we discussed Linux Kernel Debugging: The Powerful printk (Part 2) Linux Kernel Debugging: The Powerful printk (Part 3) In those articles, we introduced pr_debug and dev_dbg. Below is the definition of dev_dbg: #if defined(CONFIG_DYNAMIC_DEBUG) || \ (defined(CONFIG_DYNAMIC_DEBUG_CORE) && defined(DYNAMIC_DEBUG_MODULE)) #define dev_dbg(dev, fmt, …) \ dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) #elif defined(DEBUG) #define dev_dbg(dev, fmt, …) … Read more

Detailed Explanation of LCD Driver in Embedded Linux Kernel

Detailed Explanation of LCD Driver in Embedded Linux Kernel

1 Application Layer Calls to LCD Driver Methods Open the corresponding device node app: open(“/dev/fb0”, …) Major device number: 29, Minor device number: 0 ————————————————————– kernel: fb_open // fbmem.c struct fb_info *info; info = get_fb_info(fbidx); if (info->fbops->fb_open) { res = info->fbops->fb_open(info,1); // Hardware-related driver if (res) module_put(info->fbops->owner); } Obtain variable information (including resolution, etc.) app: … Read more

Porting Real-Time Device Drivers to Linux Embedded Systems (Part 1)

Porting Real-Time Device Drivers to Linux Embedded Systems (Part 1)

Linux has stormed the embedded systems market. According to industrial analysts, approximately one-third to one-half of new 32-bit and 64-bit embedded system designs utilize Linux. Embedded Linux has demonstrated advantages in many application areas, such as SOHO home networks and imaging/multifunction peripherals, and has significant potential for leapfrog development in areas like (NAS/SAN) storage, home … Read more

Introduction to Linux

Introduction to Linux

The GNU Manifesto https://dpya.org/en/images/8/81/The_GNU_Manifesto_-_GNU_Project_-_Free_Software_Foundation.pdf https://www.gnu.org/gnu/manifesto.en.html Linux VS Windows Comparison Windows Linux Interface The interface is unified, and the shell program fixes all Windows program menus to be almost identical, with similar shortcut keys. The graphical interface style varies by distribution and may be incompatible. The terminal of GNU/Linux is inherited from UNIX, and the basic … Read more

Designing I2C Device Drivers for VxWorks 7

Designing I2C Device Drivers for VxWorks 7

1. Introduction The Inter-Integrated Circuit (I²C) is a widely used low-speed, two-wire communication protocol designed for communication between integrated circuits. In embedded systems, I²C is commonly used to connect sensors, EEPROMs, ADCs, and other peripherals. [VxWorks 7] introduces a modern, scalable, and modular driver framework built on VxBus, supporting dynamic driver registration, device tree integration, … Read more

Monitoring and Tuning the Linux Networking Stack: Receiving Data (1) – Network Device Initialization

Monitoring and Tuning the Linux Networking Stack: Receiving Data (1) - Network Device Initialization

Monitoring and Tuning the Linux Networking Stack: Receiving Data In Brief This blog post explains how computers running the Linux kernel receive packets and how to monitor and tune various components of the networking stack as packets flow from the network to user-space programs. Update: We have published a corresponding article: “Monitoring and Tuning the … Read more