CN112631536B - LCD (liquid crystal display) control system and method for energy controller - Google Patents

LCD (liquid crystal display) control system and method for energy controller Download PDF

Info

Publication number
CN112631536B
CN112631536B CN202011607227.4A CN202011607227A CN112631536B CN 112631536 B CN112631536 B CN 112631536B CN 202011607227 A CN202011607227 A CN 202011607227A CN 112631536 B CN112631536 B CN 112631536B
Authority
CN
China
Prior art keywords
lcd
module
interface
abstraction layer
liquid crystal
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.)
Active
Application number
CN202011607227.4A
Other languages
Chinese (zh)
Other versions
CN112631536A (en
Inventor
胡敏康
李定胜
周永志
王国玉
杨琦
肖杨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NANJING NENGRUI AUTOMATION EQUIPMENT CO Ltd
Original Assignee
NANJING NENGRUI AUTOMATION EQUIPMENT CO Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by NANJING NENGRUI AUTOMATION EQUIPMENT CO Ltd filed Critical NANJING NENGRUI AUTOMATION EQUIPMENT CO Ltd
Priority to CN202011607227.4A priority Critical patent/CN112631536B/en
Publication of CN112631536A publication Critical patent/CN112631536A/en
Application granted granted Critical
Publication of CN112631536B publication Critical patent/CN112631536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/34Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source
    • G09G3/36Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source using liquid crystals

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Chemical & Material Sciences (AREA)
  • Crystallography & Structural Chemistry (AREA)
  • Computer Hardware Design (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

The embodiment of the invention discloses a liquid crystal display control system and a method of an energy controller, wherein the control system comprises: an LCD application module, a hardware abstraction layer module, an LCD driver module and an operating system module; the hardware abstraction layer module comprises a plurality of interface functions, and each interface function correspondingly realizes the function of a liquid crystal display panel; the LCD driving module comprises a specific algorithm corresponding to each interface function; the LCD application program module is used for receiving the user driving instruction and calling an interface function in the hardware abstraction layer module according to the user driving instruction, and the hardware abstraction layer module is used for calling a concrete algorithm in the LCD driving module according to the interface function called by the LCD application program module; the LCD driving module is used for controlling the liquid crystal display panel according to an algorithm called by the hardware abstraction layer module based on an operation interface provided by the operation system module, so that the dead halt and breakdown phenomena of the system are reduced, the rights and interests of hardware manufacturers are protected, and the unified management of the platformization is realized.

Description

LCD (liquid crystal display) control system and method for energy controller
Technical Field
The embodiment of the invention relates to the technical field of display equipment, in particular to an energy controller liquid crystal display control system and method.
Background
The energy controller (Energy control and monitoring terminal unit, ECU) is arranged in a public transformer or private transformer area, can realize flexible access of metering and sensing equipment at a client side and a power distribution side, and has the functions of data acquisition, intelligent fee control, clock synchronization, accurate metering, orderly charging, energy management, loop state inspection, user transformer relation identification, power failure event reporting and the like.
Currently, for LCD (Liquid Crystal Display ) screen display of an energy controller, direct access to a liquid crystal display panel is mostly adopted by programming to control display of LCD screen content, and such design can cause phenomena of system crash and breakdown, and details of implementation of the liquid crystal display panel are exposed, which damages rights of hardware manufacturers and is not beneficial to unified management of platformization.
Disclosure of Invention
The embodiment of the invention provides an energy controller liquid crystal display control system and method, which are used for reducing the phenomena of system crash, breakdown and the like, avoiding exposing the implementation details of a liquid crystal display panel, protecting the rights and interests of hardware manufacturers and realizing the unified management of platformization.
In a first aspect, an embodiment of the present invention provides a liquid crystal display control system of an energy controller, including:
an LCD application module, a hardware abstraction layer module, an LCD driver module and an operating system module;
the hardware abstraction layer module comprises a plurality of interface functions, and each interface function correspondingly realizes the function of a liquid crystal display panel; the LCD driving module comprises a specific algorithm corresponding to each interface function;
the LCD application program module is used for receiving a user driving instruction and calling an interface function in the hardware abstraction layer module according to the user driving instruction, and the hardware abstraction layer module is used for calling a concrete algorithm in the LCD driving module according to the interface function called by the LCD application program module; the LCD driving module is used for controlling the liquid crystal display panel according to the algorithm called by the hardware abstraction layer module based on the operation interface provided by the operation system module.
Optionally, the hardware abstraction layer module includes a HAL framework and a HAL module architecture; the HAL framework is used for providing core data structure definition and external unified interfaces of the hardware abstraction layer module, and the HAL module framework is used for providing HAL layer driving of various liquid crystal display panels; the HAL framework is also used to manage and use the HAL module architecture by dynamic loading to form the different interface functions.
Optionally, the liquid crystal display panel includes an LCD display screen, and the LCD driving module is configured to access the LCD display screen according to an algorithm called by the hardware abstraction layer, and manage a display area in the LCD display screen.
Optionally, the display area in the LCD display screen includes at least one main interface and one active interface; the LCD driving module is used for simultaneously supporting at least one active interface process and one main interface process to draw the LCD display screen; the active interface process is used for drawing the active interface, and the main interface process is used for drawing the main interface.
Optionally, the master interface process is a master process, and the active interface process is a slave process; and the content drawn by the main interface process on the main interface and the content drawn by the active interface process on the active interface are displayed simultaneously.
Optionally, the main interface process includes a right to reset the LCD display, and the active interface process includes a right to turn on and/or off the LCD display backlight.
Optionally, the operating system module includes a Linux kernel and a kernel mode driver, where the Linux kernel and the kernel mode driver are used to provide an operation interface for initializing, reading, writing and controlling a specific liquid crystal display panel.
In a second aspect, an embodiment of the present invention provides a method for controlling a liquid crystal display of an energy controller, which is performed by the liquid crystal display control system of any one of the first aspect, and is applied to data update of an LCD display, including:
the LCD application program module receives an instruction for updating the content of the screen display; calling an interface function in a hardware abstraction layer module according to the screen display content updating instruction, wherein the hardware abstraction layer module calls a concrete algorithm in an LCD driving module according to the interface function called by the LCD application program module;
the LCD driving module judges whether the size of the update data requested by the user is larger than a preset minimum threshold value;
if the screen content is larger than the initial point position, the initial point position and the end point position of the screen content updating are designated, the updating command, the data and the data length are designated;
the LCD driving module calculates the updating starting point position and the updating ending point position of the screen content according to the size of the updating data requested by the user and the specification of the LCD display screen through an algorithm; judging whether the calculated starting point position and the calculated ending point position are wrong or not according to the designated starting point position and ending point position;
if no error exists, determining the calculated data length according to the calculated starting point position and ending point position;
judging whether the calculated data length is larger than the designated data length;
if the data length is larger than the specified data length, replacing the calculated data length with the specified data length, and drawing the screen content by the main interface process or the active interface process through the control register.
Optionally, the method further comprises:
if the calculated data length is smaller than the specified data length, the LCD driving module does not process.
Optionally, the method further comprises:
if the size of the update data requested by the user is smaller than a preset minimum threshold value, the LCD driving module controls the LCD display screen to output error information;
the method further comprises the steps of:
if the calculated updated starting point position and the calculated updated ending point position are wrong, the LCD driving module controls the LCD display screen to output error information.
The embodiment of the invention provides a liquid crystal display control system and a method of an energy controller, wherein the liquid crystal display control system comprises: an LCD application module, a hardware abstraction layer module, an LCD driver module and an operating system module; the hardware abstraction layer module comprises a plurality of interface functions, and each interface function correspondingly realizes the function of a liquid crystal display panel; the LCD driving module comprises a specific algorithm corresponding to each interface function; the LCD application program module is used for receiving the user driving instruction and calling an interface function in the hardware abstraction layer module according to the user driving instruction, and the hardware abstraction layer module is used for calling a concrete algorithm in the LCD driving module according to the interface function called by the LCD application program module; the LCD driving module is used for controlling the liquid crystal display panel according to the algorithm called by the hardware abstraction layer module based on the operation interface provided by the operation system module. According to the technical scheme provided by the embodiment of the invention, the hardware abstraction layer module is introduced into the liquid crystal display control system of the energy controller and is used for hiding specific implementation details of different liquid crystal display panels, the hardware abstraction layer module comprises a plurality of interface functions, each interface function correspondingly realizes the function of one liquid crystal display panel, so that the separation of specific hardware and software is realized, the phenomena of dead halt and breakdown of the system and the like are reduced, the implementation details of the liquid crystal display panel are prevented from being exposed, the rights of hardware manufacturers are protected, a unified interface is provided for the development of LCD application programs through the interactive protocol of the hardware abstraction layer module, and the unified management of the platform is realized.
Drawings
FIG. 1 is a block diagram of a liquid crystal display control system of an energy controller according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for controlling a liquid crystal display of an energy controller according to an embodiment of the present invention;
fig. 3 is a flowchart of another method for controlling a liquid crystal display of an energy controller according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
An embodiment of the present invention provides a liquid crystal display control system of an energy controller, and fig. 1 is a block diagram of a structure of a liquid crystal display control system of an energy controller according to an embodiment of the present invention, and referring to fig. 1, the control system includes:
an LCD application module 10, a hardware abstraction layer (Hardware Abstraction Layer, HAL) module, an LCD driver module 30, and an operating system module 40;
the hardware abstraction layer module 20 includes a plurality of interface functions, each of which is used for realizing a function of the liquid crystal display panel 50; the LCD driving module 30 includes a specific algorithm corresponding to each interface function;
the LCD application program module 10 is used for receiving a user driving instruction and calling an interface function in the hardware abstraction layer module 20 according to the user driving instruction, and the hardware abstraction layer module 20 is used for calling a concrete algorithm in the LCD driving module 30 according to the interface function called by the LCD application program module 10; the LCD driving module 30 is configured to control the LCD panel 50 according to the algorithm called by the hardware abstraction layer module 20 based on the operation interface provided by the operating system module 40.
Specifically, the LCD control system of the energy controller includes an LCD application module 10, where the LCD application module 10 can provide product functions for the energy controller, and based on the service requirement of the energy controller, the functions of the LCD application module 10 can be added, modified or cut. The LCD application module 10 is a computer program that operates in a user mode to interact with a user and has a visual user interface for performing one or more specific tasks. The LCD application module 10 may receive a user driving instruction, the LCD application module 10 is connected to the hardware abstraction layer module 20, and the LCD application module 10 may call an interface function in the hardware abstraction layer module 20 according to the received user driving instruction. The hardware abstraction layer module 20 includes a plurality of interface functions, and each interface function is correspondingly implemented to a function of the liquid crystal display panel 50. The hardware abstraction layer abstracts the LCD liquid crystal display panel 50 into a module, and represents the abstract logic of the HAL to the liquid crystal display panel 50 in the form of a C language structure, which realizes the call to the concrete device through a specific interface function. The hardware abstraction layer module 20 is presented as an LCD dynamic link library, which is a (· so) file that provides all the attributes and interface functions of the LCD liquid crystal display panel 50, including the attributes of the LCD liquid crystal display panel: version, author, release date, vendor code, open device and close device, etc. The hardware abstraction layer module 20 may call a specific algorithm in the LCD driver module 30 according to the interface function called by the LCD application module 10; the LCD driving module 30 is configured to control the LCD panel 50 according to the algorithm called by the hardware abstraction layer module 20 based on the operation interface provided by the operating system module 40.
The hardware abstraction layer module 20 is a package of kernel drivers for the operating system module 40, providing an interface upwards, masking implementation details of low-level drivers. That is, the support for the LCD panel 50 is divided into two layers, one layer is placed in the User Space (User Space) and one layer is placed in the Kernel Space (Kernel Space), where the hardware abstraction layer module 20 runs in the User Space and the Kernel driver layer program runs in the Kernel Space, and the LCD driver module 30 is a driver module in the Kernel driver layer, and the driving algorithm thereof implements the operation for the specific LCD panel 50, for example, may implement the drawing function of the screen content of the LCD display screen. If the hardware abstraction layer module 20 and the kernel driver layer are integrated together in the kernel space, it is possible from a technical implementation point of view, however, from a commercial point of view, placing the support logic for the hardware in the kernel space may compromise the benefits of the manufacturer. If all the code supported by the hardware is placed in the kernel driver layer, it means that the source code of the driver is disclosed when the product is released, and the disclosure of the source code means that the relevant parameters and implementation of the lcd panel 50 are disclosed, which is very damaging to the manufacturer. Thus, the embodiment of the present invention divides the support for the lcd panel 50 into a hardware abstraction layer module 20 and a kernel driver layer, which provides only simple access to hardware logic, such as a channel for reading and writing hardware registers, and logic about what value is read from the lcd panel 50 or what value is written to the lcd panel 50 can be placed in the hardware abstraction layer module 20, thus realizing the hiding of the trade secret.
The embodiment of the invention provides a liquid crystal display control system of an energy controller, which comprises: an LCD application module 10, a hardware abstraction layer module 20, an LCD driver module 30, and an operating system module 40; the hardware abstraction layer module 20 includes a plurality of interface functions, each of which is used for realizing a function of the liquid crystal display panel 50; the LCD driving module 30 includes a specific algorithm corresponding to each interface function; the LCD application program module 10 is used for receiving a user driving instruction and calling an interface function in the hardware abstraction layer module 20 according to the user driving instruction, and the hardware abstraction layer module 20 is used for calling a concrete algorithm in the LCD driving module 30 according to the interface function called by the LCD application program module 10; the LCD driving module 30 is configured to control the LCD panel 50 according to the algorithm called by the hardware abstraction layer module 20 based on the operation interface provided by the operating system module 40. According to the technical scheme provided by the embodiment of the invention, the hardware abstraction layer is introduced into the liquid crystal display control system of the energy controller and is used for hiding specific implementation details of different liquid crystal display panels 50, the hardware abstraction layer comprises a plurality of interface functions, each interface function correspondingly realizes a function of one liquid crystal display panel 50, so that separation of specific hardware and software is realized, phenomena of dead halt and breakdown of the system and the like are reduced, the implementation details of the liquid crystal display panel 50 are prevented from being exposed, the rights of hardware manufacturers are protected, a unified interface is provided for development of LCD application programs through an interactive protocol of the hardware abstraction layer, and the unified management of platformization is realized.
Optionally, the hardware abstraction layer module 20 includes a HAL framework and a HAL module architecture; wherein, the HAL framework is used for providing the core data structure definition and the external unified interface of the hardware abstraction layer module 20, and the HAL module framework is used for providing the HAL layer driving of various liquid crystal display panels 50; the HAL framework is also used to manage and use the HAL module architecture by dynamic loading to form different interface functions.
Specifically, the hardware abstraction layer module 20 is internally divided into two layers, namely a HAL framework and a HAL module architecture. The HAL framework is responsible for providing the core data structure definition of the HAL and the external unified interface. The HAL module provides HAL layer driving of various liquid crystal display panels 50. Wherein the HAL framework is provided by a shared library libhd.so; the file contains data structure definition and an external function interface; the HAL module architecture is provided in libhal_ < module id >. So; in addition, the HAL framework manages and uses the HAL module architecture through dynamic loading modes (dlopen, dysym, etc.).
Optionally, the liquid crystal display panel 50 includes an LCD display screen, and the LCD driving module 30 is configured to access the LCD display screen according to the algorithm called by the hardware abstraction layer, and manage a display area in the LCD display screen.
Specifically, the hardware abstraction layer module 20 includes a plurality of interface functions, each of which correspondingly implements a function of the liquid crystal display panel 50; the LCD driving module 30 includes a specific algorithm corresponding to each interface function. In an embodiment of the present invention, the liquid crystal display panel 50 includes an LCD display screen. Because of the control of the screen display for the LCD display screen, the HAL module architecture in the hardware abstraction layer module 20 is provided in libhal_lcd.so file; the document contains the relevant functions for manipulating the LCD display screen, i.e. the specific liquid crystal display panel 50. Therefore, the HAL framework in the hardware abstraction layer module 20 manages and uses the interface function formed by the HAL module architecture through dynamic loading (dlopen, dysym, etc.), and includes a related function for controlling the LCD display screen, that is, the specific LCD panel 50. After the LCD application module 10 receives the user driving instruction, for example, an update screen content instruction, the interface function for implementing data update in the hardware abstraction layer module 20 may be called according to the user driving instruction; the hardware abstraction layer module 20 is used for calling a specific algorithm for updating data in the LCD driving module 30 according to the interface function for updating data called by the LCD application program module 10; the LCD driving module 30 is used for accessing the LCD display screen according to the data updating algorithm called by the hardware abstraction layer module 20 and updating the display area in the LCD display screen. Optionally, the LCD driving module 30 further includes algorithms for other functions, such as setup of a display manufacturer, backlight control, screen reset, data forwarding, APP (application program) activation ID, and contrast setting.
Optionally, the display area in the LCD display screen includes at least one main interface and one active interface; the LCD driving module 30 is configured to support at least one active interface process and one main interface process simultaneously to draw the LCD display screen; the active interface process is used for drawing the active interface, and the main interface process is used for drawing the main interface.
Specifically, the LCD driving module 30 supports display area management, and the display area in the LCD display screen includes at least one main interface and one active interface. The resolution of the LCD display may be 160 x 160, the display depth 1, 1bit to represent 1 pixel, 1 black, and 0 white. 1 active display area can be set, and the active display area is an active interface. The LCD driver module 30 allows both the active interface process and the main interface process to simultaneously draw the LCD display. The active interface process is responsible for drawing an active display area; the main interface process is responsible for drawing the entire LCD display except the active display area. The whole LCD display screen outside the active display area is the main interface, and the range of the active display area can be set according to actual needs.
Optionally, the master interface process is a master process, and the active interface process is a slave process; and the content drawn by the main interface process on the main interface and the content drawn by the active interface process on the active interface are displayed simultaneously.
Specifically, the master interface process is a master process, the active interface process is a slave process, and the master interface process and the active interface process are in master-slave relationship. The content drawn by the main interface process is not immediately displayed on the LCD display screen, but the content of the main interface is displayed together with the content of the active interface when the screen is drawn by the active interface process. That is, the LCD display screen is presented such that the content drawn by the main interface process at the main interface is displayed simultaneously with the content drawn by the active interface process at the active interface. Each process has a unique process controller (Process Identification, PID) that can obtain the PID of the currently active interface process and the PID of the current master interface process. It is assigned by the process runtime system and does not represent a specialized process. The PID will not change during run-time, but will be recovered by the system after the process is terminated, and may be continued to be assigned to the newly running program.
Optionally, the main interface process includes a right to reset the LCD display, and the active interface process includes a right to turn on and/or off the LCD display backlight.
Specifically, different processes have different rights. It can be set that only the main interface process has authority to reset the LCD display; it may be provided that only the active interface process has the right to turn on and/or off the LCD display backlight. If the LCD display screen has drawn the screen content, resetting the LCD display screen can restore the whole LCD display screen to the initial state, and the screen content drawn last time is eliminated. The LCD display screen backlight is opened and/or closed only by setting the active interface process, so that the use of a customer can be facilitated, and the LCD display screen backlight is opened when the active display area is drawn by the active interface process.
Optionally, the operating system module 40 may include a Linux kernel 41 and a kernel mode driver 42, where the Linux kernel 41 and the kernel mode driver 42 are an open source operating system, and the Linux kernel 41 and the kernel mode driver 42 are used for providing an operation interface for initializing, reading, writing, controlling, etc. the specific LCD panel 50 for the LCD driving module 30, so as to control the LCD panel 50 according to an algorithm called by the hardware abstraction layer module 20.
In particular, the operating system is a low-level supporting software that interfaces with the hardware and provides a limited set of services for the user program. The hardware of the computer comprises peripheral devices, a processor, a memory, a hard disk and other electronic devices which form the engine of the computer. But without software to operate and control it, is not working on its own. The software that performs this control is called an operating system, which in Linux terminology is called a "kernel", and the Linux kernel 41 and kernel mode driver 42 provide basic functions of the operating system module 40, such as memory management, process management, network functions, file system and device driver framework.
The embodiment of the invention also provides a method for controlling the liquid crystal display of the energy controller, which is executed by the liquid crystal display control system of the energy controller in any embodiment, and is applied to data updating of an LCD display screen, and fig. 2 is a flowchart of the method for controlling the liquid crystal display of the energy controller, and referring to fig. 2, the method includes:
s110, the LCD application program module receives an instruction for updating the screen display content; and calling an interface function in the hardware abstraction layer module according to the instruction for updating the screen display content, and calling a concrete algorithm in the LCD driving module by the hardware abstraction layer module according to the interface function called by the LCD application program module.
In particular, an LCD application module is a computer program that operates in a user mode to interact with a user and has a visual user interface for performing a particular task or tasks. The LCD application program module can receive an update screen content instruction of a user, is connected with the hardware abstraction layer module and can call an interface function for updating data in the hardware abstraction layer module according to the received update screen content instruction. The hardware abstract layer module calls a data updating specific algorithm in the LCD driving module according to the interface function called by the LCD application program module, and the data updating is a main algorithm for realizing the screen content drawing of the LCD display screen.
S120, the LCD driving module judges whether the size of the update data requested by the user is larger than a preset minimum threshold value; if the screen content update command is larger than the screen content update command, the screen content update data and the screen content update data length are designated, and the screen content update start point position and the screen content update end point position are designated.
Specifically, receiving update request data input by a user, and judging whether the size of the update request data of the user is larger than a preset minimum threshold value by the LCD driving module; if the data is larger than the preset data, the user requests to update the data to meet the display data size of the LCD. After determining that the size of the update data requested by the user is larger than a preset minimum threshold, designating an update command, data and data length, wherein the update command and the data have a one-to-one correspondence, and the data has the characteristic of the data length. The data length specified here is the data length of the required update. After the update command, data and data length are specified, the start point position and end point position of the screen content update are also required to be specified. The start point position and the end point position of the specified screen content update can be understood as specifying a specific range of the update display area in advance. And designating a start point position and an end point position of screen content updating, wherein a rectangle with a connecting line of the start point and the end point as a diagonal line is the display area to be updated. The display area may be a display area of the active interface or a display area of the main interface.
S130, the LCD driving module calculates the updating starting point position and the ending point position of the screen content according to the size of the updating data requested by the user and the specification of the LCD display screen through an algorithm; and judging whether the calculated starting point position and the calculated ending point position have errors or not according to the designated starting point position and ending point position.
Specifically, if the calculated starting point position is the same as the specified starting point position, and the calculated ending point position is the same as the specified ending point position, the calculated starting point position and ending point position are described as being correct. If the calculated starting point position and the appointed starting point position are different, and/or the calculated ending point position and the appointed ending point position are different, the calculated starting point position and the calculated ending point position are indicated to be wrong.
S140, if no error exists, determining the calculated data length according to the calculated starting point position and ending point position; and judging whether the calculated data length is larger than the designated data length.
Specifically, after the calculated starting point position and the calculated ending point position are determined to be error-free, determining the calculated data length according to the calculated starting point position and the calculated ending point position; and comparing the calculated data length with the designated data length, and judging whether the calculated data length is larger than the designated data length.
And S150, if the data length is larger than the specified data length, replacing the calculated data length with the specified data length, and drawing the screen content by a main interface process or an active interface process through a control register.
Specifically, if the calculated data length is greater than the specified data length, it is indicated that the calculated data length is greater than the data length required to be updated, and the calculated data length is replaced by the specified data length to remove the redundant data length and retain the required data length. And after the calculated data length is replaced by the designated data length, the main interface process or the active interface process draws the screen content through the control register.
Optionally, the method further comprises:
if the calculated data length is smaller than the specified data length, the LCD driving module does not process.
Optionally, the method further comprises:
and if the size of the update data requested by the user is smaller than the preset minimum threshold value, the LCD driving module controls the LCD display screen to output error information.
The method further comprises the steps of:
if the calculated updated starting point position and the calculated updated ending point position are wrong, the LCD driving module controls the LCD display screen to output error information.
Fig. 3 is a flowchart of another method for controlling a liquid crystal display of an energy controller according to an embodiment of the present invention, and referring to the drawings, the method includes:
s210, the LCD application program module receives an instruction for updating the screen display content; and calling an interface function in the hardware abstraction layer module according to the instruction for updating the screen display content, and calling a concrete algorithm in the LCD driving module by the hardware abstraction layer module according to the interface function called by the LCD application program module.
S220, the LCD driving module judges whether the size of the update data requested by the user is larger than a preset minimum threshold value; if yes, executing step S240; if so, step 230 is performed.
S230, the LCD driving module controls the LCD display screen to output error information.
S240, designating an update command, data and data length, and designating a start point position and an end point position of screen content update; the LCD driving module calculates the updating starting point position and the ending point position of the screen content according to the size of the updating data requested by the user and the specification of the LCD display screen through an algorithm.
S250, judging whether the calculated starting point position and the calculated ending point position are wrong or not according to the designated starting point position and ending point position; if no, executing step S270; if there is an error, step 260 is performed.
S260, the LCD driving module controls the LCD display screen to output error information.
S270, determining the calculated data length according to the calculated starting point position and ending point position.
S280, judging whether the calculated data length is larger than the designated data length; if yes, go to step S2100; if so, step S290 is performed.
S290, the LCD driving module does not process.
And S2100, replacing the calculated data length with a specified data length, and drawing the screen content by a main interface process or an active interface process through a control register.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (10)

1. A liquid crystal display control method of an energy controller, which is executed by a liquid crystal display control system of the energy controller and is applied to data update of an LCD display screen, characterized in that the liquid crystal display control system of the energy controller comprises: an LCD application module, a hardware abstraction layer module, an LCD driver module and an operating system module; the hardware abstraction layer module comprises a plurality of interface functions, and each interface function correspondingly realizes the function of a liquid crystal display panel; the LCD driving module comprises a specific algorithm corresponding to each interface function; the LCD application program module is used for receiving a user driving instruction and calling an interface function in the hardware abstraction layer module according to the user driving instruction, and the hardware abstraction layer module is used for calling a concrete algorithm in the LCD driving module according to the interface function called by the LCD application program module; the LCD driving module is used for controlling the liquid crystal display panel according to the algorithm called by the hardware abstraction layer module based on the operation interface provided by the operation system module; the liquid crystal display control method of the energy controller comprises the following steps:
the LCD application program module receives an instruction for updating the content of the screen display; calling an interface function in a hardware abstraction layer module according to the screen display content updating instruction, wherein the hardware abstraction layer module calls a concrete algorithm in an LCD driving module according to the interface function called by the LCD application program module;
the LCD driving module judges whether the size of the update data requested by the user is larger than a preset minimum threshold value;
if the screen content is larger than the initial point position, the initial point position and the end point position of the screen content updating are designated, the updating command, the data and the data length are designated;
the LCD driving module calculates the updating starting point position and the updating ending point position of the screen content according to the size of the updating data requested by the user and the specification of the LCD display screen through an algorithm; judging whether the calculated starting point position and the calculated ending point position are wrong or not according to the designated starting point position and ending point position;
if no error exists, determining the calculated data length according to the calculated starting point position and ending point position;
judging whether the calculated data length is larger than the designated data length;
if the data length is larger than the specified data length, replacing the calculated data length with the specified data length, and drawing the screen content by the main interface process or the active interface process through the control register.
2. The method of controlling a liquid crystal display of an energy controller according to claim 1, further comprising:
if the calculated data length is smaller than the specified data length, the LCD driving module does not process.
3. The method of controlling a liquid crystal display of an energy controller according to claim 1, further comprising:
if the size of the update data requested by the user is smaller than a preset minimum threshold value, the LCD driving module controls the LCD display screen to output error information;
the method further comprises the steps of:
if the calculated updated starting point position and the calculated updated ending point position are wrong, the LCD driving module controls the LCD display screen to output error information.
4. A liquid crystal display control system of an energy controller, characterized by being configured to execute the liquid crystal display control method of an energy controller according to any one of claims 1 to 3, comprising:
an LCD application module, a hardware abstraction layer module, an LCD driver module and an operating system module;
the hardware abstraction layer module comprises a plurality of interface functions, and each interface function correspondingly realizes the function of a liquid crystal display panel; the LCD driving module comprises a specific algorithm corresponding to each interface function;
the LCD application program module is used for receiving a user driving instruction and calling an interface function in the hardware abstraction layer module according to the user driving instruction, and the hardware abstraction layer module is used for calling a concrete algorithm in the LCD driving module according to the interface function called by the LCD application program module; the LCD driving module is used for controlling the liquid crystal display panel according to the algorithm called by the hardware abstraction layer module based on the operation interface provided by the operation system module.
5. The energy controller of claim 4, wherein the hardware abstraction layer module comprises a HAL framework and a HAL module architecture; the HAL framework is used for providing core data structure definition and external unified interfaces of the hardware abstraction layer module, and the HAL module framework is used for providing HAL layer driving of various liquid crystal display panels; the HAL framework is also used to manage and use the HAL module architecture by dynamic loading to form the different interface functions.
6. The energy controller of claim 4, wherein the liquid crystal display panel comprises an LCD display screen, the LCD driver module is configured to access the LCD display screen according to the algorithm invoked by the hardware abstraction layer module, and manage a display area in the LCD display screen.
7. The energy controller of claim 6, wherein the display area in the LCD display screen comprises at least one main interface and one active interface; the LCD driving module is used for simultaneously supporting at least one active interface process and one main interface process to draw the LCD display screen; the active interface process is used for drawing the active interface, and the main interface process is used for drawing the main interface.
8. The energy controller lcd control system of claim 7, wherein the master interface process is a master process and the active interface process is a slave process; and the content drawn by the main interface process on the main interface and the content drawn by the active interface process on the active interface are displayed simultaneously.
9. The energy controller of claim 8, wherein the main interface process includes a right to reset the LCD display, and the active interface process includes a right to turn on and/or off the LCD display backlight.
10. The energy controller of claim 4, wherein the operating system module comprises a Linux kernel and kernel mode driver for providing an operating interface for initializing, reading, writing and controlling a specific lcd panel.
CN202011607227.4A 2020-12-30 2020-12-30 LCD (liquid crystal display) control system and method for energy controller Active CN112631536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011607227.4A CN112631536B (en) 2020-12-30 2020-12-30 LCD (liquid crystal display) control system and method for energy controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011607227.4A CN112631536B (en) 2020-12-30 2020-12-30 LCD (liquid crystal display) control system and method for energy controller

Publications (2)

Publication Number Publication Date
CN112631536A CN112631536A (en) 2021-04-09
CN112631536B true CN112631536B (en) 2024-03-15

Family

ID=75286540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011607227.4A Active CN112631536B (en) 2020-12-30 2020-12-30 LCD (liquid crystal display) control system and method for energy controller

Country Status (1)

Country Link
CN (1) CN112631536B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114020659A (en) * 2021-10-29 2022-02-08 浙江万胜智能科技股份有限公司 Energy controller system based on application layer driving liquid crystal display
CN114546513A (en) * 2022-01-04 2022-05-27 合肥杰发科技有限公司 Display method and display system based on operating system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106058A (en) * 2013-01-25 2013-05-15 Tcl集团股份有限公司 Double-screen display method and intelligent display terminal based on android platform
CN103390397A (en) * 2013-07-24 2013-11-13 福州瑞芯微电子有限公司 Double screen display device and method based on Android system
CN103986957A (en) * 2011-12-30 2014-08-13 南阳首控光电有限公司 Laser smart television
CN104216709A (en) * 2014-08-20 2014-12-17 深圳光启创新技术有限公司 Method and module for directly controlling hardware equipment in operating system
KR20170073750A (en) * 2015-12-18 2017-06-29 (주)엠에스쎌텍 test equipment of Display Module

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986957A (en) * 2011-12-30 2014-08-13 南阳首控光电有限公司 Laser smart television
CN103106058A (en) * 2013-01-25 2013-05-15 Tcl集团股份有限公司 Double-screen display method and intelligent display terminal based on android platform
CN103390397A (en) * 2013-07-24 2013-11-13 福州瑞芯微电子有限公司 Double screen display device and method based on Android system
CN104216709A (en) * 2014-08-20 2014-12-17 深圳光启创新技术有限公司 Method and module for directly controlling hardware equipment in operating system
KR20170073750A (en) * 2015-12-18 2017-06-29 (주)엠에스쎌텍 test equipment of Display Module

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于SEP3203嵌入式微处理器的图形库实现;王玺;电子器件;20080415;第31卷(第02期);558-563 *

Also Published As

Publication number Publication date
CN112631536A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN112631536B (en) LCD (liquid crystal display) control system and method for energy controller
JP3659062B2 (en) Computer system
US8793676B2 (en) Version-resilient loader for custom code runtimes
US5903728A (en) Plug-in control including an independent plug-in process
JP5699500B2 (en) Installation program, installation method, image forming apparatus, and recording medium
CN104137056A (en) Instruction-set support for invocation of vmm-configured services without vmm intervention
JP5270330B2 (en) Multicore microcomputer system simulation method and simulation apparatus
EP1162536A1 (en) Multiple operating system control method
US20130232493A1 (en) Virtual computer control apparatus, virtual computer control method, virtual computer control program, and integrated circuit
CN113672263B (en) Firmware parameter updating control method and device and electronic equipment
JPH1021094A (en) Real-time control system
CN113448643B (en) Configuration data management system and method
CN104137074A (en) Optimization of resource usage in a multi-environment computing system
US6052743A (en) Buffer object for performing buffered data transfers in a data acquisition system
US20040153580A1 (en) Component based operation system dynamic device drive method
CN116225527A (en) Embedded system
CN114265573B (en) Sound effect control method and system and central control vehicle
CN112540777A (en) Method and terminal for supporting dynamic read-write of NV (network video) parameters
CN113032248A (en) Application debugging method and device of android system, storage medium and electronic equipment
JP7375643B2 (en) In-vehicle information processing device, control method and computer program
US20110041134A1 (en) Pluggable component interface
KR101077832B1 (en) Built-In User Interface embodiment method for co-processor
CN117472434A (en) Image processing method and device of intelligent device, computer device and storage medium
CN117950646A (en) Software development method, device, computer equipment, storage medium and program product
JPH09114557A (en) Information processor and power management function calling method for the processor

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
GR01 Patent grant
GR01 Patent grant