1. Field of the Invention
The present invention relates to a control mechanism that utilizes a driver to control an electronic device, and more particularly, to an apparatus and a related method for controlling an electronic device by setting a driver according to a setting data for the driver read from an external non-volatile storage unit.
2. Description of the Prior Art
A driver is required to drive a controller which is configured for controlling the operation of an electronic device (e.g. an image sensor). A setup package or a setup information file (INF file) of a conventional driver usually includes a setting file, a sensor configuration, a circuit configuration, a driver and a setup executing file. When a user obtains the setup package or the setup information files and executes the setup executing file, parameters included in the setting file will be stored into the registry file of the operating system in order to be utilized by the driver.
Different customers may have different requirements. For meeting all requirements of the different customers, suppliers/manufacturers of controllers modify/update the content of the setup package or the setup information file (e.g. modifying/updating the setting file for the driver). The size of the data amount for the setup package is large, so the modification/update for the setup package is difficult. Furthermore, once the data of the setup information file is modified, a re-certification test is required to ensure that an operation system crush will not occur. This costs both time and money.
With this in mind, it is therefore one objective of the present invention to provide an apparatus and a related method for controlling an electronic device by reading out setting data stored in an externally-coupled non-volatile storage unit to set a driver, thereby solving the aforementioned problems.
According to one exemplary embodiment of the present invention, an apparatus for controlling at least one electronic device is provided. The apparatus is coupled to a host, and includes a controller and a non-volatile storage unit. The controller is controlled by a driver of the host and is configured for controlling the operation of the electronic device. The non-volatile storage unit is externally coupled to the controller and is utilized for storing data. When the driver is activated, it is determined whether a setting data utilized for the driver is stored in the non-volatile storage unit. If the setting data for the driver is stored in the non-volatile storage unit, the setting data for the driver is read out for setting the driver.
According to one exemplary embodiment of the present invention, a method for controlling at least one electronic device is further provided. The method includes: storing a setting data utilized by a driver in a non-volatile storage unit; and reading out the setting data from the non-volatile storage unit to set the driver when the driver is activated, thereby executing the driver to control the operation of the electronic device.
In summary, the advantage of the present invention is that the manufacturer/supplier does not have to modify or update the content of the installation data of the driver and does not have to modify the driver. The manufacturer/supplier only needs to perform a certification test on the driver of the controller once, which significantly saves on expenses. In addition, with the permission of the manufacturer/supplier, a customer can properly set content of the setting data depending on his/her requirements. When the driver is activated, the modified setting data can be employed for modifying/updating the parameter of the driver, thereby updating/increasing additional control function(s) or operation(s) for the electronic device. As a result, the present invention improves the flexibility of usage of the electronic device.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Certain terms are used throughout the following descriptions and claims to refer to particular system components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not differ in functionality. In the following discussion and in the claims, the terms “include”, “including”, “comprise”, and “comprising” are used in an open-ended fashion, and thus should be interpreted to mean “including, but not limited to . . . .” The terms “couple” and “coupled” are intended to mean either an indirect or a direct electrical connection. Thus, if a first device couples to a second device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
Please refer to
The apparatus 100 further includes a non-volatile storage unit 110, which is externally coupled to the controller 115 through the internal bus 1072 and utilized for storing a setting data 1101 (hereinafter “driver setting data”) for the installation of the driver 1151. The non-volatile storage unit 110 could be implemented with an electrically erasable programmable read-only memory (EEPROM), and the driver setting data 1101 is utilized for setting the driver 1151, thereby adjusting the control of the electronic device 105. For instance, the driver setting data 110 includes the setting file required when the driver 1151 is installed, and the content of the driver setting data 110 could be utilized for modifying parameters in the driver 1151, where the parameters concern the fundamental operation and function, or could be utilized for extending the operations or functions of the driver 1151 by increasing additional operations and functions. In short, the function of the driver setting data 1101 is similar to the setting file of the driver. In this embodiment, the controller 115 reads out the driver setting data 1101 from the non-volatile storage unit 110 for setting the driver 1151 when the host activates (installs or executes) the driver 1151.
In this invention, the manufacturer/supplier modifies or updates the content of the driver setting data 1101 (e.g. information about the parameters in the driver 1151) depending on requirements of different customers in order to provide customized services. A specific driver (e.g. a kernel mode driver) can be installed on a controller with a setup information file or a setup package.
With respect to the driver installation method of the setup information file, the setup information file (including the driver and the driver setting data) needs to be certified by a system stability and compatibility certification process (e.g. Windows Hardware Quality Lab (WHQL) process) before the driver is installed. This ensures that the driver will not lead to the operating system crashing. With respect to the driver installation method of the setup package, the setup package does not need to be certified by a system stability and compatibility certification process.
In this embodiment, since the driver setting data 1101 is stored in the non-volatile storage unit 110, the controller 115 loads the driver setting data 1101 from the non-volatile storage unit 110 in order for the host 1150 to set the driver 1151 when the driver 1151 is activated (installed) regardless of the installation method. Thus, the manufacturer/supplier of the apparatus can provide the driver 1151 having identical content and the driver setting data 1101 having different content to different customers having different requirements. That is, the manufacturer/supplier only needs to modify/update the content of the driver setting data 1101 rather than the content of the driver.
In other words, for satisfying different requirements or updating the driver setting data, no matter whether the driver is installed with the setup package or the setup information file, the present invention only modifies/updates the content of the driver setting data 1101 and then executes the driver 1151, thereby setting the driver with newly-modified/updated driver setting data. The manufacturer/supplier does not need to develop a new setup package or a new setup information file, which can save on expenses for re-certifying a new setup information file (only one certification is necessary in this invention) and the time for installing a new setup package.
In practice, apart from the setting data 1101 of the driver being read out from the non-volatile storage unit 110, it is also feasible to load a registry file of the operating system and read out predetermined setting data temporarily stored in the registry file in order to install the driver 115, wherein the predetermined setting data is copied from the setup package or the setup information file when the driver 115 is installed. Hence, if the driver setting data 1101 stored in the non-volatile storage unit is deleted or an error occurs when the driver 115 accesses the non-volatile storage unit 110, the apparatus 100 can still control the operation of the electronic device 105 by loading the predetermined setting data temporarily stored in the registry file. It should be especially noted that, even though the driver setting data 1101 is used to set the certified driver 1151 which has been certified by the certification process, other information regarding the electronic device 105 (e.g. the image detecting circuit) can also be stored in the non-volatile storage unit 110, wherein the information could be the sensor information or the circuit configuration information. However, such information is not relevant to the parameters utilized for setting the driver 1151 when the driver 1151 is installed or executed.
Please refer to
In other embodiments of the present invention, it is also possible to store the driver setting data 1101 into other sections in the storage space of the non-volatile storage unit 110. In this case, if the controller 115 is not informed of the data storage section where the driver setting data 1101 is stored, the controller 115 has to perform a data search in advance in order to find out the particular data storage section. Moreover, if the other firmware inside the controller 115 accesses the non-volatile storage unit 110, the controller 115 will skip the data storage section (e.g. the starting data storage section) where the driver setting data 1101 is stored so as to prevent accessing/modifying the content of the driver setting data 1101.
Please refer to
Step 300: Start;
Step 305: Execute the driver 1151 in order to read out a driver setting data (e.g. a driver setting file) for setting the driver 1151;
Step 310: The driver 1151 checks whether a driver setting data 1101 is stored in the non-volatile storage unit 110. If yes, step 315 will be executed; otherwise, step 320 will be executed;
Step 315: When it is determined that the driver setting data 1101 is stored in the non-volatile storage unit 110, the controller 115 reads out the driver setting data 1101, and sets the driver 1151 according to the driver setting data 1101 for controlling the operation of the electronic device 105;
Step 320: Load a predetermined setting data of the driver 1151 from the registry file of the operating system, and set the driver 1151 according to the predetermined setting data of the driver 1151 for controlling the operation of the electronic device 105;
Step 325: End.
In another exemplary embodiment, to prevent the driver 1151 from being illegally used, a specific password is added in the driver setting data 1101. When the driver 1151 is activated (installed), the controller 115 or the host 1150 reads out the password from the driver setting data 1101 and then checks the password. If the controller 115 or the host 1150 cannot detect the password or finds out the password is incorrect, the installation of the driver 1151 will be suspended, which causes the controller 115 to be unable to operate in accordance with the driver 1151. Consequently, the barrier to illegal usage of the driver 1151 is increased to increase security.
Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least an implementation. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment. Thus, although embodiments have been described in language specific to structural features and/or methodological acts, it is to be understood that claimed subject matter may not be limited to the specific features or acts described. Rather, the specific features and acts are disclosed as sample forms of implementing the claimed subject matter.
In summary, the advantage of the present invention is that the manufacturer/supplier does not have to modify or update the content of the installation data of the driver and does not have to modify the driver. The manufacturer/supplier only needs to perform a certification test on the driver of the controller once, which significantly saves on expenses. In addition, with the permission of the manufacturer/supplier, a customer can properly set the content of the setting data depending on his/her requirements. When the driver is activated, the modified setting data can be employed for modifying/updating the parameter of the driver, thereby updating/increasing additional control function(s) or operation(s) for the electronic device. As a result, the present invention improves the flexibility of usage of the electronic device.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention.
Number | Date | Country | Kind |
---|---|---|---|
098113686 | Apr 2009 | TW | national |