Reading notes (eight)

Source: Internet
Author: User

Make the Development Board sound: 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. The introduction of the buzzer to realize the original plow, and the realization of a complete buzzer drive, can open and close the buzzer when the drive is implemented differently than the LED PWM drive will be composed of multiple files. This is also the standard implementation of most Linux 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 closed code in the appropriate file. These files are co-compiled when the Linux driver is compiled. This section describes how to divide a 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.

LED Driver code reuse, compilation is composed of multiple files Linux driver, Linux driver module dependency (export symbols).

Forcibly uninstalling the Linux driver, if you write the Ljnux driver is logically correct, then can load and unload normally, but in some cases, some programs can be abnormal situation. This Linux driver may not uninstall properly. initialization function crashes; unload function is blocked

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.

http://home.cnblogs.com/u/lkm-6398/

Reading notes (eight)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.