An energy controller system based on application layer driving liquid crystal display

By designing an energy controller system that drives LCD displays based on the application layer, the impact of LCD hardware changes on the software is solved, and adaptability and unified access interfaces are achieved without recompiling the kernel or driver, which improves development efficiency and reliability of mutually exclusive access.

CN114020659BActive Publication Date: 2025-05-06ZHEJIANG WELLSUN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111270506.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-05-06
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

In the prior art, the change of the LCD hardware will have an impact on the software, resulting in the need to recompile the Linux kernel or driver module, and the compilation of the driver module depends on a specific software environment, which can easily lead to mounting failure.

Method used

Design an energy controller system that drives LCD display based on the application layer. Through the bus driver unit, the LCD driver unit, the unified interface unit, the data mapping unit and the access control unit, a unified access interface and mutual exclusion mechanism are provided to decouple the application and the LCD hardware, and avoid hardware changes affecting the software.

Benefits of technology

It can adapt to changes in LCD hardware without recompiling the Linux kernel or driver module, provide a unified access interface, simplify programming logic, improve product development efficiency, and ensure mutually exclusive access to LCD displays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114020659B_ABST
    Figure CN114020659B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of embedded technology, and in particular to an energy controller system based on an application layer driving a liquid crystal display; the energy controller system based on an application layer driving a liquid crystal display comprises: a bus driving unit, a liquid crystal driving unit, a unified interface unit, a data mapping unit and an access control unit, providing a unified access interface for all application programs that require liquid crystal display, without considering mutually exclusive access to liquid crystals, and the system is provided to developers in the form of a dynamic library or source code, thereby simplifying programming logic and improving product development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of embedded technology, and in particular to an energy controller system based on application layer driving liquid crystal display. Background Art

[0002] With the rapid development of embedded technology, the human-computer interaction interface has become increasingly important, and LCD screens have gradually become the basic configuration of embedded devices.

[0003] In the prior art, bus controller drivers and device drivers are often integrated into the Linux kernel to become a module of the Linux kernel, so that it runs in the kernel state. However, due to the influence of supply and price, there is a risk of replacement of peripheral devices of embedded devices, or the hardware layout changes. In order to adapt to the hardware changes, it is necessary to recompile the entire Linux kernel or compile the kernel driver module separately. However, the compilation of the kernel and driver modules is often controlled by the main controller supplier, and the compilation of the driver module also depends on the software environment of the compiled kernel. The different software environments of the compiled kernel and the driver module will cause the driver module to fail to mount. Summary of the invention

[0004] The purpose of the present invention is to provide an energy controller system for driving a liquid crystal display based on an application layer, so as to solve the problem existing in the prior art that changes in the liquid crystal hardware will affect the software.

[0005] To achieve the above object, the present invention provides an energy controller system for driving a liquid crystal display based on an application layer, and the energy controller system for driving a liquid crystal display based on an application layer comprises:

[0006] The bus driver unit is used to call the driver of the hardware peripheral interface integrated in the main processor of the embedded device through the general application layer interface provided by the embedded Linux operating system to provide access to the hardware devices mounted on the bus interface and issue commands and data to the LCD panel;

[0007] The liquid crystal drive unit is used to provide an operation interface for hardware operations supported by a specific liquid crystal panel.

[0008] A unified interface unit, used to provide a display control interface and a parameter interface for obtaining hardware parameter information of the liquid crystal panel, and the unified interface unit is decoupled from the hardware and re-encapsulates the operation interface;

[0009] A data mapping unit, used to map display data transmitted by different applications through the unified interface unit to a display buffer, by which each address of the display buffer corresponds to a pixel coordinate on the liquid crystal panel, so that changes in the data stored in the display buffer are ultimately manifested as changes in the color of the pixel on the liquid crystal panel; and

[0010] The access control unit is used to provide a mutually exclusive mechanism for accessing the display buffer in the data mapping unit, so that operations of different applications on the liquid crystal display panel form a mutually exclusive relationship, ensuring that only one application is operating the liquid crystal at a certain time.

[0011] Decouple the application from the specific LCD panel and control the impact of changes in LCD hardware. In this system, changes in the LCD model or interface do not require recompiling the Linux kernel image or Linux driver. A unified access interface is provided for all applications that require LCD display, without considering mutually exclusive access to the LCD. The system designed by this method is provided to developers in the form of dynamic libraries or source code, which simplifies the programming logic and improves product development efficiency.

[0012] The display control interface is directly called by an application program having a liquid crystal display function.

[0013] It is used to allow an application program with a liquid crystal display function to call the display control interface as needed, thereby not being affected by changes in the liquid crystal panel hardware.

[0014] The parameter interface includes an interface for obtaining the resolution of the liquid crystal panel, an interface for controlling the backlight state, and an interface for refreshing the display content of a specified area using specified data.

[0015] By decoupling the unified interface unit from the hardware, various parameter information of the liquid crystal panel can be directly acquired through the parameter interface of the unified interface unit.

[0016] The display buffer is an unused physical memory space of a fixed size allocated by the Linux operating system, and the size of the physical memory space is related to the resolution of the liquid crystal panel.

[0017] By setting the display buffer, each application program can access the data mapping unit one by one, thereby realizing orderly display control of the liquid crystal panel.

[0018] Wherein, the mutual exclusion mechanism includes semaphore and file lock.

[0019] The access operation to the display buffer in the data mapping unit is a critical section. When multiple applications access the critical section at the same time, one of the applications will obtain access rights and perform the access operation to the critical section. Other applications are blocked because they cannot obtain access rights to the critical section and are added to the waiting queue of the critical section by the Linux operating system. After waiting for the critical section to be accessed, the first application in the waiting queue will be awakened by the operating system and obtain access rights to the critical section. The blocking and awakening of the program are automatically completed by the Linux operating system.

[0020] The operation interface includes an initialization timing interface, a read / write interface, a command control interface, an interface for setting the starting coordinate value of the display area, and an interface for refreshing pixels at a specified position.

[0021] The above 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.

[0022] The present invention provides an energy controller system based on application layer driven liquid crystal display, which adds an application layer driven liquid crystal unit between the application program and the embedded Linux operating system, decouples the application program from the specific liquid crystal panel, and controls the impact of changes in the liquid crystal hardware in the system of the present application. Changes in the liquid crystal model or interface do not require recompiling the Linux kernel image or Linux driver, and a unified access interface is provided for all applications that require liquid crystal display, without considering mutually exclusive access to the liquid crystal. The system is provided to developers in the form of dynamic libraries or source codes, which simplifies programming logic and improves product development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0024] Figure 1 It is a structural schematic diagram of an energy controller system based on application layer driving liquid crystal display provided by the present invention.

[0025] Figure 2 The present invention provides a schematic flow chart of an application program driving a liquid crystal panel based on an energy controller system for driving a liquid crystal display at an application layer.

[0026] 10- unified interface unit, 20- access control unit, 30- liquid crystal driving unit, 40- data mapping unit, 50- bus driving unit. DETAILED DESCRIPTION

[0027] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0028] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.

[0029] See also Figure 1 to Figure 2 The present invention provides an energy controller system for driving a liquid crystal display based on an application layer, and the energy controller system for driving a liquid crystal display based on an application layer comprises:

[0030] The bus driver unit 50 is used to call the driver of the hardware peripheral interface integrated in the main processor of the embedded device through the general application layer interface provided by the embedded Linux operating system to provide access to the hardware device mounted on the bus interface and issue commands and data to the liquid crystal panel;

[0031] The liquid crystal driving unit 30 is used to provide an operation interface for hardware operations supported by a specific liquid crystal panel.

[0032] The unified interface unit 10 is used to provide a display control interface and a parameter interface for obtaining hardware parameter information of the liquid crystal panel, and the unified interface unit 10 is decoupled from the hardware and re-encapsulates the operation interface;

[0033] A data mapping unit 40, used to map display data transmitted by different applications through the unified interface unit 10 to a display buffer, by which each address of the display buffer corresponds to a pixel coordinate on the liquid crystal panel, so that changes in the data stored in the display buffer are ultimately manifested as changes in the color of the pixel on the liquid crystal panel; and

[0034] The access control unit 20 is used to provide a mutual exclusion mechanism for accessing the display buffer in the data mapping unit 40, so that operations of different applications on the liquid crystal display panel form a mutual exclusion relationship, ensuring that only one application is operating the liquid crystal at a certain time.

[0035] In this embodiment, the bus driver unit 50 is used to call the driver of the hardware peripheral interface integrated in the main processor of the embedded device (SPI, IIC, GPIO, etc.) through the general application layer interface (open, read, write, ioctl, etc.) provided by the embedded Linux operating system. These drivers are specific to the main processor hardware of the embedded device, and are fixed with the determination of the main processor and will hardly change. The bus driver unit 50 provides access to the hardware devices mounted on the bus interface. The commands and data of the liquid crystal panel are issued through this layer. The interface type between the liquid crystal panel and the main processor of the embedded device determines the internal implementation of the bus driver unit 50.

[0036] The liquid crystal drive unit 30 is used to provide an operation interface for hardware operations supported by a specific liquid crystal display panel, including an initialization timing interface, a read / write interface, a command control interface, an interface for setting the starting coordinate value of the display area, and an interface for refreshing pixels at a specified position. The above interfaces are called by the unified interface unit 10, that is, the unified interface unit 10 calls the interface of the bus drive unit 50 to send data and commands to the specific liquid crystal display panel;

[0037] The unified interface unit 10 is used to provide a display control interface directly called by an application with a liquid crystal display function and a parameter interface for obtaining hardware parameter information of a liquid crystal display panel. The unified interface unit 10 is decoupled from the hardware and is not affected by changes in the liquid crystal panel hardware. It re-encapsulates the operation interface provided by the liquid crystal drive unit 30;

[0038] In the data mapping unit 40, the Linux operating system allocates an unused fixed-size physical memory space as a display buffer. The size of the display buffer is related to the resolution of the liquid crystal panel. Display data transmitted by different applications through the unified interface unit 10 are mapped to the display buffer. Each address of the display buffer corresponds to the coordinates of a pixel on the liquid crystal panel. Changes in the data stored in the display buffer are ultimately manifested as changes in the color of the pixel on the liquid crystal panel.

[0039] The access control unit 20 provides a mutually exclusive 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 it should not be accessed by multiple applications at the same time, otherwise an unknown hardware failure will occur. Multiple applications need to compete for the access rights of the critical section. The access control unit 20 provides a mutually exclusive mechanism for the critical section, so that multiple applications can access the critical section in an orderly manner, so that the operations of different applications on the liquid crystal display panel form a mutually exclusive relationship, ensuring that only one application is operating the liquid crystal panel at a certain time, preventing the data and command sequences written to the liquid crystal from being mixed together when the liquid crystal panel is operated at the same time, resulting in abnormal liquid crystal receiving timing and the panel displaying an unknown state. When multiple applications access the critical section at the same time, one of the programs will obtain the access right and perform the access operation of the critical section. Other applications are blocked because they cannot obtain the access right of the critical section and are added to the waiting queue of the critical section by the Linux operating system. After waiting for the critical section to be accessed, the first application in the waiting queue will be awakened by the operating system and obtain the access right of the critical section. The blocking and awakening of the program are automatically completed by the Linux operating system.

[0040] Furthermore, the display control interface is directly called by an application program having a liquid crystal display function.

[0041] Furthermore, the parameter interface includes 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 a specified area using specified data.

[0042] Furthermore, the display buffer is an unused physical memory space of a fixed size allocated by the Linux operating system, and the size of the physical memory space is related to the resolution of the liquid crystal panel.

[0043] Furthermore, the mutual exclusion mechanism includes semaphores and file locks.

[0044] In this embodiment, when the display buffer is a shared memory space applied for by the Linux operating system, the file lock refers to the application using the system function fcntl() to determine whether the shared memory space has been locked when accessing the shared memory space. If it has been locked, it will block and wait until other applications finish operating on the shared memory and release the lock. At the same time, the application successfully applies a lock to the shared memory space and can further operate on the object memory space. Before the application finishes operating on the shared memory space, if other applications try to operate the shared memory space, they will be blocked due to failure to obtain the lock, and will not have any actual impact on the shared memory space. This ensures that only one application is operating the LCD at the same time, preventing the data and command sequences written to the LCD from being mixed together when the LCD panel is operated at the same time, resulting in abnormal LCD reception timing and the panel displaying an unknown state.

[0045] Furthermore, the operation interface includes an initialization timing interface, a read / write interface, a command control interface, an interface for setting the starting coordinate value of the display area, and an interface for refreshing pixels at a specified position.

[0046] Furthermore, the liquid crystal driving unit 30 is also used to call the interface of the bus driving unit 50 to send data and commands to a specific liquid crystal panel.

[0047] Furthermore, the display buffer is a shared memory space applied for by the Linux operating system, and the display buffer is mapped to different application programs through the system function mmap(), so that multiple application programs access the same physical memory.

[0048] Furthermore, the mutual exclusion mechanism is used to allow one of the programs to obtain access rights and perform access operations on the critical section when multiple programs access the critical section at the same time. Other programs are blocked because they cannot obtain access rights to the critical section and are added to the waiting queue of the critical section by the Linux operating system. After waiting for the critical section to be accessed, the first program in the waiting queue will be awakened by the operating system and obtain access rights to the critical section.

[0049] What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.

Claims

1. An energy controller system based on application layer driving liquid crystal display, characterized in that: The energy controller system for driving a liquid crystal display based on an application layer includes: The bus driver unit is used to call the driver of the hardware peripheral interface integrated in the main processor of the embedded device through the general application layer interface provided by the embedded Linux operating system to provide access to the hardware devices mounted on the bus interface and issue commands and data to the LCD panel; The liquid crystal drive unit is used to provide an operation interface for hardware operations supported by a specific liquid crystal panel. A unified interface unit, used to provide a display control interface and a parameter interface for obtaining hardware parameter information of the liquid crystal panel, and the unified interface unit is decoupled from the hardware and re-encapsulates the operation interface; A data mapping unit, used to map display data transmitted by different applications through the unified interface unit to a display buffer, by which each address of the display buffer corresponds to a pixel coordinate on the liquid crystal panel, so that changes in the data stored in the display buffer are ultimately manifested as changes in the color of the pixel on the liquid crystal panel; and An access control unit, used to provide a mutually exclusive mechanism for accessing the display buffer in the data mapping unit, so that operations of different applications on the liquid crystal display panel form a mutually exclusive relationship, ensuring that only one application is operating the liquid crystal at a certain time; The display buffer is a shared memory space applied for by the Linux operating system. The display buffer is mapped to different applications through the system function mmap(), so that multiple applications access the same physical memory. The display buffer is an unused physical memory space of a fixed size allocated by the Linux operating system. The size of the physical memory space is related to the resolution of the liquid crystal panel. The display data transmitted by different applications through the unified interface unit is mapped to the display buffer. Each address of the display buffer corresponds to the coordinates of a pixel on the liquid crystal panel. Changes in the data stored in the display buffer are ultimately manifested as changes in the color of the pixels on the liquid crystal panel.

2. The energy controller system based on application layer driving liquid crystal display as claimed in claim 1, characterized in that: The display control interface is directly called by an application program having a liquid crystal display function.

3. The energy controller system based on application layer driving liquid crystal display as claimed in claim 1, characterized in that: The parameter interface includes 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 a specified area using specified data.

4. The energy controller system based on application layer driving liquid crystal display as claimed in claim 1, characterized in that: The mutual exclusion mechanism includes semaphores and file locks.

5. The energy controller system based on application layer driving liquid crystal display as claimed in claim 1, characterized in that: The operation interface includes an initialization timing interface, a read-write interface, a command control interface, an interface for setting the starting coordinate value of the display area, and an interface for refreshing pixels at a specified position.

Citation Information

Patent Citations

  • Control method and device of liquid crystal display screen, computer equipment and storage medium

    CN109597595A

  • Energy controller LCD liquid crystal display control system and method

    CN112631536A