Learning the eighth chapter, which is the buzzer-driven knowledge, is designed to master the common use of code reuse by Linux drivers. Linux code reuse, forcibly uninstall Linux drivers, buzzer (PWM) drivers. Compilation is a Linux driver composed of multiple files, code reuse is divided into static and dynamic, static reuse is code-level reuse, that is, the code that needs to be reused and the users who use the code together to compile, and ultimately generate an executable file or library. Linux driver module dependencies (export symbols), another way of code sharing: module dependencies, also known as export symbols. Use the exported symbols (constants, variables, functions, etc.) in one drive module for another. Forcibly uninstalling the Linux driver, that is, when the Linux driver cannot be uninstalled through the Human rmmod command, the Linux driver can still be uninstalled without booting the machine. If the initialization function crashes and the Unload function is blocked because of a problem with the Unload function, simply replace the Unload function with an empty unload function. Buzzer driver, buzzer is also called PWM pulse width modulation, the basic principle is to control the buzzer by pulse to open and stop. A buzzer is a hardware device on a development Board that can control the sound emitted by a buzzer by writing a specific value to the register. PWM drives are implemented differently than led drivers, and PWM drivers are made up of multiple files, which is the standard implementation of most Linux drivers.
Android Deep Explore Eighth chapter summary