Eighth Reading notes

Source: Internet
Author: User

The eighth chapter is mainly about the buzzer driver, the buzzer is A hardware device that comes with the s3c6410 Development Board.

This chapter describes Linux- Driven code reuse, code reuse is divided into static reuse and dynamic reuse, the code to be reused is declared in the header file, this is static reuse,thelinux driver can use another Linux The resources in the drive, which is dynamic reuse.

There is also a way to share code: module dependencies, also known as export symbols, are the exported symbols in one drive module using another drive module.

In some cases, theLinux driver does not unload properly and requires a forced uninstall, but the method in this chapter can not forcibly uninstall all Linux driver modules, only uninstall due to abnormal conditions caused by Linux The drive module cannot be uninstalled. For example:

The initialization function crashes, and the behavior is that the current Linux driver module is not used by any other Linux driver, but the display has been referenced once. The workaround is to clear 0 of the current Linux driver Module reference counter.

The Unload function is blocked, and the behavior is that a rmmod command will stop there and never return to the operating prompt of the system, and the workaround is to replace the original unload function with an empty unload function.

The buzzer is driven by a pulse to control the buzzer's opening and stopping, and the buzzer is called PWM.

Eighth Reading notes

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.