Seventh chapter LED will blink for me: Control light-emitting secondary tube

Source: Internet
Author: User

LED Driver Development Experiment

, the LED1~LED2 is connected with Gpc0_3 and Gpc0_4 respectively, and the high and low levels of the gpc0_3 and gpc0_4 pins are
To control the continuity of the transistor, thereby controlling the LED's light-off.

According to the characteristics of the transistor, when these pins output high, the collector and the emitter conduction, the light emitting diode is lit; Conversely, the LED is off. Control the LEDs for Gpc0_3 and gpc0_4 by controlling Gpc0con and Gpc0dat.

\3 the disc: experimental data. Linux OS porting section \ porting the new Linux3.2 kernel to the development Platform \1 Linux kernel compilation experiment \ Ported kernel "directory copy to the shared directory (this kernel is a ported kernel, if the user completes the Linux kernel transplant experiment, can use their own kernel, Modify the path as per the actual situation). \4 the disc: experimental data. Linux driver Section \linux3.2 Drivers "directory copied to the shared directory.

Set up working directory, copy source code
$ mkdir Workdir/driver
$ CD ~/workdir/driver/
$ cp/mnt/hgfs/share/linux-3.2-fs210-v3.tar.bz2./
$ cp/mnt/hgfs/share/linux3.2drivers/./A
Unzip the kernel source code
$ tar xvf linux-3.2-fs210-v3.tar.bz2
Compile kernel source code
$ CD ~/workdir/driver/linux-3.2-fs210-v3
$ cp fs210_defconfig. config
$ make Zimage

Compiling driver Source code

$ make

View the build-generated KO file and copy it to the NFS file system directory.
$ ls
$ CP fs210_led.ko/source/rootfs/

Execute the Make led_test command to compile the test file.

$ make Led_test

Start the Development Board and load the driver.

# Insmod Fs210_led.ko
# mknod/dev/led C 250 0
# chmod 777/dev/led
#./led_test

You can see that the LED1 interval flashes.

Seventh chapter LED will blink for me: Control light-emitting secondary tube

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.