CN112559062A - Keyboard multi-software compatibility method - Google Patents

Keyboard multi-software compatibility method Download PDF

Info

Publication number
CN112559062A
CN112559062A CN202011531993.7A CN202011531993A CN112559062A CN 112559062 A CN112559062 A CN 112559062A CN 202011531993 A CN202011531993 A CN 202011531993A CN 112559062 A CN112559062 A CN 112559062A
Authority
CN
China
Prior art keywords
country code
key
keyboard
software
turning
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.)
Granted
Application number
CN202011531993.7A
Other languages
Chinese (zh)
Other versions
CN112559062B (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.)
Shenzhen Dns Industries Co ltd
Original Assignee
Shenzhen Dns Industries 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 Dns Industries Co ltd filed Critical Shenzhen Dns Industries Co ltd
Priority to CN202011531993.7A priority Critical patent/CN112559062B/en
Publication of CN112559062A publication Critical patent/CN112559062A/en
Application granted granted Critical
Publication of CN112559062B publication Critical patent/CN112559062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • G06F8/4434Reducing the memory space required by the program code
    • G06F8/4435Detection or removal of dead or redundant code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Abstract

The invention discloses a keyboard multi-software compatible method. In the invention, 5 pins are reserved in the MCU on the PCBA board, and the pins are pulled up and pulled down through a hardware pull-down mode, wherein 31 combination modes are provided, for example: 00001 represents a key core layout, 00010 a key core layout, 00100 a key core layout, in such a way that compatibility of up to 31 software versions can be supported, thereby satisfying the key core layout supporting 31 out of 35 countries and also satisfying the requirement of the company keyboard country type. The software of 35 kinds of keyboards is used for processing codes, the difference part is correspondingly processed in a branch mode by detecting the values of 5 pins, and the same part is processed uniformly, so that the code redundancy is reduced. The software version is reduced, the production error version caused by confusion of production and version management is avoided, so that the economic loss is avoided, and the software maintenance and upgrading efficiency is greatly improved.

Description

Keyboard multi-software compatibility method
Technical Field
The invention relates to the technical field of software programs, in particular to a keyboard multi-software compatibility method.
Background
With the widespread use of ipads, iphones, and ipods, more and more students use ipads for video learning and lecture, the LightningMFiKeyboard is in the way of being popular, and the key core layout of LightningMFiKeyboard varies from country to country.
The lightning MFiKeyBoard can support 35 countries, and the keyboard of each country has different key core layouts, so that the software needs 35 versions, and if the software is incompatible, once the defect is modified, a plurality of software versions need to be maintained at the same time, which brings great inconvenience to version management, and in the production process, if the versions are too many, the burnt version and the version are disordered.
Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, the present invention provides a method for providing a keyboard with software compatibility to solve the drawbacks of the prior art.
In order to achieve the purpose, the invention provides a keyboard multi-software compatible method, which comprises the following steps:
step S01: configuring the chip MCU, and then entering step S02;
step S02: configuring a system clock, and then proceeding to step S03;
step S03: configuring a GPIO pin of the MCU, and then entering step S04;
step S04: configuring UART, USB and Timer, starting a Timer at the same time, and then entering step S05;
step S05: after the system is started, reading level values of pins PA0, PA1, PA2, PA3 and PA4 of the chip MCU, and then entering step S06;
step S06: the level is converted into a numerical value, and then the process proceeds to step S07;
step S07: the corresponding country code is searched in the country code table according to the level conversion into the numerical value, and then the step S08 is carried out;
step S08: if the corresponding country code is not found, ending the operation, and if the corresponding country code is found, going to step S09;
step S09: recording the value of the found country code using a global variable, and then proceeding to step S10;
step S10: the first step of starting authentication, packaging and reporting the authentication certificate to the iOS device, and then turning to the step S11;
step S11: if the authentication of the certificate fails, ending, the key cannot be used, otherwise, turning to the step S12;
step S12: the certificate response is further packaged and then reported to the iOS device, and then goes to step S13;
step S13: if the certificate response fails, ending, and the key cannot be used, otherwise, turning to step S14;
step S14: if the country code value is inquired, the step S15 is carried out, otherwise, the inquiry of the country code value is continued;
step S15: packaging the identity information corresponding to the country code value, reporting the identity information to the iOS equipment, and further verifying whether the identity meets the requirements;
step S16: if the identity is confirmed, the step S17 is entered, otherwise, the operation is ended and the keyboard cannot be used;
step S17: firstly, packaging human-computer interface HID information shared by all countries, and then turning to step S18;
step S18: if the country code value is ok, go to step S19, otherwise continue to ok the country code value;
step S19: encapsulating StartHID information corresponding to the country code value, reporting the information to the iOS equipment, and then turning to the step S20;
step S20: if the StartHID is successfully sent, the step S21 is carried out, otherwise, the operation is ended, and the keyboard cannot be used;
step S21: detecting whether the key is pressed in real time, and then entering step S22;
step S22: if yes, go to step S23, otherwise continue to detect the key, return to step S21;
step S23: encapsulating the HIDReport information by the pressed key value, then reporting to the OS device, and going to step S24;
step S24: and if the HIDREPort is reported successfully, returning to the step S21 to continuously detect whether the key is pressed, otherwise, ending the operation.
The keyboard multi-software compatibility method of claim 1, wherein: the iOS device comprises an iPad, an iPhone or an iPod.
The invention has the beneficial effects that:
the invention reduces the software version, avoids the confusion of production and version management and the production error version, thereby avoiding the economic loss and greatly improving the software maintenance and upgrading efficiency.
The conception, the specific structure and the technical effects of the present invention will be further described with reference to the accompanying drawings to fully understand the objects, the features and the effects of the present invention.
Drawings
FIG. 1 is a flow chart of a method of an embodiment of the present invention.
Detailed Description
As shown in fig. 1, the present invention provides a keyboard multi-software compatible method, which comprises the following steps:
step S01: the configuration of the chip MCU immediately proceeds to step S02;
step S02: the configuration of the system clock is followed by proceeding to step S03;
step S03: the GPIO pin configuration of the MCU immediately enters step S04;
step S04: UART, USB and Timer configuration, starting a Timer at the same time, and then entering step S05;
step S05: after the system is up, reading the level value of the pin PA0PA1PA2PA3PA4, and then entering the step S06;
step S06: converts the level into a numerical value for the subsequent processing, and then proceeds to step S07;
step S07: the corresponding country code is searched in the country code table according to the level conversion into the numerical value, and then the step S08 is carried out;
step S08: if the corresponding country code is not found, ending the operation, and if the corresponding country code is found, going to step S09;
step S09: recording the value of the found country code using a global variable, and then proceeding to step S10;
step S10: starting the first step of authentication, packaging and reporting the authentication certificate to the iOS device, such as iPad, iPhone or iPod, and then turning to the step S11;
step S11: if the authentication of the certificate fails, ending, the key cannot be used, otherwise, turning to the step S12;
step S12: further packaging the certificate response, and then reporting to the iOS device, such as iPad, iPhone, or iPod, and then proceeding to step S13;
step S13: if the certificate response fails, ending, and the key cannot be used, otherwise, turning to step S14;
step S14: if the country code value is US, go to step S15, otherwise go to step S16;
step S15: encapsulating the identity information of the US, reporting the identity information to iOS equipment such as iPad, iPhone or iPod, and then turning to the step S22 to further verify whether the identity meets the requirements;
step S16: if the country code value is Japan, then step S17 is entered, otherwise step S18 is entered;
step S17: packaging the identity information of Japan, reporting the identity information to iOS equipment such as iPad, iPhone or iPod, and then turning to step S22 to further verify whether the identity meets the requirements;
step S18: if the country code value is Swedish, go to step S19, otherwise go to step S20;
step S19: encapsulating the identity information of Swedish, reporting the identity information to iOS equipment, such as iPad, iPhone or iPod, and then turning to the step S22 to further verify whether the identity meets the requirements;
step S20: if the country code value is German, then step S21 is entered, otherwise, it indicates that all country codes are not satisfied, the operation is ended, and the keyboard cannot be used;
step S21: encapsulating the identity information of the German, reporting the identity information to iOS equipment, such as iPad, iPhone or iPod, and then turning to the step S22 to further verify whether the identity meets the requirements;
step S22: if the identity is confirmed, the step S23 is entered, otherwise, the operation is ended and the keyboard cannot be used;
step S23: firstly, packaging human-computer interface HID information shared by all countries, and then turning to step S24;
step S24: if the country code value is US, go to step S25, otherwise go to step S26;
step S25: encapsulating the US StartHID information, reporting the US StartHID information to iOS equipment such as iPad, iPhone or iPod, and then turning to the step S32;
step S26: if the country code value is Japan, then step S27 is entered, otherwise step S28 is entered;
step S27: encapsulating StartHID information of Japan, reporting the information to iOS equipment such as iPad, iPhone or iPod, and then turning to the step S32;
step S28: if the country code value is Swedish, go to step S29, otherwise go to step S30;
step S29: encapsulating the StartHID information of Swedish, reporting the information to iOS equipment such as iPad, iPhone or iPod, and then turning to the step S32;
step S30: if the country code value is German, then step S31 is entered, otherwise the operation is ended and the keyboard cannot be used;
step S31: encapsulating the StartHID information of German, reporting the information to iOS equipment such as iPad, iPhone or iPod, and then turning to the step S32;
step S32: if the StartHID is successfully sent, the step S33 is carried out, otherwise, the operation is ended, and the keyboard cannot be used;
step S33: detecting whether the key is pressed in real time, and then entering step S34;
step S34: if yes, go to step S35, otherwise continue to detect the key, return to step S33;
step S35: encapsulating the HIDReport information by the pressed key value, then reporting to the OS device, such as iPad, iPhone or iPod, and going to step S36;
step S36: and if the HIDREPort is reported successfully, returning to the step S33 to continuously detect whether the key is pressed, otherwise, ending the operation.
In the invention, 5 pins are reserved in the MCU on the PCBA board, and the pins are pulled up and pulled down through a hardware pull-down mode, wherein 31 combination modes are provided, for example: 00001 represents a key core layout, 00010 a key core layout, 00100 a key core layout, in such a way that compatibility of up to 31 software versions can be supported, thereby satisfying the key core layout supporting 31 out of 35 countries and also satisfying the requirement of the company keyboard country type.
The software of 35 kinds of keyboards is used for processing codes, the difference part is correspondingly processed in a branch mode by detecting the values of 5 pins, and the same part is processed uniformly, so that the code redundancy is reduced.
The foregoing detailed description of the preferred embodiments of the invention has been presented. It should be understood that numerous modifications and variations could be devised by those skilled in the art in light of the present teachings without departing from the inventive concepts. Therefore, the technical solutions available to those skilled in the art through logic analysis, reasoning and limited experiments based on the prior art according to the concept of the present invention should be within the scope of protection defined by the claims.

Claims (2)

1. A keyboard multi-software compatible method is characterized by comprising the following steps:
step S01: configuring the chip MCU, and then entering step S02;
step S02: configuring a system clock, and then proceeding to step S03;
step S03: configuring a GPIO pin of the MCU, and then entering step S04;
step S04: configuring UART, USB and Timer, starting a Timer at the same time, and then entering step S05;
step S05: after the system is started, reading level values of pins PA0, PA1, PA2, PA3 and PA4 of the chip MCU, and then entering step S06;
step S06: the level is converted into a numerical value, and then the process proceeds to step S07;
step S07: the corresponding country code is searched in the country code table according to the level conversion into the numerical value, and then the step S08 is carried out;
step S08: if the corresponding country code is not found, ending the operation, and if the corresponding country code is found, going to step S09;
step S09: recording the value of the found country code using a global variable, and then proceeding to step S10;
step S10: the first step of starting authentication, packaging and reporting the authentication certificate to the iOS device, and then turning to the step S11;
step S11: if the authentication of the certificate fails, ending, the key cannot be used, otherwise, turning to the step S12;
step S12: the certificate response is further packaged and then reported to the iOS device, and then goes to step S13;
step S13: if the certificate response fails, ending, and the key cannot be used, otherwise, turning to step S14;
step S14: if the country code value is inquired, the step S15 is carried out, otherwise, the inquiry of the country code value is continued;
step S15: packaging the identity information corresponding to the country code value, reporting the identity information to the iOS equipment, and further verifying whether the identity meets the requirements;
step S16: if the identity is confirmed, the step S17 is entered, otherwise, the operation is ended and the keyboard cannot be used;
step S17: firstly, packaging human-computer interface HID information shared by all countries, and then turning to step S18;
step S18: if the country code value is ok, go to step S19, otherwise continue to ok the country code value;
step S19: encapsulating StartHID information corresponding to the country code value, reporting the information to the iOS equipment, and then turning to the step S20;
step S20: if the StartHID is successfully sent, the step S21 is carried out, otherwise, the operation is ended, and the keyboard cannot be used;
step S21: detecting whether the key is pressed in real time, and then entering step S22;
step S22: if yes, go to step S23, otherwise continue to detect the key, return to step S21;
step S23: packaging HID Report information by the pressed key value, then reporting to the OS device, and going to step S24;
step S24: and if the HID Report is successfully reported, returning to the step S21, continuously detecting whether the key is pressed, and if not, ending the operation.
2. The keyboard multi-software compatibility method of claim 1, wherein: the iOS device comprises an iPad, an iPhone or an iPod.
CN202011531993.7A 2020-12-22 2020-12-22 Method for keyboard to be compatible with multiple software Active CN112559062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011531993.7A CN112559062B (en) 2020-12-22 2020-12-22 Method for keyboard to be compatible with multiple software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011531993.7A CN112559062B (en) 2020-12-22 2020-12-22 Method for keyboard to be compatible with multiple software

Publications (2)

Publication Number Publication Date
CN112559062A true CN112559062A (en) 2021-03-26
CN112559062B CN112559062B (en) 2022-03-25

Family

ID=75032220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011531993.7A Active CN112559062B (en) 2020-12-22 2020-12-22 Method for keyboard to be compatible with multiple software

Country Status (1)

Country Link
CN (1) CN112559062B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5387042A (en) * 1993-06-04 1995-02-07 Brown; Carl W. Multilingual keyboard system
CN1369761A (en) * 2000-11-06 2002-09-18 英业达股份有限公司 Method for automatically testing specification of keyboard
US20080150900A1 (en) * 2006-12-20 2008-06-26 Samsung Electronics Co., Ltd. Image forming apparatus and method of displaying multilingual keyboard using the same
US20090182901A1 (en) * 2008-01-14 2009-07-16 Microsoft Corporation Automatically configuring computing devices through input device
US20110202839A1 (en) * 2010-02-18 2011-08-18 Alkazi Sulaiman Configurable multilingual keyboard
US20140236568A1 (en) * 2013-02-21 2014-08-21 Red Hat, Inc. Input method to support multiple languages
CN106125953A (en) * 2016-05-30 2016-11-16 联想(北京)有限公司 A kind of keyboard display method and electronic equipment
CN107509098A (en) * 2014-07-28 2017-12-22 华为技术有限公司 Multi-lingual characters input method and device based on dummy keyboard

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5387042A (en) * 1993-06-04 1995-02-07 Brown; Carl W. Multilingual keyboard system
CN1369761A (en) * 2000-11-06 2002-09-18 英业达股份有限公司 Method for automatically testing specification of keyboard
US20080150900A1 (en) * 2006-12-20 2008-06-26 Samsung Electronics Co., Ltd. Image forming apparatus and method of displaying multilingual keyboard using the same
US20090182901A1 (en) * 2008-01-14 2009-07-16 Microsoft Corporation Automatically configuring computing devices through input device
US20110202839A1 (en) * 2010-02-18 2011-08-18 Alkazi Sulaiman Configurable multilingual keyboard
US20140236568A1 (en) * 2013-02-21 2014-08-21 Red Hat, Inc. Input method to support multiple languages
CN107509098A (en) * 2014-07-28 2017-12-22 华为技术有限公司 Multi-lingual characters input method and device based on dummy keyboard
CN106125953A (en) * 2016-05-30 2016-11-16 联想(北京)有限公司 A kind of keyboard display method and electronic equipment

Also Published As

Publication number Publication date
CN112559062B (en) 2022-03-25

Similar Documents

Publication Publication Date Title
CN103139391B (en) Method and device of permission validating installation or unloading of application program in mobile phone
CN103412769A (en) External card parameter configuration method, equipment and system
CN104915306B (en) A kind of data manipulation control method and equipment manager
CN103853703A (en) Information processing method and electronic equipment
CN105303097A (en) Verification method of mobile terminal, mobile terminal and verification system
CN104618807A (en) Multimedia playing method, device and system
CN106997302A (en) Firmware upgrade method, device and audio-frequence player device
CN112559062B (en) Method for keyboard to be compatible with multiple software
CN104486748A (en) Contact number updating method and mobile terminal
CN110941556A (en) Method for rapidly compiling test cases on Android platform
CN103324551A (en) Application data migration method and system
CN103744693A (en) Multi-system switching method and electronic device
CN103744911A (en) Video file scanning method and electronic device
CN109257652B (en) Configuration information switching method and device, electronic device, system and storage medium
CN103488491A (en) Method for carrying out system upgrade on terminal and terminal
CN105740117A (en) Chip debugging method and apparatus
CN103645895A (en) Automatic configuration method and cloud compiling system
CN102955699A (en) Software upgrade package creating method and software upgrading method
CN111338697B (en) Device and method for one-key setting by using HID keyboard
CN110704075A (en) Multi-chip firmware burning method, system, device and storage medium
CN103336241A (en) Method and system for testing Modem module on embedded PCBA (Printed Circuit Board Assembly)
CN102567151A (en) SAS (serial attached SCSI (small computer system interface)) hard disc test system and method under EFI (extensible firmware interface) environment
CN111857752A (en) PostgreSQL database installation method, device and equipment
US10423561B2 (en) Computing devices with hot swapping prediction circuits
WO2020097863A1 (en) Flashing control method, flashing control apparatus and terminal device

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