Step 1: Cut out the LCD driver that comes with the board
Cut out an LCD. Different from the previous drivers like LED and buzzer, you can directly comment it in make menuconfig and compile to generate zImage image. This will limit many functions of the board. You can only comment the driver in /driver/video/s3c-fb0.c in the source code package to kill the LCD driver that comes with the board!
After the comment, make generates a new zImage image. Before downloading the newly generated zImage to the board, start the board and you can see the fb0 device in the /dev directory.
Observe that there is also a fb file under the /sys/class/graphics/ directory.
Then download the new image file to the board and find that the files in the two directories are gone. Before writing the LCD driver yourself, you need to understand how the driver works. The process of creating the device file /dev/fb0 is as follows:
The module code written is as follows:
1 #include
2 #include
3 #include
4 #include
5 #include
6 #include
7 #include
8 #include
9 #include
10 #include
11 #include
12 #include
13 #include
14 #include
15 #include
16 #include
17 #include
18 #include
19 #include
20 #include
21 #include
22 #include
23 #include
24 #include
25
26 #include
27 #include
28 #include
29 #include
30 #include
31 #include
32 #include
33
34 MODULE_LICENSE("GPL");
35 MODULE_AUTHOR("bunfly");
36
37 int s3c_probe(struct platform_device *dev);
38
39 struct platform_driver s3c_fb = {
40 .probe = s3c_probe,
41 .driver = {
42 .name = "exynos4-fb",
43 },
44 };
45
46 struct fb_info info;
47
48 int test_init(void)
49 {
50 platform_driver_register(&s3c_fb);
51 }
52
53 void test_exit(void)
54 {
55 }
56
57 module_init(test_init);
58 module_exit(test_exit);
59
60 int s3c_probe(struct platform_device *dev)
61 {
62 printk("proben");
63 register_framebuffer(&info);
64 return 0;
65 }
66
Through this module, you can see the fb0 device under the /dev directory:
Previous article:Wi-Fi debugging record of S3c6410 platform Android system
Next article:External interrupts in ARM
Recommended ReadingLatest update time:2024-11-23 08:05
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- An Engineer's Guide to Temperature Sensing
- Analysis of Rectification Circuit and Filter Circuit
- Learn more about logic analyzers
- What is the status of lithium battery?
- Method for testing FPGA logic unit based on BIST using ORCA structure
- [TI recommended course] #[High Precision Laboratory] Magnetic Sensor Technology#
- Verilog_HDL_Implementation of Common Logic
- TI CC2530 button controls the light on and off
- Could you please tell me what component this is?
- Why does the STM series MCU use SMD T card instead of traditional T card?