CN111880941A - Method and device for multiplexing GPIO, computer equipment and storage medium - Google Patents

Method and device for multiplexing GPIO, computer equipment and storage medium Download PDF

Info

Publication number
CN111880941A
CN111880941A CN202010760094.8A CN202010760094A CN111880941A CN 111880941 A CN111880941 A CN 111880941A CN 202010760094 A CN202010760094 A CN 202010760094A CN 111880941 A CN111880941 A CN 111880941A
Authority
CN
China
Prior art keywords
gpio
time
priority
current
attribute
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
Application number
CN202010760094.8A
Other languages
Chinese (zh)
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.)
Shenzhen Xinguodu Tech Co Ltd
Original Assignee
Shenzhen Xinguodu Tech 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 Shenzhen Xinguodu Tech Co Ltd filed Critical Shenzhen Xinguodu Tech Co Ltd
Priority to CN202010760094.8A priority Critical patent/CN111880941A/en
Publication of CN111880941A publication Critical patent/CN111880941A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Power Sources (AREA)

Abstract

The invention discloses a method and a device for multiplexing GPIO, computer equipment and a storage medium, wherein the method comprises the following steps: when the time division multiplexing GPIO is used, a mutual exclusion mechanism is adopted to operate the time division multiplexing GPIO, wherein the mutual exclusion mechanism is as follows: if one device uses the time division multiplexing GPIO, the other device returns failure until the current device releases resources; when the priority preemptive GPIO is used, a priority mechanism is adopted to operate the priority preemptive GPIO, and the priority mechanism is as follows: if the device with high priority uses the priority preemption type GPIO, the device with low priority returns failure until the device with high priority releases resources; when the time-limited recovery type GPIO is used, operating the time-limited recovery type GPIO by adopting an overtime detection mechanism, wherein the overtime detection mechanism is as follows: and when the appointed time arrives, restoring the time-limited recovery type GPIO to a default state. The invention improves the reliability and effectiveness in the GPIO multiplexing process.

Description

Method and device for multiplexing GPIO, computer equipment and storage medium
Technical Field
The invention relates to the technical field of GPIO software processing, in particular to a method and a device for multiplexing GPIO, computer equipment and a storage medium.
Background
In some devices, such as POS devices, hardware design is rarely performed in a GPIO multiplexing manner, and a set of specialized and general-purpose software design logic is not used to ensure the effectiveness and reliability of hardware multiplexing, if any.
At present, a common software design method is usually realized only by adopting the simplest method, for example, when multiplexing equipment needs to use multiplexing GPIO, the attribute of the GPIO is immediately modified, and then the GPIO is read and written.
The prior art has the following defects: 1. the reliability is low, and under the condition that some devices have high requirements on the GPIO time sequence, the accuracy of the time sequence cannot be ensured through software operation control. In addition, when two devices sharing GPIO are irregularly called by two different tasks (threads) in a multitask (thread) system, the timing sequence of GPIO may be disordered and cannot be controlled. 2. The service logic of the software is designed with the constraint last time, and the constraint of the multiplexing management logic is not provided, so that the GPIO multiplexing characteristic of the bottom software must be considered when the upper application software carries out the software design, and the complete hierarchical design between the application and the driver cannot be realized.
Disclosure of Invention
The embodiment of the invention provides a method and a device for multiplexing GPIO, computer equipment and a storage medium, aiming at improving the reliability and effectiveness in the GPIO multiplexing process.
The embodiment of the invention provides a method for multiplexing GPIO, which comprises the following steps:
pre-classifying the GPIOs according to the multiplexing function to obtain a time-sharing multiplexing GPIO, a priority preemption GPIO and a time-limited recovery GPIO;
when the time division multiplexing GPIO is used, a mutual exclusion mechanism is adopted to operate the time division multiplexing GPIO, wherein the mutual exclusion mechanism is as follows: if one device uses the time division multiplexing GPIO, the other device returns failure until the current device releases resources;
when the priority preemptive GPIO is used, a priority mechanism is adopted to operate the priority preemptive GPIO, and the priority mechanism is as follows: if the device with high priority uses the priority preemption type GPIO, the device with low priority returns failure until the device with high priority releases resources;
when the time-limited recovery type GPIO is used, operating the time-limited recovery type GPIO by adopting a timeout detection mechanism, wherein the timeout detection mechanism is as follows: and when the appointed time arrives, restoring the time-limited recovery type GPIO to a default state.
Preferably, when the time-division multiplexing GPIO is used, a mutual exclusion mechanism is used to operate the time-division multiplexing GPIO, where the mutual exclusion mechanism is: if a device is using the time division multiplexing GPIO, another device returns failure until the current device releases resources, comprising:
when an opening instruction of the current device to the time division multiplexing GPIO is received, judging whether a mark of the time division multiplexing GPIO is idle, if so, configuring the attribute of the time division multiplexing GPIO as an input attribute, and updating the mark of the time division multiplexing GPIO to be the device number of the current device;
when a closing instruction of the current equipment to the time division multiplexing GPIO is received, judging whether the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment or not, if so, configuring the attribute of the time division multiplexing GPIO as an initial attribute, and updating the mark of the time division multiplexing GPIO to be idle;
when a reading instruction of the current equipment to the time division multiplexing GPIO is received, judging whether the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment or not, and if so, acquiring the attribute of the time division multiplexing GPIO;
and when a write-in instruction of the current equipment to the time division multiplexing GPIO is received, judging whether the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment, and if so, setting the attribute of the time division multiplexing GPIO.
Preferably, when the priority preemptive GPIO is used, a priority mechanism is used to operate the priority preemptive GPIO, where the priority mechanism is: if the device with high priority is using the priority preemption type GPIO, returning the operation of the device with low priority to failure until the device with high priority releases resources, comprising the following steps:
when an opening instruction of the current equipment to the priority preemption type GPIO is received, writing an equipment number, a priority and an input attribute of the current equipment into an attribute list of the priority preemption type GPIO to form a record of the current equipment;
when a closing instruction of the current equipment to the priority preemption type GPIO is received, deleting the record of the current equipment in the attribute list of the priority preemption type GPIO;
when a reading instruction of the current equipment to the priority preemption type GPIO is received, inquiring whether a record of the current equipment exists in an attribute list of the priority preemption type GPIO, if so, judging whether the priority of the current equipment is the highest priority of all the equipment in the attribute list, and if so, configuring the attribute of the priority preemption type GPIO according to the record of the current equipment and performing reading operation;
when a write-in instruction of the current equipment to the priority preemption type GPIO is received, inquiring whether the record of the current equipment exists in an attribute list of the priority preemption type GPIO, if so, judging whether the priority of the current equipment is the highest priority of all the equipment in the attribute list, and if so, configuring the attribute of the priority preemption type GPIO according to the record of the current equipment and performing write operation.
Preferably, when the time-limited recovery GPIO is used, a timeout detection mechanism is used to operate the time-limited recovery GPIO, where the timeout detection mechanism is: when the appointed time arrives, the time-limited recovery type GPIO is recovered to a default state, and the method comprises the following steps:
when an opening instruction of the current equipment to the time-limited recovery type GPIO is received, writing an equipment number, an input attribute and a recovery attribute after timeout of the current equipment into an attribute list of the time-limited recovery type GPIO to form a record of the current equipment;
when a closing instruction of the current equipment to the time-limited recovery type GPIO is received, deleting the record of the current equipment in the attribute list of the time-limited recovery type GPIO;
when a reading instruction of the current device to the time-limited recovery type GPIO is received, inquiring whether a record of the current device exists in an attribute list of the time-limited recovery type GPIO, if so, configuring the attribute of the time-limited recovery type GPIO according to the record of the current device, and performing reading operation;
and when a write-in instruction of the current device to the time-limited recovery GPIO is received, inquiring whether the record of the current device exists in the attribute list of the time-limited recovery GPIO, if so, configuring the attribute of the time-limited recovery GPIO according to the record of the current device, and performing write operation.
Preferably, when a reading instruction of the time-limited recovery type GPIO by the current device is received, querying whether there is a record of the current device in the attribute list of the time-limited recovery type GPIO, if so, configuring the attribute of the time-limited recovery type GPIO according to the record of the current device, and performing a reading operation, including: judging whether the equipment number of the current equipment is a recovery equipment number or not, and starting a timer if the equipment number of the current equipment is not the recovery equipment number;
when a write-in instruction of the current device to the time-limited recovery type GPIO is received, whether a record of the current device exists is inquired in an attribute list of the time-limited recovery type GPIO, if yes, the attribute of the time-limited recovery type GPIO is configured according to the record of the current device, and write operation is carried out, wherein the write-in instruction comprises the following steps: and judging whether the equipment number of the current equipment is the recovery equipment number or not, and starting a timer if the equipment number of the current equipment is not the recovery equipment number.
Preferably, when the time-limited recovery GPIO is used, a timeout detection mechanism is used to operate the time-limited recovery GPIO, where the timeout detection mechanism is: when the appointed time arrives, the time-limited recovery type GPIO is recovered to a default state, and the method further comprises the following steps:
and periodically detecting whether the timer is overtime, and if so, recovering the attribute of the time-limited recovery type GPIO to the recovered attribute after the time is overtime.
Preferably, when receiving a closing instruction of the current device to the priority preemptive GPIO, deleting the record of the current device from the attribute list of the priority preemptive GPIO includes: and configuring the attribute of the priority preemptive GPIO according to the record of the device with the highest priority in the attribute list of the priority preemptive GPIO.
The embodiment of the invention provides a device for multiplexing GPIO, which comprises:
the classification unit is used for classifying the GPIOs according to the multiplexing function in advance to obtain a time-sharing multiplexing type GPIO, a priority preemptive type GPIO and a time-limited recovery type GPIO;
a time division multiplexing unit, configured to, when the time division multiplexing GPIO is used, operate the time division multiplexing GPIO using a mutual exclusion mechanism, where the mutual exclusion mechanism is: if one device uses the time division multiplexing GPIO, the other device returns failure until the current device releases resources;
a priority preemption unit, configured to, when using the priority preemption type GPIO, operate the priority preemption type GPIO by using a priority mechanism, where the priority mechanism is: if the device with high priority uses the priority preemption type GPIO, the device with low priority returns failure until the device with high priority releases resources;
and the time-limited recovery unit is used for operating the time-limited recovery type GPIO by adopting a timeout detection mechanism when the time-limited recovery type GPIO is used, wherein the timeout detection mechanism is as follows: and when the appointed time arrives, restoring the time-limited recovery type GPIO to a default state.
An embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for multiplexing GPIOs as described above when executing the computer program.
An embodiment of the present invention provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the processor is caused to execute the method for multiplexing GPIOs as described above.
The embodiment of the invention provides a method and a device for multiplexing GPIO, computer equipment and a storage medium, wherein the method comprises the following steps: pre-classifying the GPIOs according to the multiplexing function to obtain a time-sharing multiplexing GPIO, a priority preemption GPIO and a time-limited recovery GPIO; when the time division multiplexing GPIO is used, a mutual exclusion mechanism is adopted to operate the time division multiplexing GPIO, wherein the mutual exclusion mechanism is as follows: if one device uses the time division multiplexing GPIO, the other device returns failure until the current device releases resources; when the priority preemptive GPIO is used, a priority mechanism is adopted to operate the priority preemptive GPIO, and the priority mechanism is as follows: if the device with high priority uses the priority preemption type GPIO, the device with low priority returns failure until the device with high priority releases resources; when the time-limited recovery type GPIO is used, operating the time-limited recovery type GPIO by adopting a timeout detection mechanism, wherein the timeout detection mechanism is as follows: and when the appointed time arrives, restoring the time-limited recovery type GPIO to a default state. The method improves the reliability and effectiveness in the GPIO multiplexing process.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for multiplexing GPIOs according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a device for multiplexing GPIOs according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for multiplexing GPIO according to an embodiment of the present invention, where the method includes steps S101 to S104:
s101, classifying the GPIOs according to multiplexing functions in advance to obtain a time-sharing multiplexing GPIO, a priority preemptive GPIO and a time-limited recovery GPIO;
s102, when the time division multiplexing GPIO is used, a mutual exclusion mechanism is adopted to operate the time division multiplexing GPIO, and the mutual exclusion mechanism is as follows: if one device uses the time division multiplexing GPIO, the other device returns failure until the current device releases resources;
s103, when the priority preemptive GPIO is used, a priority mechanism is adopted to operate the priority preemptive GPIO, and the priority mechanism is as follows: if the device with high priority uses the priority preemption type GPIO, the device with low priority returns failure until the device with high priority releases resources;
s104, when the time-limited recovery type GPIO is used, operating the time-limited recovery type GPIO by adopting a timeout detection mechanism, wherein the timeout detection mechanism is as follows: and when the appointed time arrives, restoring the time-limited recovery type GPIO to a default state.
In the embodiment of the invention, GPIOs are firstly classified according to requirements to obtain GPIOs of three multiplexing types: time division multiplexing GPIO, priority preemption GPIO and time-limited recovery GPIO. And the corresponding GPIO function is realized according to different mechanisms. The invention can effectively ensure the coordinated use of multiplexing GPIO by multiple devices in a multitask parallel system, and improve the stability and reliability of the system. In a complex software system, when software is designed hierarchically, application programs can be developed completely and independently, and the design is not constrained by the requirement of bottom time sequence, so that the multiplexing effectiveness is improved.
In one embodiment, the time-division multiplexing GPIO may be the PD5 pin, which may be multiplexed by the printer and the display device, and there is no need for both devices to be turned on simultaneously. The time-sharing multiplexing GPIO can also be a pin of PC1, PC3, PC4 or PC5, and can be multiplexed by a printer and a touch screen device, and the two devices do not need to be opened at the same time.
The priority preemption type GPIO can be a PA4 pin or a PD4 pin. Among them, the PA4 pin is a charging state multiplexing of the printer heating apparatus and the charging management, the charging management is performed in multitasking, and the charging management is also required at the time of printing, so that there is a case where two apparatuses compete. The PD4 pin is used for multiplexing the printer and the display device, and after the printer is turned on, an inevitable application program calls a display interface, and the printer should be preferentially used at the moment.
The time-limited recovery type GPIO can be a PA5 pin or a PC10 pin. The PA5 pin can be reused by the wireless power supply enable/disable control device and the printing latch device, and is characterized in that the power of the module is cut off when the enable/disable control of the wireless power supply keeps low level for more than 500 ms. The PC10 pin can be multiplexed by a key input device with a charge enabling device that is active for levels above 100ms through an RC circuit. Therefore, the charge enabling state can be recovered in time only by the key scanning program.
In one embodiment, the step S102 includes steps S201 to S204:
s201, when an opening instruction of the time division multiplexing GPIO from the current equipment is received, judging whether a mark of the time division multiplexing GPIO is idle, if so, configuring the attribute of the time division multiplexing GPIO as an input attribute, and updating the mark of the time division multiplexing GPIO as the equipment number of the current equipment;
for the time-division multiplexing GPIO, the time-division multiplexing GPIO driver may be packaged as hil _ repeatgpio _ open, hil _ repeatgpio _ close, hil _ repeatgpio _ read, hil _ repeatgpio _ write four interfaces (functions), and parameters of the functions may include a device number (i.e., the device number of the current device), a GPIO number (i.e., the number of the GPIO that needs to be operated), and a set attribute (the set attribute may also be referred to as an attribute of an input, the same below), where the set attribute is only needed by hil _ repeatgpio _ open. In the software implementation principle, in order to distinguish the same GPIO in the mixed operation among multiple devices, multiple devices need to be numbered uniformly. If the PD4 pin is multiplexed with a display (i.e., display device) by the printer, the device number of the printer is defined as 0x01, and the device number of the display is 0x 02.
The function of the hil _ repeatgpio _ open function is to open the time division multiplexed GPIO.
Specifically, when an opening instruction of the current device to the time division multiplexing GPIO is received, it is first determined whether a Flag (Flag value) corresponding to the time division multiplexing GPIO that needs to be opened is idle (i.e., is 0). If not, ending the operation and returning to GPIO busy; if the current state is equal to the idle state, hil _ GPIO _ open function is called to configure the time division multiplexing GPIO, namely the time division multiplexing GPIO is configured according to the set attribute, Flag is assigned to be the device number of the device which is transmitted in, and then operation success is returned.
S202, when a closing instruction of the time division multiplexing GPIO from the current equipment is received, judging whether the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment, if so, configuring the attribute of the time division multiplexing GPIO as an initial attribute, and updating the mark of the time division multiplexing GPIO to be idle;
the function of the hil _ repeatgpio _ close function is to turn off the time division multiplexing GPIO.
Specifically, when a closing instruction of the current device to the time division multiplexing GPIO is received, it is first determined whether a Flag (Flag value) corresponding to the time division multiplexing GPIO that needs to be closed is equal to the device number of the current device. If the GPIO is not equal to the preset time division multiplexing GPIO, the time division multiplexing GPIO is not turned on by the current device, no operation is needed, and the operation is returned to be successful. If equal, it means that the time-multiplexed GPIO has been opened by the current device, indicating that it can be operated, so the hil _ GPIO _ close function can be invoked to configure the time-multiplexed GPIO (i.e. to an initial attribute, e.g. to a high impedance input state) and to assign Flag to idle (i.e. to 0), and then operation success is returned.
S203, when a reading instruction of the current device to the time division multiplexing GPIO is received, judging whether the mark of the time division multiplexing GPIO is equal to the device number of the current device, if so, acquiring the attribute of the time division multiplexing GPIO;
the function of the hil _ repeatgpio _ read function is to obtain the attributes of the time-multiplexed GPIO.
Specifically, when a reading instruction of the current device for the time division multiplexing GPIO is received, whether the mark of the time division multiplexing GPIO is equal to the device number of the current device or not is judged, if not, the time division multiplexing GPIO is indicated to be not allowed to be operated by the current device, and the operation is returned to fail; if so, it means that the time-division multiplexing GPIO is turned on by the current device, so the attribute of the time-division multiplexing GPIO can be acquired, for example, the hil _ GPIO _ read function is called to acquire the attribute of the time-division multiplexing GPIO.
S204, when a write-in instruction of the current equipment to the time division multiplexing GPIO is received, judging whether the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment, and if so, setting the attribute of the time division multiplexing GPIO.
The function of the hil _ repeatgpio _ write function is to set the attribute of the time division multiplexing type GPIO.
Specifically, when a write-in instruction of the current device to the time division multiplexing GPIO is received, whether the mark of the time division multiplexing GPIO is equal to the device number of the current device or not is judged, if not, the time division multiplexing GPIO is indicated to be not allowed to be operated by the current device, and the operation is returned to fail; if so, indicating that the time-multiplexed GPIO is turned on by the current device, the attribute of the time-multiplexed GPIO may be set, e.g., calling hil _ GPIO _ write function to set the attribute of the time-multiplexed GPIO.
The hil _ GPIO _ open, hil _ GPIO _ close, hil _ GPIO _ read, and hil _ GPIO _ write functions are all functions provided in the GPIO library function, and the following embodiments can all use these functions to implement corresponding functions.
In one embodiment, the step S103 includes:
s301, when an opening instruction of the prior preemptive GPIO from the current equipment is received, writing the equipment number, the priority (namely the priority of the current equipment) and the input attribute of the current equipment into the attribute list of the prior preemptive GPIO to form a record of the current equipment;
for the priority preemptive GPIO, the priority preemptive GPIO driver may be encapsulated as hil _ priorgpio _ open, hil _ priorgpio _ close, hil _ priorgpio _ read, hil _ priorgpio _ write four interfaces (functions), and the parameters of the functions may include device number, GPIO number, attributes of the input, and priority. Wherein the input attributes and priorities are only required by hil _ priorgpio _ open.
The function of hil _ priorgio _ open is to turn on the priority preemptive GPIO.
Specifically, when an opening instruction of the current device to the priority preemption type GPIO is received, the index number corresponding to the priority preemption type GPIO in the priority preemption list may be searched first. Inquiring whether the attribute list of the priority preemptive GPIO is occupied by the current equipment or not according to the index number, and if so, updating the attribute input by the current equipment into the corresponding attribute list item; if the current device is not occupied, finding an unused attribute list item, and recording the device number of the current device and the input attribute.
S302, when a closing instruction of the prior preemptive GPIO from the current equipment is received, deleting the record of the current equipment in an attribute list of the prior preemptive GPIO;
the function of hil _ priorgio _ close function is to turn off the priority preemptive GPIO.
Specifically, when a closing instruction of the current device to the priority preemption type GPIO is received, the index number corresponding to the priority preemption type GPIO in the priority preemption list may be searched first. And inquiring whether the attribute list of the priority preemptive GPIO is occupied by the current equipment or not according to the index number, and if so, deleting the record of the current equipment in the attribute list of the priority preemptive GPIO.
When a closing instruction of the current device to the priority preemption type GPIO is received, deleting the record of the current device in the attribute list of the priority preemption type GPIO, wherein the record comprises the following steps: and configuring the attribute of the priority preemptive GPIO according to the record of the device with the highest priority in the attribute list of the priority preemptive GPIO. The step is that after the record of the current device is deleted, the attribute of the priority preemption type GPIO needs to be restored to the configuration of the device with the highest priority in the current record.
S303, when a reading instruction of the prior preemption type GPIO from the current equipment is received, inquiring whether the attribute list of the prior preemption type GPIO has a record of the current equipment, if so, judging whether the priority of the current equipment is the highest priority of all the equipment in the attribute list, if so, configuring the attribute of the prior preemption type GPIO according to the record of the current equipment, and reading;
the function of hil _ priorgio _ read function is to read the attributes of the priority preemptive GPIO.
Specifically, when a reading instruction of the current device to the priority preemption type GPIO is received, the index number corresponding to the priority preemption type GPIO in the priority preemption list may be searched first. Inquiring whether the attribute list of the priority preemptive GPIO has a record of the current equipment according to the index number, if no record indicates that the equipment is not opened, the equipment cannot be used; if yes, the priority of the current device is obtained, whether the priority of the current device is the highest priority of all the devices in the attribute list is judged, if the priority of the current device is the highest priority, the GPIO attribute is modified according to the configuration information (namely the record of the current device) when the current device is opened, and the priority preemption type GPIO is read and operated.
S304, when a write-in instruction of the current equipment to the priority preemption type GPIO is received, inquiring whether the record of the current equipment exists in the attribute list of the priority preemption type GPIO, if so, judging whether the priority of the current equipment is the highest priority of all the equipment in the attribute list, and if so, configuring the attribute of the priority preemption type GPIO according to the record of the current equipment and performing write operation.
The function of hil _ priorgio _ write function is to write the attributes of the priority preemptive GPIO.
Specifically, when a write instruction of the current device to the priority preemption type GPIO is received, the index number corresponding to the priority preemption type GPIO in the priority preemption list may be searched first. Inquiring whether the attribute list of the priority preemptive GPIO has a record of the current equipment according to the index number, if no record indicates that the equipment is not opened, the equipment cannot be used; if yes, acquiring the priority of the current equipment, judging whether the priority of the current equipment is the highest priority of all the equipment in the attribute list, if so, modifying the attribute of the GPIO according to the configuration information when the current equipment is opened, and writing and operating the priority preemptive GPIO.
In the operation process of the priority preemptive GPIO, because the high-priority device can preempt the priority preemptive GPIO of the low-priority device, before the low-priority device starts to operate the priority preemptive GPIO, the mutual exclusion lock protection needs to be started, and after the operation is finished, the mutual exclusion lock is released immediately.
In one embodiment, the step S104 includes:
s401, when an opening instruction of the current equipment to the time-limited recovery type GPIO is received, writing an equipment number, an input attribute and a recovery attribute after timeout of the current equipment into an attribute list of the time-limited recovery type GPIO to form a record of the current equipment;
for the time-limited recovery GPIO, the time-limited recovery GPIO driver may be packaged as five interfaces (functions) of hil _ timergpio _ open, hil _ timergpio _ close, hil _ timergpio _ read, hil _ timergpio _ write, hil _ timergpio _ check, and parameters of the functions may include a device number, a GPIO number, and an input attribute, which is only required for hil _ timergpio _ open, and a recovery attribute after timeout.
The function of the hil _ timergpio _ open function is to turn on the time-limited recovery GPIO.
Specifically, when an instruction to open the time-limited recovery GPIO by the current device is received, the index number corresponding to the time-limited recovery GPIO in the time-limited recovery list may be searched first. Inquiring whether the attribute list of the time-limited recovery GPIO is written with the device number and the attribute of the current device or not according to the index number, and if so, updating the attribute input by the current device into the corresponding attribute list item; if the current device is not occupied, finding an unused attribute list item, and recording the device number of the current device and the input attribute.
S402, when a closing instruction of the current equipment to the time-limited recovery type GPIO is received, deleting the record of the current equipment in an attribute list of the time-limited recovery type GPIO;
the function of the hil _ timergpio _ close function is to turn off the time-limited recovery GPIO.
Specifically, when a closing instruction of the current device to the time-limited recovery type GPIO is received, the index number corresponding to the time-limited recovery type GPIO in the time-limited recovery list may be searched first. And inquiring whether the attribute list of the time-limited recovery type GPIO is occupied by the current equipment or not according to the index number, and if so, deleting the record of the current equipment in the attribute list of the time-limited recovery type GPIO. In addition, after the record of the current device is deleted, the time-limited recovery type GPIO can be restored to a default state, and the previously started timer is deleted.
S403, when a reading instruction of the time-limited recovery GPIO from the current device is received, inquiring whether the attribute list of the time-limited recovery GPIO has a record of the current device, if so, configuring the attribute of the time-limited recovery GPIO according to the record of the current device, and performing reading operation;
the function of the hil _ timergpio _ read function is to read the attributes of the time-limited recovery GPIO.
Specifically, when a reading instruction of the current device to the time-limited recovery type GPIO is received, the index number corresponding to the time-limited recovery type GPIO in the time-limited recovery list may be searched first. Inquiring whether the attribute list of the time-limited recovery GPIO has a record of the current equipment according to the index number, if no record indicates that the equipment is not opened, the equipment cannot be used; and if the record exists, reading the attribute of the time-limited recovery GPIO, and reading and operating the time-limited recovery GPIO.
S404, when a write-in instruction of the current device to the time-limited recovery type GPIO is received, whether the current device records exist in the attribute list of the time-limited recovery type GPIO is inquired, if yes, the attribute of the time-limited recovery type GPIO is configured according to the record of the current device, and write operation is carried out.
The function of the hil _ timergpio _ write function is to write the attributes of the time-limited recovery GPIO.
Specifically, when a write-in instruction of the current device to the time-limited recovery type GPIO is received, the index number corresponding to the time-limited recovery type GPIO in the time-limited recovery list may be searched first. Inquiring whether the attribute list of the time-limited recovery GPIO has a record of the current equipment according to the index number, if no record indicates that the equipment is not opened, the equipment cannot be used; and if the record exists, writing the attribute of the time-limited recovery GPIO, and writing the time-limited recovery GPIO.
For example, in the wireless power supply enable/disable control and print latch multiplexing process, the printing process duration of the printer must exceed 500 ms. In combination with the principle of the multiplexing mechanism, during the application process of the printer, pulling down calls hil _ timergpio _ write to write low, and pulling up calls hil _ timergpio _ close to restore high.
In an embodiment, when a reading instruction of the time-limited recovery GPIO by a current device is received, querying whether there is a record of the current device in an attribute list of the time-limited recovery GPIO, if so, configuring an attribute of the time-limited recovery GPIO according to the record of the current device, and performing a reading operation, where the method includes: judging whether the equipment number of the current equipment is a recovery equipment number or not, and starting a timer if the equipment number of the current equipment is not the recovery equipment number;
when a write-in instruction of the current device to the time-limited recovery type GPIO is received, whether a record of the current device exists is inquired in an attribute list of the time-limited recovery type GPIO, if yes, the attribute of the time-limited recovery type GPIO is configured according to the record of the current device, and write operation is carried out, wherein the write-in instruction comprises the following steps: and judging whether the equipment number of the current equipment is the recovery equipment number or not, and starting a timer if the equipment number of the current equipment is not the recovery equipment number.
That is, if the current device is not a device having a recovery feature, a timer needs to be started at the time of reading and writing in order to time-recover the state of the time-limited recovery type GPIO.
In an embodiment, when the time-limited recovery GPIO is used, a timeout detection mechanism is used to operate the time-limited recovery GPIO, where the timeout detection mechanism is: when the appointed time arrives, the time-limited recovery type GPIO is recovered to a default state, and the method further comprises the following steps:
and periodically detecting whether the timer is overtime, and if so, recovering the attribute of the time-limited recovery type GPIO to the recovered attribute after the time is overtime.
The function of the hil _ timergpio _ check function is to periodically detect whether a device set to timeout recovery has timed out.
Specifically, the hil _ timergpio _ check function is an internal interface, is placed in a high-priority timer interrupt or a high-priority task, periodically detects whether a device set for timeout recovery has timed out, and immediately recovers the GPIO to the recovery attribute after the timeout if the device is timed out, and can also recover the state of the level.
Referring to fig. 2, fig. 2 is a schematic block diagram of a device for multiplexing GPIO according to an embodiment of the present invention, where the device 200 may include:
a classifying unit 201, configured to classify GPIOs in advance according to multiplexing functions to obtain a time-division multiplexing GPIO, a preemptive GPIO preferentially, and a time-limited recovery GPIO;
a time division multiplexing unit 202, configured to, when the time division multiplexing GPIO is used, operate the time division multiplexing GPIO by using a mutual exclusion mechanism, where the mutual exclusion mechanism is: if one device uses the time division multiplexing GPIO, the other device returns failure until the current device releases resources;
a priority preemption unit 203, configured to, when using the priority preemption GPIO, operate the priority preemption GPIO by using a priority mechanism that is: if the device with high priority uses the priority preemption type GPIO, the device with low priority returns failure until the device with high priority releases resources;
a time-limited recovery unit 204, configured to, when the time-limited recovery GPIO is used, operate the time-limited recovery GPIO by using a timeout detection mechanism, where the timeout detection mechanism is: and when the appointed time arrives, restoring the time-limited recovery type GPIO to a default state.
In an embodiment, the time division multiplexing unit 202 includes:
the device comprises a first opening unit, a second opening unit and a third opening unit, wherein the first opening unit is used for judging whether a mark of the time division multiplexing GPIO is idle or not when an opening instruction of the current device to the time division multiplexing GPIO is received, if so, configuring the attribute of the time division multiplexing GPIO as an input attribute, and updating the mark of the time division multiplexing GPIO as the device number of the current device;
the first closing unit is used for judging whether the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment or not when receiving a closing instruction of the current equipment to the time division multiplexing GPIO, configuring the attribute of the time division multiplexing GPIO as an initial attribute if the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment, and updating the mark of the time division multiplexing GPIO to be idle;
the first reading unit is used for judging whether the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment or not when receiving a reading instruction of the current equipment to the time division multiplexing GPIO, and if so, acquiring the attribute of the time division multiplexing GPIO;
and the first writing unit is used for judging whether the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment or not when receiving a writing instruction of the current equipment to the time division multiplexing GPIO, and if so, setting the attribute of the time division multiplexing GPIO.
In one embodiment, the priority preemption unit 203 includes:
a second opening unit, configured to, when an opening instruction of the priority preemption type GPIO by a current device is received, write a device number, a priority, and an input attribute of the current device in an attribute list of the priority preemption type GPIO, and form a record of the current device;
a second closing unit, configured to delete a record of a current device from the attribute list of the priority preemptive GPIO when a closing instruction of the current device to the priority preemptive GPIO is received;
the second reading unit is used for inquiring whether a record of the current device exists in an attribute list of the priority preemption type GPIO when a reading instruction of the current device to the priority preemption type GPIO is received, judging whether the priority of the current device is the highest priority of all devices in the attribute list if the record of the current device exists, and configuring the attribute of the priority preemption type GPIO according to the record of the current device and performing reading operation if the record of the current device exists;
and the second writing unit is used for inquiring whether the record of the current equipment exists in the attribute list of the priority preemption type GPIO when receiving a writing instruction of the current equipment to the priority preemption type GPIO, judging whether the priority of the current equipment is the highest priority of all the equipment in the attribute list if the record of the current equipment exists, configuring the attribute of the priority preemption type GPIO according to the record of the current equipment if the record of the current equipment exists, and performing writing operation.
In an embodiment, the time-limited recovery unit 204 includes:
a third opening unit, configured to, when an opening instruction of the current device to the time-limited recovery type GPIO is received, write a device number and an input attribute of the current device and a recovery attribute after timeout in an attribute list of the time-limited recovery type GPIO, and form a record of the current device;
a third closing unit, configured to delete a record of a current device from the attribute list of the time-limited recovery type GPIO when a closing instruction of the current device to the time-limited recovery type GPIO is received;
a third reading unit, configured to, when a reading instruction of the current device for the time-limited recovery type GPIO is received, query whether there is a record of the current device in an attribute list of the time-limited recovery type GPIO, and if so, configure the attribute of the time-limited recovery type GPIO according to the record of the current device, and perform a reading operation;
and the third writing unit is used for inquiring whether the record of the current device exists in the attribute list of the time-limited recovery type GPIO when a writing instruction of the current device to the time-limited recovery type GPIO is received, and if so, configuring the attribute of the time-limited recovery type GPIO according to the record of the current device and performing writing operation.
In one embodiment, the third reading unit includes:
the first starting unit is used for judging whether the equipment number of the current equipment is a recovery equipment number or not, and starting the timer if the equipment number of the current equipment is not the recovery equipment number;
the third writing unit includes:
and the second starting unit is used for judging whether the equipment number of the current equipment is the recovery equipment number or not, and starting the timer if not.
In an embodiment, the time-limited recovery unit 204 further includes:
and the overtime checking unit is used for periodically detecting whether the timer is overtime or not, and if the timer is overtime, recovering the attribute of the time-limited recovery type GPIO into the recovered attribute after the overtime.
In one embodiment, the second closing unit includes:
and the state recovery unit is used for configuring the attribute of the priority preemptive GPIO according to the record of the device with the highest priority in the attribute list of the priority preemptive GPIO.
An embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for multiplexing GPIOs as described above when executing the computer program.
An embodiment of the present invention provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the processor is caused to execute the method for multiplexing GPIOs as described above.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for multiplexing GPIOs, comprising:
pre-classifying the GPIOs according to the multiplexing function to obtain a time-sharing multiplexing GPIO, a priority preemption GPIO and a time-limited recovery GPIO;
when the time division multiplexing GPIO is used, a mutual exclusion mechanism is adopted to operate the time division multiplexing GPIO, wherein the mutual exclusion mechanism is as follows: if one device uses the time division multiplexing GPIO, the other device returns failure until the current device releases resources;
when the priority preemptive GPIO is used, a priority mechanism is adopted to operate the priority preemptive GPIO, and the priority mechanism is as follows: if the device with high priority uses the priority preemption type GPIO, the device with low priority returns failure until the device with high priority releases resources;
when the time-limited recovery type GPIO is used, operating the time-limited recovery type GPIO by adopting a timeout detection mechanism, wherein the timeout detection mechanism is as follows: and when the appointed time arrives, restoring the time-limited recovery type GPIO to a default state.
2. The method for multiplexing GPIOs of claim 1, wherein when the time-division multiplexing-type GPIOs are used, the time-division multiplexing-type GPIOs are operated using a mutual exclusion mechanism that is: if a device is using the time division multiplexing GPIO, another device returns failure until the current device releases resources, comprising:
when an opening instruction of the current device to the time division multiplexing GPIO is received, judging whether a mark of the time division multiplexing GPIO is idle, if so, configuring the attribute of the time division multiplexing GPIO as an input attribute, and updating the mark of the time division multiplexing GPIO to be the device number of the current device;
when a closing instruction of the current equipment to the time division multiplexing GPIO is received, judging whether the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment or not, if so, configuring the attribute of the time division multiplexing GPIO as an initial attribute, and updating the mark of the time division multiplexing GPIO to be idle;
when a reading instruction of the current equipment to the time division multiplexing GPIO is received, judging whether the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment or not, and if so, acquiring the attribute of the time division multiplexing GPIO;
and when a write-in instruction of the current equipment to the time division multiplexing GPIO is received, judging whether the mark of the time division multiplexing GPIO is equal to the equipment number of the current equipment, and if so, setting the attribute of the time division multiplexing GPIO.
3. The method of multiplexing GPIOs of claim 1, wherein when using the priority preemptive GPIOs, operating the priority preemptive GPIOs with a priority mechanism that is: if the device with high priority is using the priority preemption type GPIO, returning the operation of the device with low priority to failure until the device with high priority releases resources, comprising the following steps:
when an opening instruction of the current equipment to the priority preemption type GPIO is received, writing an equipment number, a priority and an input attribute of the current equipment into an attribute list of the priority preemption type GPIO to form a record of the current equipment;
when a closing instruction of the current equipment to the priority preemption type GPIO is received, deleting the record of the current equipment in the attribute list of the priority preemption type GPIO;
when a reading instruction of the current equipment to the priority preemption type GPIO is received, inquiring whether a record of the current equipment exists in an attribute list of the priority preemption type GPIO, if so, judging whether the priority of the current equipment is the highest priority of all the equipment in the attribute list, and if so, configuring the attribute of the priority preemption type GPIO according to the record of the current equipment and performing reading operation;
when a write-in instruction of the current equipment to the priority preemption type GPIO is received, inquiring whether the record of the current equipment exists in an attribute list of the priority preemption type GPIO, if so, judging whether the priority of the current equipment is the highest priority of all the equipment in the attribute list, and if so, configuring the attribute of the priority preemption type GPIO according to the record of the current equipment and performing write operation.
4. The method for multiplexing GPIO according to claim 1, wherein when the time-limited recovery GPIO is used, the time-limited recovery GPIO is operated by adopting a timeout detection mechanism, the timeout detection mechanism is: when the appointed time arrives, the time-limited recovery type GPIO is recovered to a default state, and the method comprises the following steps:
when an opening instruction of the current equipment to the time-limited recovery type GPIO is received, writing an equipment number, an input attribute and a recovery attribute after timeout of the current equipment into an attribute list of the time-limited recovery type GPIO to form a record of the current equipment;
when a closing instruction of the current equipment to the time-limited recovery type GPIO is received, deleting the record of the current equipment in the attribute list of the time-limited recovery type GPIO;
when a reading instruction of the current device to the time-limited recovery type GPIO is received, inquiring whether a record of the current device exists in an attribute list of the time-limited recovery type GPIO, if so, configuring the attribute of the time-limited recovery type GPIO according to the record of the current device, and performing reading operation;
and when a write-in instruction of the current device to the time-limited recovery GPIO is received, inquiring whether the record of the current device exists in the attribute list of the time-limited recovery GPIO, if so, configuring the attribute of the time-limited recovery GPIO according to the record of the current device, and performing write operation.
5. The method for multiplexing GPIO of claim 4, wherein the querying, when receiving a read instruction for the time-limited recovery GPIO by a current device, whether there is a record of the current device in the attribute list of the time-limited recovery GPIO, and if so, configuring the attribute of the time-limited recovery GPIO according to the record of the current device, and performing a read operation, includes: judging whether the equipment number of the current equipment is a recovery equipment number or not, and starting a timer if the equipment number of the current equipment is not the recovery equipment number;
when a write-in instruction of the current device to the time-limited recovery type GPIO is received, whether a record of the current device exists is inquired in an attribute list of the time-limited recovery type GPIO, if yes, the attribute of the time-limited recovery type GPIO is configured according to the record of the current device, and write operation is carried out, wherein the write-in instruction comprises the following steps: and judging whether the equipment number of the current equipment is the recovery equipment number or not, and starting a timer if the equipment number of the current equipment is not the recovery equipment number.
6. The method for multiplexing GPIO according to claim 5, wherein when the time-limited recovery GPIO is used, the time-limited recovery GPIO is operated by adopting a timeout detection mechanism: when the appointed time arrives, the time-limited recovery type GPIO is recovered to a default state, and the method further comprises the following steps:
and periodically detecting whether the timer is overtime, and if so, recovering the attribute of the time-limited recovery type GPIO to the recovered attribute after the time is overtime.
7. The method for multiplexing GPIOs of claim 3, wherein said deleting the record of the current device from the attribute list of the priority preemptive GPIO upon receiving a turn-off command from the current device to the priority preemptive GPIO comprises: and configuring the attribute of the priority preemptive GPIO according to the record of the device with the highest priority in the attribute list of the priority preemptive GPIO.
8. An apparatus for multiplexing GPIOs, comprising:
the classification unit is used for classifying the GPIOs according to the multiplexing function in advance to obtain a time-sharing multiplexing type GPIO, a priority preemptive type GPIO and a time-limited recovery type GPIO;
a time division multiplexing unit, configured to, when the time division multiplexing GPIO is used, operate the time division multiplexing GPIO using a mutual exclusion mechanism, where the mutual exclusion mechanism is: if one device uses the time division multiplexing GPIO, the other device returns failure until the current device releases resources;
a priority preemption unit, configured to, when using the priority preemption type GPIO, operate the priority preemption type GPIO by using a priority mechanism, where the priority mechanism is: if the device with high priority uses the priority preemption type GPIO, the device with low priority returns failure until the device with high priority releases resources;
and the time-limited recovery unit is used for operating the time-limited recovery type GPIO by adopting a timeout detection mechanism when the time-limited recovery type GPIO is used, wherein the timeout detection mechanism is as follows: and when the appointed time arrives, restoring the time-limited recovery type GPIO to a default state.
9. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of multiplexing GPIOs of any one of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to perform the method of multiplexing GPIOs of any one of claims 1 to 7.
CN202010760094.8A 2020-07-31 2020-07-31 Method and device for multiplexing GPIO, computer equipment and storage medium Pending CN111880941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010760094.8A CN111880941A (en) 2020-07-31 2020-07-31 Method and device for multiplexing GPIO, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010760094.8A CN111880941A (en) 2020-07-31 2020-07-31 Method and device for multiplexing GPIO, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111880941A true CN111880941A (en) 2020-11-03

Family

ID=73205935

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010760094.8A Pending CN111880941A (en) 2020-07-31 2020-07-31 Method and device for multiplexing GPIO, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111880941A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101377764A (en) * 2008-09-12 2009-03-04 北京中星微电子有限公司 Allocating system of GPIO and data communicating method thereof
CN102819625A (en) * 2011-06-10 2012-12-12 上海华虹集成电路有限责任公司 Design method for digital analogy multiplex input/output (IO) pin structure
CN108959139A (en) * 2018-07-11 2018-12-07 郑州云海信息技术有限公司 A kind of CPLD pin multiplexing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101377764A (en) * 2008-09-12 2009-03-04 北京中星微电子有限公司 Allocating system of GPIO and data communicating method thereof
CN102819625A (en) * 2011-06-10 2012-12-12 上海华虹集成电路有限责任公司 Design method for digital analogy multiplex input/output (IO) pin structure
CN108959139A (en) * 2018-07-11 2018-12-07 郑州云海信息技术有限公司 A kind of CPLD pin multiplexing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄蕾: "基于决策树架构应用级系统调度", 《兵工自动化》, vol. 36, no. 2, pages 46 - 49 *

Similar Documents

Publication Publication Date Title
CN103443770B (en) Terminal installation, process management method and process supervisory program
CN103339607A (en) Method and apparatus for locking and unlocking multiple operating system environments with a single gesture input
CN102968335A (en) Terminal and terminal memory management method
CN113824842B (en) Notification message display method, electronic equipment and computer-readable storage medium
CN106599115B (en) Data protection method, device and terminal
CN110471750A (en) Scheduled task control method, device, medium and computer equipment
CN109597707A (en) Clone volume data copying method, device and computer readable storage medium
US20010027387A1 (en) Debugging supporting apparatus, debugging supporting method and recording medium readable by computer with its programs recorded thereon
CN107391021B (en) Recognition methods, device, storage medium and the mobile terminal of blank screen gesture
CN110413577A (en) Data-erasure method, device, electronic equipment and computer readable storage medium
CN103455288B (en) Information processor and control method
EP4120082A1 (en) Automotive open system architecture, state management method, and device
CN106371879A (en) Method and system for shielding non-deletable application of mobile terminal
CN111880941A (en) Method and device for multiplexing GPIO, computer equipment and storage medium
CN108737655A (en) Image processing method and relevant apparatus
CN108762983A (en) Multi-medium data restoration methods and device
CN102520947A (en) Method and device for automatically removing codes
CN110502574B (en) Cross-system information synchronization method, user equipment, storage medium and device
CN109951518A (en) A kind of off-line data synchronous method and device
CN109471829A (en) Recognition methods, identification mould group and the electronic equipment of SD card hot plug
US9418175B2 (en) Enumeration of a concurrent data structure
CN103678677A (en) Operation method and system of intelligent terminal
CN105320395A (en) Icon arrangement method and device as well as terminal
CN111126032B (en) Automatic document version generation method based on intelligent prediction of editing behaviors
US7016091B2 (en) Image pickup apparatus, storing method of image data and storage medium thereof

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