JP2010152531A - Control of apparatus corresponding to prescribed interface and having a plurality of operation modes - Google Patents
Control of apparatus corresponding to prescribed interface and having a plurality of operation modes Download PDFInfo
- Publication number
- JP2010152531A JP2010152531A JP2008328346A JP2008328346A JP2010152531A JP 2010152531 A JP2010152531 A JP 2010152531A JP 2008328346 A JP2008328346 A JP 2008328346A JP 2008328346 A JP2008328346 A JP 2008328346A JP 2010152531 A JP2010152531 A JP 2010152531A
- Authority
- JP
- Japan
- Prior art keywords
- mode
- host
- operation mode
- mouse
- current consumption
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、所定のインタフェースに対応し複数の動作モードを有する装置の制御を行う技術に関する。 The present invention relates to a technique for controlling a device corresponding to a predetermined interface and having a plurality of operation modes.
USBマウスやUSBメモリといったUSBインタフェースに対応する装置(以下「USBデバイス」とも呼ぶ)が広く普及している。USBデバイスは、USBバスを介して、例えばパーソナルコンピュータといったUSBインタフェースのホスト(以下「USBホスト」とも呼ぶ)から電力供給を受けることができる。USBデバイスは、最大消費電流値を規定したコンフィグレーションディスクリプタを保有しており、エニュメレーションと呼ばれるUSBデバイスとUSBホストとの接続開始処理時におけるUSBホストからの要求に応じてコンフィグレーションディスクリプタを返信することにより、最大消費電流値をUSBホストに通知する。 Devices (hereinafter also referred to as “USB devices”) that support a USB interface such as a USB mouse and a USB memory are widely used. A USB device can receive power supply from a USB interface host (hereinafter also referred to as “USB host”) such as a personal computer via a USB bus. The USB device has a configuration descriptor that defines the maximum current consumption value, and returns a configuration descriptor in response to a request from the USB host at the time of connection start processing between the USB device and the USB host called enumeration. Thus, the maximum current consumption value is notified to the USB host.
USB規格では、USBホストは、USBデバイスに少なくとも100ミリアンペアの電流を供給可能であることが要求される。この要件を満たす限り、USBホストの供給可能電流値は任意に設定可能であり、例えば100ミリアンペアまでの電流しか供給できないUSBホストや、500ミリアンペアの電流まで供給可能なUSBホストがある。USBデバイスの最大消費電流値がUSBホストの供給可能電流値を超える場合には、USBホストからUSBデバイスへの電力供給が拒否される(例えば特許文献1参照)。 The USB standard requires that the USB host be able to supply at least 100 milliamperes of current to the USB device. As long as this requirement is satisfied, the suppliable current value of the USB host can be arbitrarily set. For example, there are a USB host that can supply only a current of up to 100 milliamperes and a USB host that can supply a current of up to 500 milliamperes. When the maximum current consumption value of the USB device exceeds the supplyable current value of the USB host, power supply from the USB host to the USB device is rejected (see, for example, Patent Document 1).
他方、USBデバイスの中には、複数の動作モードを有し、動作モードを切り替えつつ動作可能なものがある。各動作モードにおける最大消費電流値は、各動作モードに対応するコンフィグレーションディスクリプタに規定される(例えば特許文献2参照)。 On the other hand, some USB devices have a plurality of operation modes and can operate while switching the operation modes. The maximum current consumption value in each operation mode is defined in the configuration descriptor corresponding to each operation mode (see, for example, Patent Document 2).
複数の動作モードを有するUSBデバイスでは、各動作モードでの最大消費電流値とUSBホストの供給可能電流値との関係によっては、動作の不具合が発生するおそれがあった。 In a USB device having a plurality of operation modes, there may be a problem in operation depending on the relationship between the maximum current consumption value in each operation mode and the suppliable current value of the USB host.
なお、このような問題は、USBインタフェース対応の装置に限らず、消費電流値をデバイスからホストへ通知することを要する所定のインタフェースに対応し複数の動作モードを有する装置に共通の問題であった。 Such a problem is not limited to a device compatible with the USB interface, and is a problem common to devices having a plurality of operation modes corresponding to a predetermined interface that requires a current value to be notified from the device to the host. .
本発明は、上述した従来の課題を解決するためになされたものであり、消費電流値をデバイスからホストへ通知することを要する所定のインタフェースに対応し複数の動作モードを有する装置において、動作の不具合の発生を抑制することを目的とする。 The present invention has been made to solve the above-described conventional problems, and in an apparatus having a plurality of operation modes corresponding to a predetermined interface that requires a current consumption value to be notified from a device to a host. The purpose is to suppress the occurrence of defects.
上記課題の少なくとも一部を解決するために、本発明は、以下の形態または適用例として実現することが可能である。 In order to solve at least a part of the above problems, the present invention can be realized as the following forms or application examples.
[適用例1]消費電流値をデバイスからホストへ通知することを要する所定のインタフェースに対応し、複数の動作モードを有する装置であって、
前記複数の動作モードのそれぞれにおける最大消費電流値を示す複数のモード情報を記憶する記憶部と、
前記ホストからの情報提供要求に応じて前記モード情報を返信する情報提供部と、
前記ホストによる前記モード情報に基づいた指定に従い前記複数の動作モードの内の1つを有効な動作モードとして設定するモード設定部であって、前記ホストとの接続開始時には、最大消費電流値が任意の前記ホストが供給可能な所定の基準電流値以下である第1の前記動作モードを前記有効な動作モードとして設定するモード設定部と、を備える、装置。
[Application Example 1] An apparatus having a plurality of operation modes corresponding to a predetermined interface that requires a current consumption value to be notified from a device to a host,
A storage unit for storing a plurality of mode information indicating a maximum current consumption value in each of the plurality of operation modes;
An information providing unit that returns the mode information in response to an information provision request from the host;
A mode setting unit that sets one of the plurality of operation modes as an effective operation mode in accordance with a designation based on the mode information by the host, wherein a maximum current consumption value is arbitrary at the start of connection with the host A mode setting unit that sets the first operation mode that is equal to or lower than a predetermined reference current value that can be supplied by the host as the effective operation mode.
この装置では、ホストとの接続開始時には、最大消費電流値が任意のホストが供給可能な所定の基準電流値以下である第1の動作モードが有効な動作モードとして設定されるため、ホストとの接続開始時における動作の不具合の発生を抑制することができる。 In this apparatus, when the connection with the host is started, the first operation mode whose maximum current consumption value is equal to or less than a predetermined reference current value that can be supplied by any host is set as an effective operation mode. Occurrence of malfunctions at the start of connection can be suppressed.
[適用例2]適用例1に記載の装置であって、さらに、
ユーザによる前記有効な動作モードの切り替え指示を受領する操作部を備え、
前記モード設定部は、前記第1の動作モードから最大消費電流値が前記基準電流値より大きい第2の前記動作モードへの前記切り替え指示が受領され、前記ホストによる前記指定があった場合には、前記第2の動作モードを前記有効な動作モードとして設定する、装置。
Application Example 2 The apparatus according to Application Example 1, further including:
An operation unit for receiving an instruction to switch the effective operation mode by the user;
The mode setting unit receives the switching instruction from the first operation mode to the second operation mode in which the maximum current consumption value is larger than the reference current value, and when the host has made the designation. An apparatus for setting the second operation mode as the effective operation mode.
この装置では、第1の動作モードから最大消費電流値が基準電流値より大きい第2の動作モードへの切り替え指示が受領され、かつ、ホストによる指定があった場合に、第2の動作モードが有効な動作モードとして設定されるため、動作モードの切り替えに伴う動作の不具合の発生を抑制することができる。 In this apparatus, when an instruction to switch from the first operation mode to the second operation mode in which the maximum current consumption value is larger than the reference current value is received and designated by the host, the second operation mode is Since the operation mode is set as an effective operation mode, it is possible to suppress the occurrence of an operation failure caused by the operation mode switching.
[適用例3]適用例2に記載の装置であって、
前記モード設定部は、前記切り替え指示が受領された場合には、前記インタフェースを前記ホストに前記情報提供要求を発行せしめる状態に設定する、装置。
Application Example 3 The apparatus according to Application Example 2,
The mode setting unit, when receiving the switching instruction, sets the interface to a state in which the host can issue the information provision request.
この装置では、動作モードの切り替え指示が受領された場合には、インタフェースがホストに情報提供要求を発行せしめる状態に設定されるため、その後、ホストからの情報提供要求に応じたモード情報の返信や、ホストによるモード情報に基づいた指定に従った有効な動作モードの設定が実行される。そのため、この装置では、動作の不具合の発生を抑制することができる。 In this apparatus, when an operation mode switching instruction is received, the interface is set to a state in which an information provision request is issued to the host, and thereafter, mode information is returned according to the information provision request from the host. The effective operation mode is set in accordance with the specification based on the mode information by the host. Therefore, in this device, it is possible to suppress the occurrence of operational defects.
[適用例4]適用例2または適用例3に記載の装置であって、
前記モード設定部は、前記ホストが前記第2の動作モードの最大消費電流を供給できず前記第2の動作モードを前記有効な動作モードとして指定できない場合には、前記第1の動作モードを前記有効な動作モードとして設定する、装置。
Application Example 4 The apparatus according to Application Example 2 or Application Example 3,
When the host cannot supply the maximum current consumption of the second operation mode and the second operation mode cannot be designated as the effective operation mode, the mode setting unit sets the first operation mode to the first operation mode. The device to set as a valid operating mode.
この装置では、ホストが第2の動作モードの最大消費電流を供給できず第2の動作モードを有効な動作モードとして指定できない場合には、最大消費電流値が基準電流値以下である第1の動作モードが有効な動作モードとして設定されるため、動作モードの切り替えに伴う動作の不具合の発生を抑制することができる。 In this apparatus, when the host cannot supply the maximum current consumption in the second operation mode and the second operation mode cannot be designated as an effective operation mode, the first current consumption value is equal to or less than the reference current value. Since the operation mode is set as an effective operation mode, it is possible to suppress the occurrence of an operation defect associated with the switching of the operation mode.
[適用例5]適用例2ないし適用例4のいずれかに記載の装置であって、
前記第1の動作モードは、ユーザ指示入力機能を提供するモードであり、
前記第2の動作モードは、画像入力機能を提供するモードである、装置。
Application Example 5 The apparatus according to any one of Application Example 2 to Application Example 4,
The first operation mode is a mode for providing a user instruction input function,
The apparatus in which the second operation mode is a mode for providing an image input function.
この装置では、ユーザ指示入力機能を提供する動作モードと画像入力機能を提供する動作モードとを有する装置において、動作の不具合の発生を抑制することができる。 In this apparatus, in the apparatus having the operation mode that provides the user instruction input function and the operation mode that provides the image input function, it is possible to suppress the occurrence of malfunction of the operation.
[適用例6]適用例1ないし適用例5のいずれかに記載の装置であって、
前記インタフェースは、USBインタフェースであり、
前記基準電流値は、100ミリアンペアである、装置。
Application Example 6 The apparatus according to any one of Application Example 1 to Application Example 5,
The interface is a USB interface;
The apparatus wherein the reference current value is 100 milliamps.
この装置では、USBインタフェースに対応する装置において、動作の不具合の発生を抑制することができる。 In this device, it is possible to suppress the occurrence of malfunctions in the device corresponding to the USB interface.
なお、本発明は、種々の態様で実現することが可能であり、例えば、所定のインタフェース対応の装置、この装置の制御方法、これらの方法または装置の機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体等の形態で実現することができる。 The present invention can be realized in various modes. For example, a device corresponding to a predetermined interface, a control method for the device, a computer program for realizing the function of the method or the device, and the computer It can be realized in the form of a recording medium on which the program is recorded.
次に、本発明の実施の形態を実施例に基づいて以下の順序で説明する。
A.実施例:
A−1.装置の構成:
A−2.エニュメレーション処理:
A−3.切り替え処理:
B.変形例:
Next, embodiments of the present invention will be described in the following order based on examples.
A. Example:
A-1. Device configuration:
A-2. Enumeration processing:
A-3. Switching process:
B. Variation:
A.実施例:
A−1.装置の構成:
図1は、本発明の実施例におけるマウススキャナ100の外観を示す説明図である。また、図2は、マウススキャナ100を含むコンピュータシステム10の機能的構成を示すブロック図である。図2に示すように、コンピュータシステム10は、マウススキャナ100と、パーソナルコンピュータ(以下「PC」とも呼ぶ)200と、を備えている。
A. Example:
A-1. Device configuration:
FIG. 1 is an explanatory diagram showing an appearance of a
本実施例のマウススキャナ100は、ユーザ指示入力装置としてのマウス機能と画像読み取り装置(画像入力装置)としてのイメージスキャナ機能とを備え、マウス機能を提供するマウスモードとイメージスキャナ機能を提供するスキャナモードとの間で動作モードを切り替えつつ動作する。なお、マウスモードは本発明における第1の動作モードに相当し、スキャナモードは本発明における第2の動作モードに相当する。
The
本実施例のマウススキャナ100は、USBインタフェースに対応する装置である。マウススキャナ100は、マウス機能を実現するマウス機構120と、イメージスキャナ機能を実現するスキャナ機構130と、ボタンやホイールといった操作部140と、デバイスコントローラ152を含むUSBインタフェース(USB I/F)150と、これら各要素を制御する制御部110と、を有している。また、PC200は、ホストコントローラ212を含むUSBインタフェース(USB I/F)210を有している。マウススキャナ100は、USBインタフェース150に接続されたUSBケーブル160の先端に設けられたプラグ(不図示)がPC200のUSBインタフェース210に設けられたポート(不図示)に挿入されることにより、PC200と接続される。この状態で、PC200はUSBホストとして機能し、マウススキャナ100はUSBデバイスとして機能する。
The
マウススキャナ100のマウス機構120は、マウススキャナ100の位置を検出する位置センサ122を含んでいる。位置センサ122は、所定のタイミングで、マウススキャナ100の位置を示す位置信号を出力する。マウススキャナ100は、マウスモードでの動作中は、制御部110による制御の下、この位置信号やユーザによる操作部140の操作を検知した信号を利用してマウスとして機能する。
The
マウススキャナ100のスキャナ機構130は、イメージセンサとしてのCMOSセンサ132と光源としてのLED134とを含んでおり、マウススキャナ100の底面に設けられたウィンドウ(不図示)に対向する被写体を撮像して画像信号を取得する。マウススキャナ100は、スキャナモードでの動作中は、制御部110による制御の下、この画像信号やユーザによる操作部140の操作を検知した信号、位置センサ122により出力される位置信号を利用してイメージスキャナとして機能する。
The
操作部140は、ユーザによる動作モードの切り替え指示を受領する切り替えスイッチ142を含んでいる。本実施例のマウススキャナ100では、マウスモードでの動作中に切り替えスイッチ142がユーザにより押下されると、マウスモードからスキャナモードへの動作モードの切り替え処理が実行される。反対に、スキャナモードでの動作中に切り替えスイッチ142がユーザにより押下されると、スキャナモードからマウスモードへの動作モードの切り替え処理が実行される。
The
マウススキャナ100のデバイスコントローラ152は、USBホストとしてのPC200からのコマンド(情報提供要求)に対してディスクリプタを返信する情報提供部154と、マウススキャナ100の有する動作モードの内の1つを有効な動作モードとして設定するモード設定部156と、デバイスディスクリプタDDやコンフィグレーションディスクリプタCDといったディスクリプタを格納する記憶部158と、を有している。
The device controller 152 of the
デバイスディスクリプタDDは、USBデバイスとしてのマウススキャナ100全体についての基本情報を含んでおり、例えばデバイスのクラスコードやベンダID、製品IDの他、マウススキャナ100の有するコンフィグレーション(動作モード)の個数を規定している。また、コンフィグレーションディスクリプタCDは、マウススキャナ100のコンフィグレーション(動作モード)に関する情報を含んでおり、例えば動作モードにおける各最大消費電流値を規定している。
The device descriptor DD includes basic information about the
図3は、デバイスコントローラ152が有するコンフィグレーションディスクリプタCDの一例を示す説明図である。本実施例では、デバイスコントローラ152の記憶部158には、図3(a)〜(c)に示す3つのコンフィグレーションディスクリプタCDが格納されている。なお、コンフィグレーションディスクリプタCDは、本発明におけるモード情報に相当する。
FIG. 3 is an explanatory diagram showing an example of the configuration descriptor CD that the device controller 152 has. In the present embodiment, three configuration descriptors CD shown in FIGS. 3A to 3C are stored in the
図3(a)に示したコンフィグレーションディスクリプタCDlは、マウスモードに対応するコンフィグレーション1を規定している。このコンフィグレーションディスクリプタCDlでは、オフセット8の最大消費電流値が「32h」となっている。USB規格では、コンフィグレーションディスクリプタCDのオフセット8には最大消費電流値の2分の1を示すよう定められており、「32h」は100ミリアンペアを表す。従って、マウスモード(コンフィグレーション1)での最大消費電流値は100ミリアンペアである。マウスモードでの最大消費電流値は、後述するスキャナモードでの最大消費電流値より小さいため、本明細書では、このコンフィグレーション1を「low power」とも表すものとする。
The configuration descriptor CD1 shown in FIG. 3A defines the
なお、USB規格では、USBホストは、USBデバイスに少なくとも100ミリアンペアの電流を供給可能であることが要求される。本明細書では、この電流値(100ミリアンペア)を基準電流値とも呼ぶ。マウスモードは、最大消費電流値が基準電流値以下の動作モードである。 In the USB standard, the USB host is required to be able to supply a current of at least 100 milliamperes to the USB device. In this specification, this current value (100 milliamperes) is also referred to as a reference current value. The mouse mode is an operation mode in which the maximum current consumption value is equal to or less than the reference current value.
図3(b)に示したコンフィグレーションディスクリプタCDhは、スキャナモードに対応するコンフィグレーション2を規定している。このコンフィグレーションディスクリプタCDhでは、オフセット8の最大消費電流値が「FAh」となっていることから、スキャナモード(コンフィグレーション2)での最大消費電流値は500ミリアンペアである。スキャナモードでの最大消費電流値は、マウスモードでの最大消費電流値より大きいため、本明細書では、このコンフィグレーション2を「high power」とも表すものとする。スキャナモードは、最大消費電流値が基準電流値より大きい動作モードである。
The configuration descriptor CDh shown in FIG. 3B defines the
図3(c)に示したコンフィグレーションディスクリプタCDaは、代替モードに対応するコンフィグレーション3を規定している。代替モードは、マウスモードでもスキャナモードでもない第3の動作モードである。このコンフィグレーションディスクリプタCDaでは、オフセット8の最大消費電流値が「32h」となっていることから、代替モード(コンフィグレーション3)での最大消費電流値は、マウスモードと同様に100ミリアンペアである。本明細書では、このコンフィグレーション3を「alternate」とも表すものとする。代替モードは、最大消費電流値が基準電流値以下の動作モードである。
The configuration descriptor CDa shown in FIG. 3C defines the
なお、マウススキャナ100のデバイスコントローラ152の記憶部158(図2)には、デバイスディスクリプタDDやコンフィグレーションディスクリプタCDの他に、各コンフィグレーションを構成するインタフェースについての情報を含むインタフェースディスクリプタや、各インタフェースを構成するエンドポイントについての情報を含むエンドポイントディスクリプタが格納されている。
In addition to the device descriptor DD and the configuration descriptor CD, the storage unit 158 (FIG. 2) of the device controller 152 of the
A−2.エニュメレーション処理
図4は、コンピュータシステム10におけるエニュメレーション処理の流れを示すフローチャートである。エニュメレーション処理は、USBデバイスとしてのマウススキャナ100とUSBホストとしてのPC200との接続開始処理であり、具体的には、USBホストがUSBデバイスについて知り、USBホストとUSBデバイスとの間で通信可能となるように情報交換を行う処理である。
A-2. Enumeration Processing FIG. 4 is a flowchart showing the flow of enumeration processing in the
ステップS110(図4)では、USBホストとしてのPC200が、USBデバイスが検出されたか否かを判定する。PC200のホストコントローラ212(図2)は、USBインタフェース210のポートをポーリングし、ポートへのUSBデバイス(のプラグ)の着脱を監視する。コンピュータシステム10の起動時にマウススキャナ100がPC200に物理的に接続されていた場合や、コンピュータシステム10の起動後にマウススキャナ100がPC200に新たに物理的に接続された場合には、PC200によりUSBデバイスが検出される。
In step S110 (FIG. 4), the
USBデバイスが検出されると、PC200のホストコントローラ212は、検出されたUSBデバイス(マウススキャナ100)に対してアドレス設定を要求するコマンドを発行する(ステップS120)。これによりUSBデバイスとしてのマウススキャナ100にユニークなアドレスが割り当てられる。
When the USB device is detected, the
次に、PC200のホストコントローラ212は、割り当てられた新しいアドレスを用いて、マウススキャナ100に対してデバイスディスクリプタDDを要求するコマンドを発行する(ステップS130)。コマンドを受領したマウススキャナ100のデバイスコントローラ152は、情報提供部154にホストコントローラ212に対してデバイスディスクリプタDD(図2)を返信させる(ステップS140)。
Next, the
デバイスディスクリプタDDを受領したPC200のホストコントローラ212は、マウススキャナ100に対して、コンフィグレーションディスクリプタCDを要求するコマンドを発行する(ステップS150)。コマンドを受領したマウススキャナ100のデバイスコントローラ152は、情報提供部154にホストコントローラ212に対してコンフィグレーションディスクリプタCD(図2)を返信させる(ステップS160)。このとき情報提供部154は、マウスモードに対応するコンフィグレーション1がUSBホストによって選択されるように、コンフィグレーションディスクリプタCDを転送する。例えば、マウスモードに対応するコンフィグレーション1のコンフィグレーションディスクリプタCDl(図3(a))が先頭で転送されるものとしてもよいし、マウスモードに対応するコンフィグレーション1を指定する情報が付加されたコンフィグレーションディスクリプタCDが転送されるとしてもよいし、マウスモードに対応するコンフィグレーション1のコンフィグレーションディスクリプタCDlのみが転送されるものとしてもよい。また、このとき、転送されるコンフィグレーションディスクリプタCDに従属するインタフェースディスクリプタやエンドポイントディスクリプタも同様に、ホストコントローラ212に対して転送される。ステップS130〜S160の処理により、USBデバイスとしてのマウススキャナ100についての情報が、USBホストとしてのPC200に取得される。
The
ステップS170では、PC200が、取得したディスクリプタに基づき、USBデバイスとしてのマウススキャナ100に最適なデバイスドライバを割り当て、ロードする。ステップS180では、PC200のホストコントローラ212が、マウススキャナ100に対して、取得したディスクリプタに基づきマウスモードに対応するコンフィグレーション1(low power)を選択・指定し、コンフィグレーションの設定を要求するコマンドを発行する。コマンドを受領したマウススキャナ100のデバイスコントローラ152のモード設定部156(図2)は、コンフィグレーション1(low power)を有効(アクティブ)とすることにより、マウスモードを有効な動作モードとして設定する(ステップS190)。これにより、USBデバイスとしてのマウススキャナ100は、マウスモードでの動作が可能な状態となる。
In step S170, the
以上説明したように、エニュメレーション処理の際には、最大消費電流値が任意のUSBホストが供給可能な電流値(基準電流値)以下の動作モードであるマウスモードが有効な動作モードとして設定される。そのため、本実施例のマウススキャナ100は、エニュメレーション処理において、USBホストとしてのPC200により電力供給を拒否されることはない。従って、本実施例のマウススキャナ100では、エニュメレーション処理における動作の不具合の発生が抑制される。
As described above, in the enumeration process, the mouse mode, which is an operation mode in which the maximum current consumption value is less than the current value (reference current value) that can be supplied by any USB host, is set as an effective operation mode. Is done. Therefore, the
A−3.切り替え処理:
図5は、マウスモードからスキャナモードへと動作モードを切り替える切り替え処理の流れを示すフローチャートである。マウスモードでの動作時に、ユーザによる切り替えスイッチ142(図2)の押下(切り替え指示)が検出されると(ステップS210:Yes)、マウススキャナ100のデバイスコントローラ152は、USBバスのデータラインをリセット状態(D+ラインとD−ラインとの両方がlowの状態)に設定する(ステップS220)。このUSBバスのリセット状態は、USBホストにディスクリプタの要求コマンド発行を含む再エニュメレーションを実行せしめる状態である。
A-3. Switching process:
FIG. 5 is a flowchart showing a flow of switching processing for switching the operation mode from the mouse mode to the scanner mode. When the user presses the changeover switch 142 (FIG. 2) (switching instruction) is detected during operation in the mouse mode (step S210: Yes), the device controller 152 of the
PC200のホストコントローラ212(図2)は、USBバスの状態を監視している。ホストコントローラ212がUSBバスのリセット状態を検出すると、PC200はデバイスドライバを終了する(ステップS230)。また、ホストコントローラ212は、USBバスがリセットされたため、あらためてUSBデバイスとしてのマウススキャナ100を検出し、再エニュメレーションを実行する(ステップS240)。すなわち、PC200のホストコントローラ212は、USBデバイスとしてのマウススキャナ100に対して、コンフィグレーションディスクリプタCDを要求するコマンドを発行する(ステップS250)。なお、本実施例では、最初のエニュメレーション処理(図4)において設定されたマウススキャナ100のアドレスや転送されたデバイスディスクリプタDDは維持されるものとして説明を行うが、あらためてアドレス設定要求(図4のステップS120)やデバイスディスクリプタ要求(図4のステップS130)が発行された後に、コンフィグレーションディスクリプタ要求が発行されるとしてもよい。
The host controller 212 (FIG. 2) of the
コンフィグレーションディスクリプタCDを要求するコマンドを受領したマウススキャナ100のデバイスコントローラ152は、情報提供部154にホストコントローラ212に対してコンフィグレーションディスクリプタCD(図2)を返信させる(ステップS260)。このとき情報提供部154は、スキャナモードに対応するコンフィグレーション2がUSBホストによって選択されるように、コンフィグレーションディスクリプタCDを転送する。例えば、スキャナモードに対応するコンフィグレーション2のコンフィグレーションディスクリプタCDh(図3(b))が先頭で転送されるものとしてもよいし、スキャナモードに対応するコンフィグレーション2を指定する情報が付加されたコンフィグレーションディスクリプタCDが転送されるとしてもよいし、スキャナモードに対応するコンフィグレーション2のコンフィグレーションディスクリプタCDhのみが転送されるものとしてもよい。また、このとき、転送されるコンフィグレーションディスクリプタCDに従属するインタフェースディスクリプタやエンドポイントディスクリプタも同様に、ホストコントローラ212に対して転送される。
Upon receiving the command requesting the configuration descriptor CD, the device controller 152 of the
ステップS270では、PC200が、取得したディスクリプタに基づき、USBデバイスとしてのマウススキャナ100に最適なデバイスドライバを割り当て、ロードする。ステップS280では、PC200のホストコントローラ212が、USBバスにバスパワーとして最大500ミリアンペアの電流を供給できるか否かを判定する。ステップS280において供給可能と判定された場合には、PC200のホストコントローラ212が、マウススキャナ100に対して、取得したディスクリプタに基づきスキャナモードに対応するコンフィグレーション2(high power)を選択・指定し、コンフィグレーションの設定を要求するコマンドを発行する(ステップS290)。コマンドを受領したマウススキャナ100のデバイスコントローラ152のモード設定部156は、コンフィグレーション2(high power)を有効(アクティブ)とすることにより、スキャナモードを有効な動作モードとして設定する(ステップS300)。これにより、USBデバイスとしてのマウススキャナ100の動作モードは、マウスモードからスキャナモードに変更される。
In step S270, the
一方、ステップS280において供給不可能と判定された場合には、PC200のホストコントローラ212が、マウススキャナ100に対して、代替モードに対応するコンフィグレーション3(alternate)を選択・指定し、コンフィグレーションの設定を要求するコマンドを発行する(ステップS320)。コマンドを受領したマウススキャナ100のデバイスコントローラ152のモード設定部156は、コンフィグレーション3(alternate)を有効(アクティブ)に設定する(ステップS330)。これにより、USBデバイスとしてのマウススキャナ100は、マウスモードでもスキャナモードでもない代替モードとなる。
On the other hand, if it is determined in step S280 that supply is not possible, the
続いてPC200のホストコントローラ212は、マウススキャナ100に対して、マウスモードに対応するコンフィグレーション1(low power)を選択・指定し、コンフィグレーションの設定を要求するコマンドを発行する(ステップS340)。コマンドを受領したマウススキャナ100のデバイスコントローラ152のモード設定部156は、コンフィグレーション1(low power)を有効(アクティブ)とすることにより、マウスモードを有効な動作モードとして設定する(ステップS350)。これにより、USBデバイスとしてのマウススキャナ100は、スキャナモードへの切り替えは行われず、マウスモードへと戻ることとなる。
Subsequently, the
ステップS360では、PC200が、スキャナモードのように最大消費電流値が500ミリアンペアのハイパワーデバイスはサポートされていない旨を、図示しないディスプレイに表示する。これにより、PC200の下では、マウススキャナ100をスキャナモードで動作させることはできないことをユーザに認識させることができる。
In step S360, the
図6は、スキャナモードからマウスモードへと動作モードを切り替える切り替え処理の流れを示すフローチャートである。上述したように、マウススキャナ100のマウスモードでの最大消費電流は100ミリアンペアであるため、マウスモードへの切り替えはUSBホストの供給可能電流に関わらず、実行可能である。
FIG. 6 is a flowchart showing a flow of switching processing for switching the operation mode from the scanner mode to the mouse mode. As described above, since the maximum current consumption in the mouse mode of the
スキャナモードでの動作時に、ユーザによる切り替えスイッチ142(図2)の押下(切り替え指示)が検出されると(ステップS410:Yes)、マウススキャナ100のデバイスコントローラ152は、USBバスのデータラインをリセット状態(D+ラインとD−ラインとの両方がlowの状態)にする(ステップS420)。
When the user presses the changeover switch 142 (FIG. 2) (switching instruction) is detected during operation in the scanner mode (step S410: Yes), the device controller 152 of the
PC200のホストコントローラ212(図2)は、USBバスの状態を監視しており、ホストコントローラ212がUSBバスのリセット状態を検出すると、PC200はデバイスドライバを終了する(ステップS430)。また、ホストコントローラ212は、USBバスがリセットされたため、あらためてUSBデバイスとしてのマウススキャナ100を検出し、再エニュメレーションを実行する(ステップS440)。すなわち、PC200のホストコントローラ212は、USBデバイスとしてのマウススキャナ100に対して、コンフィグレーションディスクリプタCDを要求するコマンドを発行する(ステップS450)。なお、あらためてアドレス設定要求(図4のステップS120)やデバイスディスクリプタ要求(図4のステップS130)が発行された後に、コンフィグレーションディスクリプタ要求が発行されるとしてもよいことは、図5に示した切り替え処理と同様である。
The host controller 212 (FIG. 2) of the
コンフィグレーションディスクリプタCDを要求するコマンドを受領したマウススキャナ100のデバイスコントローラ152は、情報提供部154にホストコントローラ212に対してコンフィグレーションディスクリプタCD(図2)を返信させる(ステップS460)。このとき情報提供部154は、マウスモードに対応するコンフィグレーション1がUSBホストによって選択されるように、コンフィグレーションディスクリプタCDを転送する。また、このとき、転送されるコンフィグレーションディスクリプタCDに従属するインタフェースディスクリプタやエンドポイントディスクリプタも同様に、ホストコントローラ212に対して転送される。
The device controller 152 of the
ステップS470では、PC200が、取得したディスクリプタに基づき、USBデバイスとしてのマウススキャナ100に最適なデバイスドライバを割り当て、ロードする。その後、PC200のホストコントローラ212は、マウススキャナ100に対して、取得したディスクリプタに基づきマウスモードに対応するコンフィグレーション1(low power)を選択・指定し、コンフィグレーションの設定を要求するコマンドを発行する(ステップS480)。コマンドを受領したマウススキャナ100のデバイスコントローラ152のモード設定部156は、コンフィグレーション1(low power)を有効(アクティブ)とすることにより、マウスモードを有効な動作モードとして設定する(ステップS490)。これにより、USBデバイスとしてのマウススキャナ100の動作モードは、スキャナモードからマウスモードに変更される。
In step S470, the
以上説明したように、マウスモードからスキャナモードへの切り替え(図5)の指示が受領され、PC200がスキャナモードの最大消費電流値(500ミリアンペア)を供給可能であるとしてPC200によるスキャナモードの指定があった場合には、スキャナモードが有効な動作モードとして設定される。一方、マウスモードからスキャナモードへの切り替え(図5)の指示が受領されても、PC200がスキャナモードの最大消費電流値を供給可能でないとしてPC200によるマウスモードの指定があった場合には、マウスモードが有効な動作モードとして設定される。また、スキャナモードからマウスモードへの切り替え(図6)の指示が受領された場合には、PC200はマウスモードの最大消費電流値(100ミリアンペア)を常に供給可能であるため、PC200によるマウスモードの指定に従い、マウスモードが有効な動作モードとして設定される。従って、本実施例のマウススキャナ100では、USBホストとしてのPC200の供給可能電流値に関わらず、動作モードの切り替えに伴う動作の不具合の発生が抑制される。
As described above, the instruction for switching from the mouse mode to the scanner mode (FIG. 5) is received, and the
B.変形例:
なお、この発明は上記の実施例や実施形態に限られるものではなく、その要旨を逸脱しない範囲において種々の態様において実施することが可能であり、例えば次のような変形も可能である。
B. Variation:
The present invention is not limited to the above-described examples and embodiments, and can be implemented in various modes without departing from the gist thereof. For example, the following modifications are possible.
B−1.変形例1:
上記実施例では、マウススキャナ100を例に用いて説明したが、本発明はマウススキャナ100に限らず、消費電流値をデバイスからホストへ通知することを要するインタフェースに対応する装置一般に適用可能である。また、本発明は、動作モードの数や、動作モードの種類(マウス機能を提供するマウスモードやイメージスキャナ機能を提供するスキャナモード)に限らず、任意の機能を提供する複数の動作モードを有する装置に適用可能である。例えば、本発明は、マウスモードやスキャナモードに加えて、あるいはそれらの代わりに、Webカメラ機能を提供するカメラモードや、オーディオ機能を提供するオーディオモードなどを有する装置にも適用可能である。
B-1. Modification 1:
In the above-described embodiment, the
B−2.変形例2:
上記実施例では、エニュメレーション処理において、マウスモードが有効な動作モードとして設定されているが、エニュメレーション処理において有効な動作モードとして設定される動作モードは、最大消費電流値がUSBホストの基準電流値(100ミリアンペア)以下の動作モードであれば、他の動作モードであってもよい。例えば、マウススキャナ100が、マウスモードとスキャナモードの他に、最大消費電流値が32ミリアンペアである第3の動作モードを有している場合には、エニュメレーション処理において第3の動作モードが有効な動作モードとして設定されるとしてもよいし、この場合であってもマウスモードが有効な動作モードとして設定されるとしてもよい。
B-2. Modification 2:
In the above embodiment, the mouse mode is set as an effective operation mode in the enumeration process, but the operation mode set as an effective operation mode in the enumeration process has a maximum current consumption value of the USB host. Other operation modes may be used as long as the operation mode is equal to or lower than the reference current value (100 mA). For example, when the
B−3.変形例3:
上記実施例におけるコンピュータシステム10の構成はあくまで一例であり、コンピュータシステム10の構成は種々変更可能である。例えば、例えば、スキャナ機構130がCMOSセンサ132以外のイメージセンサやLED134以外の光源を含むとしてもよい。また、デバイスディスクリプタDDやコンフィグレーションディスクリプタCDの内容もあくまで一例であり、これらの内容は種々変更可能である。
B-3. Modification 3:
The configuration of the
B−4.変形例4:
上記実施例におけるエニュメレーション処理(図4)や切り替え処理(図5および図6)の処理内容はあくまで一例であり、これらの処理内容は種々変更可能である。例えば、エニュメレーション処理において、ポートの状態を検出する処理やデバイスのデータ転送スピードを検出する処理が行われるとしてもよい。
B-4. Modification 4:
The processing contents of the enumeration process (FIG. 4) and the switching process (FIGS. 5 and 6) in the above embodiment are merely examples, and these processing contents can be variously changed. For example, in the enumeration process, a process for detecting the port state or a process for detecting the data transfer speed of the device may be performed.
B−5.変形例5:
上記実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部をハードウェアに置き換えるようにしてもよい。
B-5. Modification 5:
In the above embodiment, a part of the configuration realized by hardware may be replaced with software, and conversely, a part of the configuration realized by software may be replaced by hardware.
また、本発明の機能の一部または全部がソフトウェアで実現される場合には、そのソフトウェア(コンピュータプログラム)は、コンピュータ読み取り可能な記録媒体に格納された形で提供することができる。コンピュータ読み取り可能な記録媒体とは、フレキシブルディスクやCD−ROMのような携帯型の記録媒体に限らず、各種のRAMやROM等のコンピュータ内の内部記憶装置や、ハードディスク等のコンピュータに固定されている外部記憶装置も含んでいる。 In addition, when part or all of the functions of the present invention are realized by software, the software (computer program) can be provided in a form stored in a computer-readable recording medium. The computer-readable recording medium is not limited to a portable recording medium such as a flexible disk or a CD-ROM, but is fixed to an internal storage device in the computer such as various RAMs and ROMs, or a computer such as a hard disk. Including external storage devices.
10…コンピュータシステム
100…マウススキャナ
110…制御部
120…マウス機構
122…位置センサ
130…スキャナ機構
132…CMOSセンサ
134…LED
140…操作部
142…切り替えスイッチ
150…USBインタフェース
152…デバイスコントローラ
154…情報提供部
156…モード設定部
158…記憶部
160…USBケーブル
200…PC
210…USBインタフェース
212…ホストコントローラ
DESCRIPTION OF
DESCRIPTION OF
210 ...
Claims (8)
前記複数の動作モードのそれぞれにおける最大消費電流値を示す複数のモード情報を記憶する記憶部と、
前記ホストからの情報提供要求に応じて前記モード情報を返信する情報提供部と、
前記ホストによる前記モード情報に基づいた指定に従い前記複数の動作モードの内の1つを有効な動作モードとして設定するモード設定部であって、前記ホストとの接続開始時には、最大消費電流値が任意の前記ホストが供給可能な所定の基準電流値以下である第1の前記動作モードを前記有効な動作モードとして設定するモード設定部と、を備える、装置。 A device having a plurality of operation modes corresponding to a predetermined interface that requires notification of a current consumption value from the device to the host,
A storage unit for storing a plurality of mode information indicating a maximum current consumption value in each of the plurality of operation modes;
An information providing unit that returns the mode information in response to an information provision request from the host;
A mode setting unit that sets one of the plurality of operation modes as an effective operation mode in accordance with a designation based on the mode information by the host, wherein a maximum current consumption value is arbitrary at the start of connection with the host A mode setting unit that sets the first operation mode that is equal to or lower than a predetermined reference current value that can be supplied by the host as the effective operation mode.
ユーザによる前記有効な動作モードの切り替え指示を受領する操作部を備え、
前記モード設定部は、前記第1の動作モードから最大消費電流値が前記基準電流値より大きい第2の前記動作モードへの前記切り替え指示が受領され、前記ホストによる前記指定があった場合には、前記第2の動作モードを前記有効な動作モードとして設定する、装置。 The apparatus of claim 1, further comprising:
An operation unit for receiving an instruction to switch the effective operation mode by the user;
The mode setting unit receives the switching instruction from the first operation mode to the second operation mode in which the maximum current consumption value is larger than the reference current value, and when the host has made the designation. An apparatus for setting the second operation mode as the effective operation mode.
前記モード設定部は、前記切り替え指示が受領された場合には、前記インタフェースを前記ホストに前記情報提供要求を発行せしめる状態に設定する、装置。 The apparatus of claim 2, comprising:
The mode setting unit, when receiving the switching instruction, sets the interface to a state in which the host can issue the information provision request.
前記モード設定部は、前記ホストが前記第2の動作モードの最大消費電流を供給できず前記第2の動作モードを前記有効な動作モードとして指定できない場合には、前記第1の動作モードを前記有効な動作モードとして設定する、装置。 An apparatus according to claim 2 or claim 3, wherein
When the host cannot supply the maximum current consumption of the second operation mode and the second operation mode cannot be designated as the effective operation mode, the mode setting unit sets the first operation mode to the first operation mode. The device to set as a valid operating mode.
前記第1の動作モードは、ユーザ指示入力機能を提供するモードであり、
前記第2の動作モードは、画像入力機能を提供するモードである、装置。 An apparatus according to any one of claims 2 to 4,
The first operation mode is a mode for providing a user instruction input function,
The apparatus in which the second operation mode is a mode for providing an image input function.
前記インタフェースは、USBインタフェースであり、
前記基準電流値は、100ミリアンペアである、装置。 An apparatus according to any one of claims 1 to 5,
The interface is a USB interface;
The apparatus wherein the reference current value is 100 milliamps.
(a)前記ホストからの情報提供要求に応じて、前記動作モードにおける最大消費電流値を示すモード情報を返信する工程と、
(b)前記ホストによる前記モード情報に基づいた指定に従い前記複数の動作モードの内の1つを有効な動作モードとして設定する工程であって、前記ホストとの接続開始時に、最大消費電流値が任意の前記ホストが供給可能な所定の基準電流値以下である第1の前記動作モードを前記有効な動作モードとして設定する工程と、を備える、方法。 A method for controlling a device having a plurality of operation modes corresponding to a predetermined interface that requires notification of a current consumption value from a device to a host,
(A) returning a mode information indicating a maximum current consumption value in the operation mode in response to an information provision request from the host;
(B) a step of setting one of the plurality of operation modes as an effective operation mode in accordance with a designation based on the mode information by the host, wherein a maximum current consumption value is set at the start of connection with the host; Setting the first operation mode that is equal to or lower than a predetermined reference current value that can be supplied by any of the hosts as the effective operation mode.
前記ホストからの情報提供要求に応じて、前記動作モードにおける最大消費電流値を示すモード情報を返信する機能と、
前記ホストによる前記モード情報に基づいた指定に従い前記複数の動作モードの内の1つを有効な動作モードとして設定する機能であって、前記ホストとの接続開始時に、最大消費電流値が任意の前記ホストが供給可能な所定の基準電流値以下である第1の前記動作モードを前記有効な動作モードとして設定する機能と、をコンピュータに実現させる、プログラム。 A program for controlling a device having a plurality of operation modes corresponding to a predetermined interface that requires notification of a current consumption value from a device to a host,
A function of returning mode information indicating a maximum current consumption value in the operation mode in response to an information provision request from the host;
A function of setting one of the plurality of operation modes as an effective operation mode in accordance with the specification based on the mode information by the host, wherein the maximum current consumption value is arbitrary when the connection with the host is started. A program that causes a computer to realize a function of setting the first operation mode that is not more than a predetermined reference current value that can be supplied by a host as the effective operation mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008328346A JP2010152531A (en) | 2008-12-24 | 2008-12-24 | Control of apparatus corresponding to prescribed interface and having a plurality of operation modes |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008328346A JP2010152531A (en) | 2008-12-24 | 2008-12-24 | Control of apparatus corresponding to prescribed interface and having a plurality of operation modes |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010152531A true JP2010152531A (en) | 2010-07-08 |
Family
ID=42571570
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008328346A Withdrawn JP2010152531A (en) | 2008-12-24 | 2008-12-24 | Control of apparatus corresponding to prescribed interface and having a plurality of operation modes |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010152531A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013140533A (en) * | 2012-01-06 | 2013-07-18 | Seiko Epson Corp | Display device, projector, display system, and method of switching device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004070785A (en) * | 2002-08-08 | 2004-03-04 | Onkyo Corp | Serial bus connecting apparatus and driver software |
JP2005135220A (en) * | 2003-10-31 | 2005-05-26 | Hitachi Ins Software Ltd | Pointing device with image reading function |
JP2005352864A (en) * | 2004-06-11 | 2005-12-22 | Canon Inc | Input and output device, and method of controlling input device |
JP2006340047A (en) * | 2005-06-02 | 2006-12-14 | Ricoh Co Ltd | Electronic device |
-
2008
- 2008-12-24 JP JP2008328346A patent/JP2010152531A/en not_active Withdrawn
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004070785A (en) * | 2002-08-08 | 2004-03-04 | Onkyo Corp | Serial bus connecting apparatus and driver software |
JP2005135220A (en) * | 2003-10-31 | 2005-05-26 | Hitachi Ins Software Ltd | Pointing device with image reading function |
JP2005352864A (en) * | 2004-06-11 | 2005-12-22 | Canon Inc | Input and output device, and method of controlling input device |
JP2006340047A (en) * | 2005-06-02 | 2006-12-14 | Ricoh Co Ltd | Electronic device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013140533A (en) * | 2012-01-06 | 2013-07-18 | Seiko Epson Corp | Display device, projector, display system, and method of switching device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4601330B2 (en) | Electronic device and control method thereof, information processing apparatus, and computer program | |
US7565561B2 (en) | System for controlling voltage supplied to communication interface between energy-saving mode and normal mode through the used of a resistor upon whether external device is connected | |
JP4960899B2 (en) | Image processing apparatus, serial bus control method, serial bus control program, and recording medium | |
US20080162955A1 (en) | Usb host, usb device, and methods of controlling the host and the device | |
JP2005062955A (en) | Electronic apparatus and power source control method | |
JP2009176152A (en) | Information processing apparatus | |
US20150199154A1 (en) | Information processing apparatus that suppresses power consumption and method for controlling the same, and storage medium | |
US20140380077A1 (en) | Information processing apparatus and control method of information processing apparatus | |
JP7322561B2 (en) | Information processing equipment | |
US9967417B2 (en) | Managing apparatus power states | |
JP2010099907A (en) | Display control device, display control system, program, and image printer | |
JP4239930B2 (en) | Data transfer control system, electronic device and program | |
US10534423B2 (en) | Information processing apparatus configured to select swap area based on power mode, method of controlling the same, and non-transitory computer-readable storage medium | |
JP2010152531A (en) | Control of apparatus corresponding to prescribed interface and having a plurality of operation modes | |
US20140118779A1 (en) | Image forming apparatus and control method for image forming apparatus | |
JP5783348B2 (en) | Control device, control program, and image forming apparatus | |
JP2009003586A (en) | Information processor and method for controlling information processor | |
US20120047375A1 (en) | Information processing apparatus, method of controlling the same, and storage medium | |
JP6532240B2 (en) | Information processing apparatus and control method thereof | |
JP2008165400A (en) | Information access device, information processor, information access program, information access method, and information processing method | |
US9692925B2 (en) | Image processing apparatus that facilitates restoration from protection mode of included hard disk drive, method for controlling image processing apparatus, and storage medium | |
JP2018130910A (en) | Image forming device having power-saving mode, and control method and program thereof | |
JP6391309B2 (en) | Multi-screen display system and multi-screen display method | |
JP6370592B2 (en) | KVM switch, control method for KVM switch, and information processing apparatus | |
JP2012212399A (en) | Electronic control device and reset control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20111110 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20121114 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121204 |
|
A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20121221 |