After compilation, an led_driver.o file is generated, and led_driver.o is sent to the target board through the rz three-line serial port, and a device node is created on the target board.
[Root@ B .J.xx/root] # mknod/dev/led c 254 0
Then install the driver
[Root@ B .J.xx/root] # insmod led_driver.o
You can use lsmod to query the driver module.
[Root@ B .J.xx/root] # lsmod
Uninstall the driver through rmmod
# Rmmod led_driver [root@ B .J.xx/root]
After the driver is installed, when the application calls fd = open ("/dev/led", O_RDWR), the LED indicator on the Development Board will light up. When the application calls close (fd) the LED on the Development Board is off.
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.