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 chapter implements a complete buzzer driver (which can be turned on and off) when the driver is implemented differently than the LED PWM drive will consist of multiple files. This is also the standard implementation of most inux drivers, which means that a complex driver is unlikely to put all the code in a file. It is a good idea to put the relevant code in the appropriate file. These files are co-compiled when the Linux driver is compiled. How to divide the Linux drive into multiple files. The data structure, function code in these files can also be used by several different drivers, which is also an important method of code reuse. When developing a Linux driver, it is possible to have errors in the Init and exit functions, when the Linux driver may fail to install and, worse still, the Linux driver cannot be uninstalled properly using the Rmmod command, which will cause the problem of not being able to install again. Of course, in this case, restarting the machine can To solve it. But it's too much trouble to restart the machine every time. Therefore, removing the Linux driver by directly modifying the Linux driver's corresponding memory address when encountering the inability to uninstall Linux drivers avoids the hassle of restarting the machine. Through the study of this chapter, I can master the common code reuse mode of Linux drive. Also learned how to forcibly uninstall Linux drivers. Through this method. Can save us from the pain of constantly restarting the machine.
Eighth: Make the Development Board sound: Buzzer driver