Embedded Systems Panorama 4: Understanding Driver Models and Device Trees

Embedded Systems Panorama 4: Understanding Driver Models and Device Trees

In embedded Linux systems, drivers serve as the bridge between the kernel and hardware, while the Device Tree (DT) provides an abstraction for hardware information. Understanding the Linux driver model and device trees is crucial for embedded engineers to build a complete system from low-level hardware to user space. This article will gradually analyze the … Read more

Linux Kernel Modules

Linux Kernel Modules In the design of the Linux system kernel, kernel modules are an important mechanism for extending kernel functionality. They allow for the dynamic loading and unloading of code without the need to recompile the entire kernel. This not only enhances the system’s flexibility and maintainability but also provides developers with an efficient … Read more

Linux Driver Development: How to Pass Parameters to Kernel Modules

Communicating with Linux Device Drivers The first driver we write is like a silent employee, only working according to a fixed process. However, in reality, we often need to tell this employee specific information, such as: “Use the red LED today” or “Set the motor speed to 1000 RPM”. This article teaches you how to … Read more

Why Do Embedded Software Developers Prefer to Encapsulate Source Code into Libraries?

Why Do Embedded Software Developers Prefer to Encapsulate Source Code into Libraries?

I am Lao Wen, an embedded engineer who loves learning.Follow me to become even better together! 1. Benefits of Encapsulating into Libraries If a device program is perfectly encapsulated into a library, it means: 1. The cost for all engineers to port or create the device driver is minimal. 2. As the number of users … Read more

Essential Kernel Course for BSP Engineers: 3.2. Character Device Driver Framework and Complete Driver Process Demonstration Using register_chrdev Interface

Essential Kernel Course for BSP Engineers: 3.2. Character Device Driver Framework and Complete Driver Process Demonstration Using register_chrdev Interface

Adhering to high-quality original content, rejecting content piling, if you like it, click the star above to follow, and you will receive updates immediately, thank you for your attention! Many students may find it confusing when they first encounter character device drivers, as they see different interfaces for character device drivers, some using <span>register_chrdev</span>, others … Read more

Understanding Linux Black Hole and Zero Bytes: A Comprehensive Guide to /dev/null and /dev/zero

Understanding Linux Black Hole and Zero Bytes: A Comprehensive Guide to /dev/null and /dev/zero

If you often browse the default files in Linux, you must have an impression of /dev/null and /dev/zero, or you might have seen shell code like this:> /dev/null 2>&1. It is a special character device file in the Linux system, commonly referred to as the “null device” or “black hole device.” It occupies a fixed … Read more

i2cdevlib: A Library Collection for Various I2C Devices

i2cdevlib: A Library Collection for Various I2C Devices

To be honest, dealing with peripherals in embedded systems can be quite challenging, especially with the various I2C chips each having their own set of registers and read/write protocols. Just when you have the MPU6050 sample working, you can easily get confused by the bit fields of another sensor. i2cdevlib acts like a “middleman”—abstracting the … Read more

Embedded C Language – Object-Oriented Programming

Embedded C Language - Object-Oriented Programming

Object-Oriented Programming vs. Procedural Programming Procedural Programming (POP): Focuses on functions, achieving program functionality through function calls. Data and functions are separate. For example, C is a typical procedural language. When developing a student grade management system, data structures are defined to store student information, followed by writing functions to implement adding, deleting, modifying, and … Read more

Basic Knowledge and Experience of Network Maintenance

Basic Knowledge and Experience of Network Maintenance

Troubleshooting in Network Operations During network operations or system installations, there can be various reasons why a network cannot connect. Apart from some settings or software prohibiting the network from being connected, most issues are caused by the following reasons: 1. The network card is not installed correctly or the card itself has issues. Generally, … Read more