Eighth Chapter Experience

Source: Internet
Author: User

The eighth chapter mainly learns to let the development Board make the sound: buzzer drive. The first thing you should know is that the buzzer is a hardware device on the s3c6410 Development Board. Then we have to learn the Linux-driven code reuse problem, he has many ways, you can use the standard C program, the code will be reused in other files. Alternatively, you can use another dynamic reuse approach, where a Linux driver can use resources from another Linux driver. Then the compilation is a Linux driver composed of multiple files, the relevant code see the textbook. Let's look at another way of sharing code: module dependencies, which are the symbols that are exported from another driver module in one drive module.

Then it is to forcibly uninstall the Linux driver, when the initialization function crashes and the Unload function is blocked, you need to do a Linux driver forced unloading.

Finally, the PWM driver is studied by means of pulses to control the opening and stopping of the buzzer. PWM can be switched on and off via the I/O command. The PWM driver consists of 3 files: pwm.c, PWM_FUN.C, Pwm_fun.h. Where PWM.C is the driver main program. Pwm_fun.h references the corresponding header file, as well as some of the macros defined. The Pwm_fun.c file contains two functions for opening and stopping the PWM. Then perform a buzzer-driven test.

In this chapter, I have mastered the common use of Linux Drive code reuse and forcibly uninstall the Liunx drive method, we can eliminate the pain of constantly restarting the machine.

Eighth Chapter Experience

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.