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