Make the Development Board sound: Buzzer driver

Source: Internet
Author: User

In this section we mainly study 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. This section describes the principle of buzzer implementation and implements a complete buzzer driver that can be turned on and off. 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.

The buzzer is a hardware device on the S3C6410 Development Board that controls the buzzer screaming by writing a specific value to the register.

(1) If the CDT plugin is installed in eclipse.

(2) in Eclipse, click File-new-other, select the C project item, click Next to make the appropriate settings, such as project name Word_count, then finish to create an empty C project.

(3) Click New-soruce Folder in the Word_count Project right-click menu, open the New Soruce Folder dialog box, enter SRC in the folder name text box, and finish to create a directory to save the Linux driver source code files.

(4) Click the SRC directory, right click on the Import Open dialog box, select File system Next, select the word_count.c files, then click Advanced, select the Create links in workspace check box, Click Finish to establish the connection in the SRC directory in the word_count.c file.

(5) Set the Include path: Right-Word_count the properties under the project, select C + + general-paths and Symbols, select the GNU C on the right includes page, click Add to add a path and OK to close the dialog box. Open WORD_COUNT.C, Ctrl-click a Linux kernel function, and the definition of the Linux kernel function is tracked directly.

(6) Compiling Linux drivers: compiling and installing Linux drivers with build.sh scripts.

(7) Test Linux driver: import. c file; set include path; set target, Project right-click Make target-create, open Create make Target, enter project name in Target name OK Build project: Make targets-build; run the test program, and run the as-local/C + + application, and the results will be output to the console view.

Make the Development Board sound: Buzzer driver

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.