8th Chapter Buzzer

Source: Internet
Author: User

The Samsung Development Board comes with a buzzer, so we can control the buzzer by writing a specific value to the register. When developing a driver, an error may occur in functions such as Init, exit, and so on, which is the possibility that the driver will fail to install, and, worse, the inability to use the Rmmod driver, which can cause an inability to install again. There are many ways to reuse Linux-driven code. Standard C program mode can be used. Put the code you want to reuse in a different file. If you try some features, the appropriate header file for the include is OK. Compilation is a Linux driver composed of multiple files, code reuse is divided into static and dynamic two, static reuse is a low-level reuse, in this section will introduce another way of diamante sharing: module dependency, also known as the export symbol. Forcibly unloading the driver, that is, when the driver is abnormal, the Linux driver may not uninstall properly. For example, initializing the data crash, the initialization function of the driver module crashes, which causes the initialization to not return normally. The performance of this situation is that the current Linux driver module does not have any other modules to use, we can use the Rmmod bad_driver command to uninstall. The buzzer driver is also called the PWN pulse width modulation, the basic principle is the pulse to control the buzzer opening and stopping. The PWN drive is similar to the LED driver implementation process and may be simpler.

8th Chapter Buzzer

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.