Buzzer Driver
The buzzer is a hardware device on the s3c6410 Development Board. You can control the buzzer by writing a specific value to the register. This section will introduce the buzzer to achieve the original plow, and achieve a complete buzzer drive (can be turned on and off buzzer). PWM drives are implemented differently than led drivers, and the PWM driver consists of multiple files. This is also the standard implementation of most I-N u-X drives. That is to say--a complex driver is unlikely to put all the code in the ... Files in a single file. It is a good idea to put the relevant code in the appropriate file. These files are co-compiled when you compile the L-N U-x driver. This section describes how to divide the li n u x drive into multiple files. The data structure, function code in these files can also be used by several different drivers, so this is also an important method of code reuse.
Buzzer PWM driver, buzzer is also called PWM pulse width modulation, the basic principle is to control the buzzer by pulse to open and stop. For convenience, the book will be a bee, collectively referred to as PWM.
The PWM driver is similar to the implementation process of the ED driver and may be simpler. In this chapter, we just described how to separate the Linux driver implementation files, using a simpler PWM driver. Through the study of this chapter, we can master the common code reuse mode of Linux driver.
Android Driver Development Eighth chapter