In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
First, borrow a diagram to illustrate the relationship between the linux application and the kernel.
Different from the bare metal program, the application development under linux does not access the hardware directly, but the application program calls the driver to access the hardware. This is the system structure of linux. For details, please refer to the complete Manual of embedded linux Application Development.
Back to am335x, the operation of LED has been realized in uboot, the basic principle is the same, set the GPIO output, and light the LED at low level. If you want to access GPIO by manipulating files in kernel space, you can refer to BeagleBone's GPIO control
The led-related files are stored in the driver/leds directory in linux3.2, and the led driver module is written here. The code refers to the GPIO control example under Am335x
Add file leds-run.c
`
# include # define TEST_IO_NUM 89#define NAME_MISC "GpioTest" # define NAME_MOUDULE "GpioTest1" # define USE_MISC_MODE 1static int major = 251 void GpioTest (void); static long GpioIOctl (struct file * filp, unsigned cmd, unsigned long arg) {GpioTest (); return 1;} void GpioTest (void) {int iCount = 0 for (iCount = 0; iCount)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.