LCD of the core bus, frambuffer (sb)

Publisher:mu22Latest update time:2024-09-18 Source: cnblogs Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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:


Reference address:LCD of the core bus, frambuffer (sb)

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

Based on 51 MCU + DHT11 temperature and humidity module + ESP8266 module + upload oneNET APP display + LCD1602 display
basic introduction Recently, I made a device based on 51 MCU (STC89C52) + DHT11 temperature and humidity module + ESP8266 module + upload to oneNET APP display + LCD1602 display. The 51 MCU collects the temperature and humidity of the DHT11 module, uploads the temperature and humidity to the oneNET platform through th
[Microcontroller]
Based on 51 MCU + DHT11 temperature and humidity module + ESP8266 module + upload oneNET APP display + LCD1602 display
LCD1602 clock displays time and date with alarm and can be adjusted cyclically
#include #include intrins.h #define uchar unsigned char #define uint unsigned int sbit lcdrs=P2^6; sbit lcden=P2^7; sbit lcdrw=P2^5; sbit key1=P2^0;//欢迎开屏/显示时间日期/显示闹铃切换 sbit key3=P2^1;   //循环调节 sbit key4=P2^2;//加 sbit key5=P2^3;//减 uchar flag1,flag,flag3,num1,shi,fen,miao,nian,yue,ri,zhou; uchar _fen,_shi;
[Microcontroller]
Introduction to the application of WT2003H voice chip in sweeper/washer voice replacement + LCD expansion
Product Market With the popularization of household electronic devices, various intelligent devices have entered people's lives, such as floor scrubbers and sweepers. At present, most sweepers and floor scrubbers have added sound prompts and manual prompts, but they are relatively simple, and some applications
[Embedded]
Introduction to the application of WT2003H voice chip in sweeper/washer voice replacement + LCD expansion
HT48R50A LCD Display Sample Program
HT48R50A  LCD Display Sample Program ; ********************************************  ; Function :       LCD显示示例程序           *  ; MICroProcessor : HT48R50A-1/28SKDIP-A      *  ; Author:         www.picavr.com             *  ; Crystal :       4MHz                       *  ; ********************************************
[Microcontroller]
HT48R50A LCD Display Sample Program
Design of LCD driver circuit for smart phone using PXA27x
The quality of LCD screen design is directly related to the overall performance of smartphones. However, there are many types of LCD screens, and engineers need to design for the timing matching, power requirements, and different characteristics of controllers of various screens. This article introduces the ch
[Microcontroller]
Design of LCD driver circuit for smart phone using PXA27x
Introduction to LCD backlight, I/O port and power protection circuit
As LCD TV screens become larger and brighter, they require more operating voltage and higher operating current, and the need for more stable and reliable circuit protection technology becomes more urgent. There are many types of circuit protection devices that can be used to help protect LCD di
[Power Management]
Introduction to LCD backlight, I/O port and power protection circuit
LCD1602 liquid crystal display can display the clock and modify the time
CODE: /*************************************** Program function: The LCD display screen displays the clock and can modify the time ****************************************/ #include reg52.h #define uint unsigned int #define uchar unsigned char sbit K1=P1^0;//Set up three independent keyboards sbit K2=P1^3; s
[Microcontroller]
Design of LCD display driver IP based on NiosII in SOPC
introduction The NioslI embedded processor is a SOPC solution proposed by Altera. It is a 32-bit embedded processor that users can configure and build at will. Combined with rich peripherals, it can quickly and flexibly build a powerful SOPC system. Altera provides some general IP cores, allowing users to easil
[Embedded]
Design of LCD display driver IP based on NiosII in SOPC
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号