CN114020659A - Energy controller system based on application layer driving liquid crystal display - Google Patents
Energy controller system based on application layer driving liquid crystal display Download PDFInfo
- Publication number
- CN114020659A CN114020659A CN202111270506.0A CN202111270506A CN114020659A CN 114020659 A CN114020659 A CN 114020659A CN 202111270506 A CN202111270506 A CN 202111270506A CN 114020659 A CN114020659 A CN 114020659A
- Authority
- CN
- China
- Prior art keywords
- liquid crystal
- interface
- display
- crystal display
- application layer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 239000004973 liquid crystal related substance Substances 0.000 title claims abstract description 89
- 230000007717 exclusion Effects 0.000 claims abstract description 15
- 238000013506 data mapping Methods 0.000 claims description 11
- 230000006870 function Effects 0.000 claims description 8
- 230000002093 peripheral effect Effects 0.000 claims description 5
- 238000013507 mapping Methods 0.000 claims description 2
- 238000012356 Product development Methods 0.000 abstract description 3
- 230000000903 blocking effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000000034 method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/102—Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F9/526—Mutual exclusion algorithms
Abstract
The invention relates to the embedded technical field, in particular to an energy controller system based on application layer driving liquid crystal display; the power controller system for driving the liquid crystal display based on the application layer comprises: the system provides a uniform access interface for all application programs needing liquid crystal display without considering mutual exclusion access to liquid crystal, and provides the system for developers in a dynamic library or source code mode, thereby simplifying programming logic and improving product development efficiency.
Description
Technical Field
The invention relates to the technical field of embedding, in particular to an energy controller system for driving liquid crystal display based on an application layer.
Background
With the rapid development of embedded technology, the importance of a human-computer interaction interface is more and more displayed, and a liquid crystal display screen is gradually the basic configuration of embedded equipment;
in the prior art, a bus controller driver and a device driver are mostly integrated into a Linux kernel to form a module of the Linux kernel, so that the bus controller driver and the device driver operate in a kernel state, but an embedded device peripheral device is influenced by supply and price, so that a replacement risk exists, or a hardware layout is changed, in order to adapt to a change of hardware, the whole Linux kernel needs to be recompiled or a kernel driver module needs to be separately compiled, but the compilation of the kernel and the driver module is often controlled by a main controller provider, the compilation of the driver module also depends on a software environment of the compilation kernel, and the mounting failure of the driver module is caused because the software environment of the compilation kernel is different from that of the driver module.
Disclosure of Invention
The invention aims to provide an energy controller system for driving liquid crystal display based on an application layer, which aims to solve the problem that software is influenced when liquid crystal hardware is changed in the prior art.
In order to achieve the above object, the present invention provides an energy controller system for driving a liquid crystal display based on an application layer, the energy controller system for driving a liquid crystal display based on an application layer comprising:
the bus driving unit is used for calling the drive of a hardware peripheral interface integrated by a main processor of the embedded equipment through a general application layer interface provided by an embedded Linux operating system so as to provide the access capability to the hardware equipment hung on the bus interface and issue commands and data to the liquid crystal panel;
a liquid crystal driving unit for providing an operation interface for hardware operation supported by a specific liquid crystal panel,
the unified interface unit is used for providing a display control interface and a parameter interface for acquiring the hardware parameter information of the liquid crystal panel, is decoupled with the hardware and encapsulates the operation interface again;
the data mapping unit is used for mapping display data transmitted by different application programs through the unified interface unit to a display buffer area, and each address of the display buffer area corresponds to the pixel point coordinate on the liquid crystal panel, so that the change of the data stored in the display buffer area is finally expressed as the change of the pixel point color on the liquid crystal panel; and
and the access control unit is used for providing a mutual exclusion mechanism for accessing the display buffer area in the data mapping unit, so that a mutual exclusion relation is formed between the operations of different application programs on the liquid crystal display panel, and only one application program is ensured to operate the liquid crystal at a certain moment.
The application program and the specific liquid crystal panel are decoupled, the influence caused by the change of liquid crystal hardware is controlled in the system, the change of the liquid crystal model or the interface does not need to recompile a Linux kernel mirror image or a Linux drive, a uniform access interface is provided for all the application programs needing liquid crystal display, the exclusive access to the liquid crystal is not needed to be considered, the system designed by the method is provided for developers through a dynamic library or source code mode, programming logic is simplified, and product development efficiency is improved.
The display control interface is directly called by an application program with a liquid crystal display function.
The display control interface is used for calling the display control interface by an application program with the liquid crystal display function according to needs, and further is not influenced by hardware change of the liquid crystal panel.
The parameter interfaces comprise an interface for acquiring the resolution of the liquid crystal panel, an interface for controlling the backlight state and an interface for refreshing the display content of the designated area by using the designated data.
And directly acquiring various parameter information of the liquid crystal panel through the parameter interface of the unified interface unit by utilizing a mode of decoupling the unified interface unit from hardware.
The display buffer area is an unused physical memory space with a fixed size distributed by a Linux operating system, and the size of the physical memory space is related to the resolution of the liquid crystal panel.
And the display buffer area is set to realize the one-by-one access operation of each application program to the data mapping unit, thereby realizing the ordered display control of the liquid crystal panel.
Wherein the mutual exclusion mechanism comprises a semaphore and a file lock.
When a plurality of application programs access the critical section simultaneously, one application program can obtain access authority to perform the access operation of the critical section, other application programs are blocked because the access authority of the critical section cannot be obtained and are added into a waiting queue of the critical section by a Linux operating system, after the critical section is accessed, the first application program in the waiting queue can be awakened by the operating system to obtain the access authority of the critical section, and the blocking and the awakening of the programs are automatically completed by the Linux operating system.
The operation interface comprises an initialization time sequence interface, a read-write interface, a command control interface, an initial coordinate value interface for setting a display area and a pixel point interface for refreshing a designated position.
The interface is called by the unified interface unit of the upper layer, and the layer calls the interface of the bus driving unit to send data and commands to a specific liquid crystal display panel.
According to the energy controller system based on the application layer driven liquid crystal display, the application layer driven liquid crystal unit is additionally arranged between the application program and the embedded Linux operating system, the application program is decoupled with the specific liquid crystal panel, the influence caused by the change of liquid crystal hardware is controlled in the system, the change of the liquid crystal model or the interface does not need to recompile the Linux kernel mirror image or the Linux drive, a uniform access interface is provided for all the application programs needing liquid crystal display, the exclusive access to the liquid crystal does not need to be considered, the system is provided for developers through a dynamic library or source code mode, programming logic is simplified, and product development efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an energy controller system for driving a liquid crystal display based on an application layer according to the present invention.
Fig. 2 is a schematic flowchart of an application driving lcd panel based on an application layer driving lcd power controller system according to the present invention.
The system comprises a 10-unified interface unit, a 20-access control unit, a 30-liquid crystal driving unit, a 40-data mapping unit and a 50-bus driving unit.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
In the description of the present invention, it is to be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on the orientations or positional relationships illustrated in the drawings, and are used merely for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the present invention. Further, in the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
Referring to fig. 1 to 2, the present invention provides an energy controller system for driving a liquid crystal display based on an application layer, including:
the bus driving unit 50 is used for calling the drive of a hardware peripheral interface integrated by a main processor of the embedded equipment through a general application layer interface provided by an embedded Linux operating system so as to provide the access capability to the hardware equipment hung on the bus interface and issue commands and data to the liquid crystal panel;
a liquid crystal driving unit 30 for providing an operation interface for hardware operations supported by a specific liquid crystal panel,
the unified interface unit 10 is used for providing a display control interface and a parameter interface for acquiring hardware parameter information of the liquid crystal panel, and the unified interface unit 10 is decoupled with hardware and encapsulates the operation interface again;
a data mapping unit 40, configured to map display data transmitted by different application programs through the unified interface unit 10 to a display buffer, where each address of the display buffer corresponds to a pixel point coordinate on a liquid crystal panel, so that a change of data stored in the display buffer is finally expressed as a change of a pixel point color on the liquid crystal panel; and
the access control unit 20 is configured to provide a mutual exclusion mechanism for accessing the display buffer in the data mapping unit 40, so that a mutual exclusion relationship is formed between operations of different applications on the liquid crystal display panel, and it is ensured that only one application operates the liquid crystal at a certain time.
In this embodiment, the bus driving unit 50 is configured to invoke drivers (SPI, IIC, GPIO, etc.) of a hardware peripheral interface integrated by a main processor of an embedded device through a general application layer interface (open, read, write, ioctl, etc.) provided by an embedded Linux operating system, where the drivers are specific to the hardware of the main processor of the embedded device and are fixed with the determination of the main processor and hardly change, the bus driving unit 50 provides an access capability to a hardware device connected to the bus interface, commands, data, etc. to a liquid crystal panel are issued through the layer, and the type of an interface connected between the liquid crystal panel and the main processor of the embedded device determines the internal implementation of the bus driving unit 50;
the liquid crystal driving unit 30 is configured to provide an operation interface of hardware operation supported by a specific liquid crystal display panel, including an initialization timing sequence interface, a read/write interface, a command control interface, an initial coordinate value interface for setting a display area, and a pixel point interface for refreshing a designated position, where the above interfaces are called by the unified interface unit 10, that is, the unified interface unit 10 calls an interface of the bus driving unit 50 to send data and commands to the specific liquid crystal display panel;
the unified interface unit 10 is configured to provide a display control interface directly called by an application program with a liquid crystal display function and a parameter interface for acquiring parameter information of liquid crystal display panel hardware, and the unified interface unit 10 is decoupled from the hardware, is not affected by hardware variation of the liquid crystal panel, and re-encapsulates the operation interface provided by the liquid crystal driving unit 30;
a physical memory space with a fixed size which is not used is allocated by a Linux operating system in the data mapping unit 40 to serve as a display buffer area, the size of the display buffer area is related to the resolution of the liquid crystal panel, display data transmitted by different application programs through the unified interface unit 10 are mapped to the display buffer area, each address of the display buffer area corresponds to a pixel point coordinate on the liquid crystal panel, and the change of the storage data of the display buffer area is finally expressed as the change of the pixel point color on the liquid crystal panel;
the access control unit 20 provides a mutual exclusion means for accessing the display buffer in the data mapping unit 40, the access operation to the display buffer in the data mapping unit 40 is a critical section, the characteristic of the critical section is that the display buffer should not be accessed by multiple applications at the same time, otherwise unknown hardware faults can occur, multiple applications need to compete for the access authority of the critical section, the access control unit 20 provides a mutual exclusion mechanism for the multiple applications to access the critical section orderly and orderly by providing a mutual exclusion mechanism for the critical section, so that the operations of different applications on the liquid crystal display panel form a mutual exclusion relationship, and it is ensured that only one application operates the liquid crystal panel at a certain time, and it is prevented that the data written in the liquid crystal and the command sequence are mixed together to cause the liquid crystal receiving timing abnormal panel to display an unknown state, when a plurality of application programs access the critical section simultaneously, one program can obtain access authority to perform access operation of the critical section, other application programs are blocked due to the fact that the access authority of the critical section cannot be obtained and are added into a waiting queue of the critical section by a Linux operating system, after the critical section is accessed, a first application program in the waiting queue can be awakened by the operating system to obtain the access authority of the critical section, and the blocking and awakening of the programs are automatically completed by the Linux operating system.
Furthermore, the display control interface is directly called by an application program with a liquid crystal display function.
Further, the parameter interface comprises an interface for acquiring the resolution of the liquid crystal panel, an interface for controlling the backlight state and an interface for refreshing the display content of the designated area by using the designated data.
Further, the display buffer is an unused physical memory space with a fixed size, which is allocated by the Linux operating system, and the size of the physical memory space is related to the resolution of the liquid crystal panel.
Further, the mutual exclusion mechanism comprises a semaphore and a file lock.
In this embodiment, when the display buffer is a shared memory space applied by a Linux operating system, the file lock refers to whether the shared memory space is locked by using a system function fcntl (), if the shared memory space is locked, the file lock is blocked and waits until other applications finish operating the shared memory to release the lock, and the application successfully locks the shared memory space, so that the target memory space can be further operated Status.
Further, the operation interface comprises an initialization timing sequence interface, a read-write interface, a command control interface, an interface for setting the initial coordinate value of the display area and an interface for refreshing the pixel point at the designated position.
Further, the liquid crystal driving unit 30 is also configured to call an interface of the bus driving unit 50 to send data and commands to a specific liquid crystal panel.
Furthermore, the display buffer is a shared memory space applied by a Linux operating system, and is mapped to different application programs through a system function mmap (), so that the same physical memory is accessed by the application programs.
Further, the mutual exclusion mechanism is configured to, when multiple programs perform access operations on the critical section at the same time, enable one of the programs to obtain an access right to perform the access operation on the critical section, block other programs because the access right of the critical section cannot be obtained, add the other programs to a waiting queue of the critical section by a Linux operating system, and after the critical section is accessed, wake up a first program in the waiting queue by the operating system to obtain the access right of the critical section.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (6)
1. An application layer based power controller system for driving a liquid crystal display, comprising:
the bus driving unit is used for calling the drive of a hardware peripheral interface integrated by a main processor of the embedded equipment through a general application layer interface provided by an embedded Linux operating system so as to provide the access capability to the hardware equipment hung on the bus interface and issue commands and data to the liquid crystal panel;
a liquid crystal driving unit for providing an operation interface for hardware operation supported by a specific liquid crystal panel,
the unified interface unit is used for providing a display control interface and a parameter interface for acquiring the hardware parameter information of the liquid crystal panel, is decoupled with the hardware and encapsulates the operation interface again;
the data mapping unit is used for mapping display data transmitted by different application programs through the unified interface unit to a display buffer area, and each address of the display buffer area corresponds to the pixel point coordinate on the liquid crystal panel, so that the change of the data stored in the display buffer area is finally expressed as the change of the pixel point color on the liquid crystal panel; and
and the access control unit is used for providing a mutual exclusion mechanism for accessing the display buffer area in the data mapping unit, so that a mutual exclusion relation is formed between the operations of different application programs on the liquid crystal display panel, and only one application program is ensured to operate the liquid crystal at a certain moment.
2. The power controller system for driving liquid crystal display based on application layer as claimed in claim 1,
the display control interface is directly called by an application program with a liquid crystal display function.
3. The power controller system for driving liquid crystal display based on application layer as claimed in claim 1,
the parameter interfaces include an interface for acquiring the resolution of the liquid crystal panel, an interface for controlling the backlight state and an interface for refreshing the display content of the designated area by using the designated data.
4. The power controller system for driving liquid crystal display based on application layer as claimed in claim 1,
the display buffer area is an unused physical memory space with a fixed size, which is distributed by a Linux operating system, and the size of the physical memory space is related to the resolution of the liquid crystal panel.
5. The power controller system for driving liquid crystal display based on application layer as claimed in claim 1,
the mutual exclusion mechanism includes a semaphore and a file lock.
6. The power controller system for driving liquid crystal display based on application layer as claimed in claim 1,
the operation interface comprises an initialization time sequence interface, a read-write interface, a command control interface, an initial coordinate value interface for setting a display area and a pixel point interface for refreshing a designated position.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111270506.0A CN114020659A (en) | 2021-10-29 | 2021-10-29 | Energy controller system based on application layer driving liquid crystal display |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111270506.0A CN114020659A (en) | 2021-10-29 | 2021-10-29 | Energy controller system based on application layer driving liquid crystal display |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114020659A true CN114020659A (en) | 2022-02-08 |
Family
ID=80058701
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111270506.0A Pending CN114020659A (en) | 2021-10-29 | 2021-10-29 | Energy controller system based on application layer driving liquid crystal display |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114020659A (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07175445A (en) * | 1993-12-20 | 1995-07-14 | Hitachi Ltd | Liquid crystal driver built-in memory and liquid crystal display |
US20080065838A1 (en) * | 2005-03-10 | 2008-03-13 | Pope Steven L | Data processing system with memory access |
US20120036334A1 (en) * | 2010-08-05 | 2012-02-09 | Horman Neil R T | Access to shared memory segments by multiple application processes |
CN102866966A (en) * | 2012-08-28 | 2013-01-09 | 大唐移动通信设备有限公司 | Device driver control method and device for Linux operating system |
CN103731328A (en) * | 2014-01-02 | 2014-04-16 | 烽火通信科技股份有限公司 | System and method for achieving home gateway data communication based on Linux shared memory |
US20140281283A1 (en) * | 2013-03-13 | 2014-09-18 | Qualcomm Incorporated | Dual host embedded shared device controller |
CN109597595A (en) * | 2018-10-29 | 2019-04-09 | 广州市中海达测绘仪器有限公司 | Control method, device, computer equipment and the storage medium of liquid crystal display |
CN112612523A (en) * | 2020-12-17 | 2021-04-06 | 威胜集团有限公司 | Embedded equipment driving system and method |
CN112631536A (en) * | 2020-12-30 | 2021-04-09 | 南京能瑞自动化设备股份有限公司 | Energy controller LCD liquid crystal display control system and method |
-
2021
- 2021-10-29 CN CN202111270506.0A patent/CN114020659A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07175445A (en) * | 1993-12-20 | 1995-07-14 | Hitachi Ltd | Liquid crystal driver built-in memory and liquid crystal display |
US20080065838A1 (en) * | 2005-03-10 | 2008-03-13 | Pope Steven L | Data processing system with memory access |
US20120036334A1 (en) * | 2010-08-05 | 2012-02-09 | Horman Neil R T | Access to shared memory segments by multiple application processes |
CN102866966A (en) * | 2012-08-28 | 2013-01-09 | 大唐移动通信设备有限公司 | Device driver control method and device for Linux operating system |
US20140281283A1 (en) * | 2013-03-13 | 2014-09-18 | Qualcomm Incorporated | Dual host embedded shared device controller |
CN103731328A (en) * | 2014-01-02 | 2014-04-16 | 烽火通信科技股份有限公司 | System and method for achieving home gateway data communication based on Linux shared memory |
CN109597595A (en) * | 2018-10-29 | 2019-04-09 | 广州市中海达测绘仪器有限公司 | Control method, device, computer equipment and the storage medium of liquid crystal display |
CN112612523A (en) * | 2020-12-17 | 2021-04-06 | 威胜集团有限公司 | Embedded equipment driving system and method |
CN112631536A (en) * | 2020-12-30 | 2021-04-09 | 南京能瑞自动化设备股份有限公司 | Energy controller LCD liquid crystal display control system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7257650B2 (en) | Universal graphic adapter for interfacing with hardware and means for determining previous output ranges of other devices and current device intial ranges | |
US6457099B1 (en) | Programmable dedicated application card | |
US5245702A (en) | Method and apparatus for providing shared off-screen memory | |
US6230118B1 (en) | DOS based application supports for a controllerless modem | |
US5752032A (en) | Adaptive device driver using controller hardware sub-element identifier | |
JPH11167544A (en) | Pcmcia card and programming method thereof | |
CN104137074A (en) | Optimization of resource usage in a multi-environment computing system | |
CN112631536B (en) | LCD (liquid crystal display) control system and method for energy controller | |
US6907521B2 (en) | Enabling video BIOS and display drivers to leverage system BIOS platform abstract | |
CN114020659A (en) | Energy controller system based on application layer driving liquid crystal display | |
CN111341361A (en) | Quick-response central control screen display method and device | |
CN102945658B (en) | Controller of thin film transistor-liquid crystal display (TFT-LCD) | |
CN101114230A (en) | Method for reading and electing read only memory program code on self-storing mechanism | |
US5504920A (en) | Video driver system for communicating device specific primitive commands to multiple video controller types | |
CN112379875A (en) | TD GUIE graphic system and QT graphic rendering library data interaction method | |
CN114385426A (en) | Memory test method, device, equipment and storage medium | |
EP0948769A1 (en) | Real time services in backwardly compatible operating systems | |
CN110750476A (en) | Method, device, system and medium for bridging SPI bus and parallel bus | |
EP3480703B1 (en) | Hardware independent peripheral control system and method | |
WO2023077635A1 (en) | Screen display method and vehicle-mounted terminal | |
JP2010039644A (en) | Operation verification method for peripheral device, device driver program, and application program | |
JP2003030043A (en) | Memory managing method | |
CN113407250A (en) | Running method of microcontroller and terminal | |
KR20230133097A (en) | Method for implementing a software architecture for common use of wayland protocol | |
JPH0413716B2 (en) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |