US Patent No. 10,599,493

METHOD AND MODULE IN OPERATING SYSTEM FOR CONTROLLING HARDWARE DEVICE


Patent No. 10,599,493
Issue Date March 24, 2020
Title Method And Module In Operating System For Controlling Hardware Device
Inventorship Ruopeng Liu, Shenzhen (CN)
Xudong Wang, Shenzhen (CN)
Assignee KUANG-CHI INTELLIGENT PHOTONIC TECHNOLOGY LTD., Shenzhen (CN)

Claim of US Patent No. 10,599,493

1. A method for controlling a hardware device in an operating system, comprising:obtaining an instruction for loading a link library, and loading the link library, the link library comprises a performance implementation function for controlling a hardware device action;
obtaining an instruction for controlling the hardware device action;
invoking, from the link library, a performance implementation function corresponding to the instruction for controlling the hardware device action; and
executing the invoked performance implementation function to control a hardware device to perform a corresponding action;
wherein before the obtaining an instruction for loading a link library, the method further comprises:
obtaining state data for controlling the hardware device action;
delivering and storing the state data into a buffering unit; and
after the executing the invoked performance implementation function, the method further comprises:
invoking a hardware device driver, the hardware device driver reads the state data stored in the buffering unit, and controlling a state of the hardware device action according to the state data;
wherein obtaining state data for controlling the hardware device action comprises:
obtaining an original data;
encoding the original data to obtain the state data;
wherein encoding the original data to obtain the state data comprises:
encoding each different digit in the N-ary data of the original data into a different electric signal unit, where high level duration in the electric signal unit is Ti1, Ti2 . . . , Tij, low level duration in the electric signal unit is Tij, wherein i, j, and N are natural numbers, different electric signal units are separated by delimiters to obtain the state data,
wherein the hardware device is a light emitting device, the hardware device driver is a light emitting device driver, the state data is an array indicating time data, and the controlling, by the hardware device driver, a state of the hardware device action according to the state data is specifically: controlling, by the light emitting device, a time of turning on or off the light emitting device according to order of data elements in the array.