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 PDF

Info

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
Application number
JP2008328346A
Other languages
Japanese (ja)
Inventor
Gunawan Sutono
グナワン ストノ
Bun Chen Lee
ブン チェン リー
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2008328346A priority Critical patent/JP2010152531A/en
Publication of JP2010152531A publication Critical patent/JP2010152531A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To suppress occurrence of trouble of operation, in an apparatus corresponding to a prescribed interface needing to notify a current consumption value from a device to a host and having a plurality of operation modes. <P>SOLUTION: The apparatus includes: a storage part for storing a plurality of pieces of mode information each indicating a maximum current consumption value in each of the plurality of operation modes; an information provision part for returning the mode information according to an information provision request from the host; and a mode setting part for setting one of the plurality of operation modes as an effective operation mode according to designation based on the mode information by the host. The mode setting part sets a first operation mode wherein the maximum current consumption value is not more than a prescribed reference current value capable of being supplied by an optional host as the effective operation mode when starting connection with the host. <P>COPYRIGHT: (C)2010,JPO&INPIT

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).

特開2005−278110号公報JP-A-2005-278110 特開2007−72907号公報JP 2007-72907 A

複数の動作モードを有する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 mouse scanner 100 according to an embodiment of the present invention. FIG. 2 is a block diagram showing a functional configuration of the computer system 10 including the mouse scanner 100. As shown in FIG. 2, the computer system 10 includes a mouse scanner 100 and a personal computer (hereinafter also referred to as “PC”) 200.

本実施例のマウススキャナ100は、ユーザ指示入力装置としてのマウス機能と画像読み取り装置(画像入力装置)としてのイメージスキャナ機能とを備え、マウス機能を提供するマウスモードとイメージスキャナ機能を提供するスキャナモードとの間で動作モードを切り替えつつ動作する。なお、マウスモードは本発明における第1の動作モードに相当し、スキャナモードは本発明における第2の動作モードに相当する。   The mouse scanner 100 of this embodiment has a mouse function as a user instruction input device and an image scanner function as an image reading device (image input device), and provides a mouse mode that provides a mouse function and a scanner that provides an image scanner function. It operates while switching the operation mode between modes. The mouse mode corresponds to the first operation mode in the present invention, and the scanner mode corresponds to the second operation mode in the present invention.

本実施例のマウススキャナ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 mouse scanner 100 of this embodiment is a device that supports a USB interface. The mouse scanner 100 includes a mouse mechanism 120 that realizes a mouse function, a scanner mechanism 130 that realizes an image scanner function, an operation unit 140 such as buttons and wheels, and a USB interface (USB I / F) 150 including a device controller 152. , And a control unit 110 that controls each of these elements. The PC 200 has a USB interface (USB I / F) 210 including a host controller 212. The mouse scanner 100 is connected to the PC 200 by inserting a plug (not shown) provided at the tip of the USB cable 160 connected to the USB interface 150 into a port (not shown) provided in the USB interface 210 of the PC 200. Connected. In this state, the PC 200 functions as a USB host, and the mouse scanner 100 functions as a USB device.

マウススキャナ100のマウス機構120は、マウススキャナ100の位置を検出する位置センサ122を含んでいる。位置センサ122は、所定のタイミングで、マウススキャナ100の位置を示す位置信号を出力する。マウススキャナ100は、マウスモードでの動作中は、制御部110による制御の下、この位置信号やユーザによる操作部140の操作を検知した信号を利用してマウスとして機能する。   The mouse mechanism 120 of the mouse scanner 100 includes a position sensor 122 that detects the position of the mouse scanner 100. The position sensor 122 outputs a position signal indicating the position of the mouse scanner 100 at a predetermined timing. During operation in the mouse mode, the mouse scanner 100 functions as a mouse using the position signal and a signal detected by the user to operate the operation unit 140 under the control of the control unit 110.

マウススキャナ100のスキャナ機構130は、イメージセンサとしてのCMOSセンサ132と光源としてのLED134とを含んでおり、マウススキャナ100の底面に設けられたウィンドウ(不図示)に対向する被写体を撮像して画像信号を取得する。マウススキャナ100は、スキャナモードでの動作中は、制御部110による制御の下、この画像信号やユーザによる操作部140の操作を検知した信号、位置センサ122により出力される位置信号を利用してイメージスキャナとして機能する。   The scanner mechanism 130 of the mouse scanner 100 includes a CMOS sensor 132 as an image sensor and an LED 134 as a light source, and images a subject facing a window (not shown) provided on the bottom surface of the mouse scanner 100. Get the signal. During operation in the scanner mode, the mouse scanner 100 uses the image signal, a signal detected by the user to operate the operation unit 140, and a position signal output from the position sensor 122 under the control of the control unit 110. Functions as an image scanner.

操作部140は、ユーザによる動作モードの切り替え指示を受領する切り替えスイッチ142を含んでいる。本実施例のマウススキャナ100では、マウスモードでの動作中に切り替えスイッチ142がユーザにより押下されると、マウスモードからスキャナモードへの動作モードの切り替え処理が実行される。反対に、スキャナモードでの動作中に切り替えスイッチ142がユーザにより押下されると、スキャナモードからマウスモードへの動作モードの切り替え処理が実行される。   The operation unit 140 includes a changeover switch 142 that receives an operation mode switching instruction from the user. In the mouse scanner 100 of this embodiment, when the changeover switch 142 is pressed by the user during the operation in the mouse mode, the operation mode switching process from the mouse mode to the scanner mode is executed. On the other hand, when the changeover switch 142 is pressed by the user during the operation in the scanner mode, the operation mode switching process from the scanner mode to the mouse mode is executed.

マウススキャナ100のデバイスコントローラ152は、USBホストとしてのPC200からのコマンド(情報提供要求)に対してディスクリプタを返信する情報提供部154と、マウススキャナ100の有する動作モードの内の1つを有効な動作モードとして設定するモード設定部156と、デバイスディスクリプタDDやコンフィグレーションディスクリプタCDといったディスクリプタを格納する記憶部158と、を有している。   The device controller 152 of the mouse scanner 100 validates one of the operation modes of the mouse scanner 100 and the information provider 154 that returns a descriptor in response to a command (information provision request) from the PC 200 as a USB host. It has a mode setting unit 156 that sets the operation mode, and a storage unit 158 that stores descriptors such as a device descriptor DD and a configuration descriptor CD.

デバイスディスクリプタDDは、USBデバイスとしてのマウススキャナ100全体についての基本情報を含んでおり、例えばデバイスのクラスコードやベンダID、製品IDの他、マウススキャナ100の有するコンフィグレーション(動作モード)の個数を規定している。また、コンフィグレーションディスクリプタCDは、マウススキャナ100のコンフィグレーション(動作モード)に関する情報を含んでおり、例えば動作モードにおける各最大消費電流値を規定している。   The device descriptor DD includes basic information about the entire mouse scanner 100 as a USB device. For example, the device descriptor DD indicates the number of configurations (operation modes) of the mouse scanner 100 in addition to the device class code, vendor ID, and product ID. It stipulates. The configuration descriptor CD includes information related to the configuration (operation mode) of the mouse scanner 100, and defines, for example, each maximum current consumption value in the operation mode.

図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 storage unit 158 of the device controller 152. The configuration descriptor CD corresponds to mode information in the present invention.

図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 configuration 1 corresponding to the mouse mode. In this configuration descriptor CDl, the maximum current consumption value at offset 8 is “32h”. In the USB standard, the offset 8 of the configuration descriptor CD is determined to indicate a half of the maximum current consumption value, and “32h” represents 100 milliamperes. Therefore, the maximum current consumption value in the mouse mode (configuration 1) is 100 milliamperes. Since the maximum current consumption value in the mouse mode is smaller than the maximum current consumption value in the scanner mode to be described later, this configuration 1 is also expressed as “low power” in this specification.

なお、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 configuration 2 corresponding to the scanner mode. In this configuration descriptor CDh, since the maximum current consumption value at offset 8 is “FAh”, the maximum current consumption value in the scanner mode (configuration 2) is 500 milliamperes. Since the maximum current consumption value in the scanner mode is larger than the maximum current consumption value in the mouse mode, this configuration 2 is also expressed as “high power” in this specification. The scanner mode is an operation mode in which the maximum current consumption value is larger than the reference current value.

図3(c)に示したコンフィグレーションディスクリプタCDaは、代替モードに対応するコンフィグレーション3を規定している。代替モードは、マウスモードでもスキャナモードでもない第3の動作モードである。このコンフィグレーションディスクリプタCDaでは、オフセット8の最大消費電流値が「32h」となっていることから、代替モード(コンフィグレーション3)での最大消費電流値は、マウスモードと同様に100ミリアンペアである。本明細書では、このコンフィグレーション3を「alternate」とも表すものとする。代替モードは、最大消費電流値が基準電流値以下の動作モードである。   The configuration descriptor CDa shown in FIG. 3C defines the configuration 3 corresponding to the alternative mode. The alternative mode is a third operation mode that is neither the mouse mode nor the scanner mode. In this configuration descriptor CDa, the maximum current consumption value at offset 8 is “32h”, so the maximum current consumption value in the alternative mode (configuration 3) is 100 milliamperes as in the mouse mode. In this specification, this configuration 3 is also expressed as “alternate”. The alternative mode is an operation mode in which the maximum current consumption value is equal to or less than the reference current value.

なお、マウススキャナ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 mouse scanner 100 includes an interface descriptor including information on an interface constituting each configuration, and each interface. An endpoint descriptor including information on the endpoints that constitutes is stored.

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 computer system 10. The enumeration process is a connection start process between the mouse scanner 100 as a USB device and the PC 200 as a USB host. Specifically, the USB host knows about the USB device and communicates between the USB host and the USB device. This is a process of exchanging information so that it becomes possible.

ステップ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 PC 200 as the USB host determines whether a USB device is detected. The host controller 212 (FIG. 2) of the PC 200 polls the port of the USB interface 210 and monitors the attachment / detachment of the USB device (plug) to the port. If the mouse scanner 100 is physically connected to the PC 200 when the computer system 10 is activated, or if the mouse scanner 100 is newly physically connected to the PC 200 after the computer system 10 is activated, the PC 200 causes the USB device to be connected. Is detected.

USBデバイスが検出されると、PC200のホストコントローラ212は、検出されたUSBデバイス(マウススキャナ100)に対してアドレス設定を要求するコマンドを発行する(ステップS120)。これによりUSBデバイスとしてのマウススキャナ100にユニークなアドレスが割り当てられる。   When the USB device is detected, the host controller 212 of the PC 200 issues a command for requesting address setting to the detected USB device (mouse scanner 100) (step S120). As a result, a unique address is assigned to the mouse scanner 100 as a USB device.

次に、PC200のホストコントローラ212は、割り当てられた新しいアドレスを用いて、マウススキャナ100に対してデバイスディスクリプタDDを要求するコマンドを発行する(ステップS130)。コマンドを受領したマウススキャナ100のデバイスコントローラ152は、情報提供部154にホストコントローラ212に対してデバイスディスクリプタDD(図2)を返信させる(ステップS140)。   Next, the host controller 212 of the PC 200 issues a command for requesting the device descriptor DD to the mouse scanner 100 using the assigned new address (step S130). Upon receiving the command, the device controller 152 of the mouse scanner 100 causes the information providing unit 154 to return the device descriptor DD (FIG. 2) to the host controller 212 (step S140).

デバイスディスクリプタ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 host controller 212 of the PC 200 that has received the device descriptor DD issues a command for requesting the configuration descriptor CD to the mouse scanner 100 (step S150). Upon receiving the command, the device controller 152 of the mouse scanner 100 causes the information providing unit 154 to return the configuration descriptor CD (FIG. 2) to the host controller 212 (step S160). At this time, the information providing unit 154 transfers the configuration descriptor CD so that the configuration 1 corresponding to the mouse mode is selected by the USB host. For example, the configuration descriptor CDl (FIG. 3A) of the configuration 1 corresponding to the mouse mode may be transferred at the head, or information specifying the configuration 1 corresponding to the mouse mode is added. The configuration descriptor CD may be transferred, or only the configuration descriptor CD1 of the configuration 1 corresponding to the mouse mode may be transferred. At this time, the interface descriptor and the endpoint descriptor subordinate to the transferred configuration descriptor CD are similarly transferred to the host controller 212. Through the processing in steps S130 to S160, information about the mouse scanner 100 as the USB device is acquired by the PC 200 as the USB host.

ステップ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 PC 200 allocates and loads an optimal device driver for the mouse scanner 100 as a USB device based on the acquired descriptor. In step S180, the host controller 212 of the PC 200 selects and designates configuration 1 (low power) corresponding to the mouse mode based on the acquired descriptor, and issues a command for requesting configuration setting to the mouse scanner 100. Issue. Upon receiving the command, the mode setting unit 156 (FIG. 2) of the device controller 152 of the mouse scanner 100 sets the mouse mode as an effective operation mode by enabling (active) the configuration 1 (low power) ( Step S190). As a result, the mouse scanner 100 as the USB device becomes operable in the mouse mode.

以上説明したように、エニュメレーション処理の際には、最大消費電流値が任意の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 mouse scanner 100 according to the present embodiment is not denied power supply by the PC 200 as the USB host in the enumeration process. Therefore, in the mouse scanner 100 of the present embodiment, occurrence of malfunctions in the enumeration process is suppressed.

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 mouse scanner 100 resets the data line of the USB bus. The state is set (the state where both the D + line and the D− line are low) (step S220). The reset state of the USB bus is a state in which the USB host is allowed to execute re-enumeration including issuing a descriptor request command.

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 PC 200 monitors the state of the USB bus. When the host controller 212 detects the reset state of the USB bus, the PC 200 ends the device driver (step S230). Further, since the USB bus has been reset, the host controller 212 detects the mouse scanner 100 as a USB device again and executes re-enumeration (step S240). That is, the host controller 212 of the PC 200 issues a command for requesting the configuration descriptor CD to the mouse scanner 100 as a USB device (step S250). In the present embodiment, the description is made assuming that the address of the mouse scanner 100 and the transferred device descriptor DD set in the initial enumeration process (FIG. 4) are maintained, but the address setting request (FIG. The configuration descriptor request may be issued after the step S120 in FIG. 4 or the device descriptor request (step S130 in FIG. 4) is issued.

コンフィグレーションディスクリプタ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 mouse scanner 100 causes the information providing unit 154 to return the configuration descriptor CD (FIG. 2) to the host controller 212 (step S260). At this time, the information providing unit 154 transfers the configuration descriptor CD so that the configuration 2 corresponding to the scanner mode is selected by the USB host. For example, the configuration descriptor CDh (FIG. 3B) of the configuration 2 corresponding to the scanner mode may be transferred at the head, or information specifying the configuration 2 corresponding to the scanner mode is added. The configuration descriptor CD may be transferred, or only the configuration descriptor CDh of the configuration 2 corresponding to the scanner mode may be transferred. At this time, the interface descriptor and the endpoint descriptor subordinate to the transferred configuration descriptor CD are similarly transferred to the host controller 212.

ステップ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 PC 200 allocates and loads an optimal device driver for the mouse scanner 100 as a USB device based on the acquired descriptor. In step S280, the host controller 212 of the PC 200 determines whether or not a maximum current of 500 milliamperes can be supplied as bus power to the USB bus. If it is determined in step S280 that supply is possible, the host controller 212 of the PC 200 selects and designates configuration 2 (high power) corresponding to the scanner mode based on the acquired descriptor for the mouse scanner 100, A command for requesting configuration setting is issued (step S290). The mode setting unit 156 of the device controller 152 of the mouse scanner 100 that has received the command sets the scanner mode as a valid operation mode by enabling the configuration 2 (high power) (step S300). Thereby, the operation mode of the mouse scanner 100 as the USB device is changed from the mouse mode to the scanner mode.

一方、ステップ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 host controller 212 of the PC 200 selects / designates the configuration 3 (alternate) corresponding to the alternative mode for the mouse scanner 100, and sets the configuration. A command for requesting setting is issued (step S320). Upon receiving the command, the mode setting unit 156 of the device controller 152 of the mouse scanner 100 sets configuration 3 (alternate) to valid (active) (step S330). As a result, the mouse scanner 100 as the USB device becomes an alternative mode that is neither the mouse mode nor the scanner mode.

続いてPC200のホストコントローラ212は、マウススキャナ100に対して、マウスモードに対応するコンフィグレーション1(low power)を選択・指定し、コンフィグレーションの設定を要求するコマンドを発行する(ステップS340)。コマンドを受領したマウススキャナ100のデバイスコントローラ152のモード設定部156は、コンフィグレーション1(low power)を有効(アクティブ)とすることにより、マウスモードを有効な動作モードとして設定する(ステップS350)。これにより、USBデバイスとしてのマウススキャナ100は、スキャナモードへの切り替えは行われず、マウスモードへと戻ることとなる。   Subsequently, the host controller 212 of the PC 200 selects and designates configuration 1 (low power) corresponding to the mouse mode to the mouse scanner 100, and issues a command for requesting configuration setting (step S340). The mode setting unit 156 of the device controller 152 of the mouse scanner 100 that has received the command sets the mouse mode as an effective operation mode by enabling configuration 1 (low power) (step S350). As a result, the mouse scanner 100 as a USB device returns to the mouse mode without switching to the scanner mode.

ステップS360では、PC200が、スキャナモードのように最大消費電流値が500ミリアンペアのハイパワーデバイスはサポートされていない旨を、図示しないディスプレイに表示する。これにより、PC200の下では、マウススキャナ100をスキャナモードで動作させることはできないことをユーザに認識させることができる。   In step S360, the PC 200 displays on a display (not shown) that a high-power device with a maximum current consumption value of 500 mA is not supported as in the scanner mode. This allows the user to recognize that the mouse scanner 100 cannot be operated in the scanner mode under the PC 200.

図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 mouse scanner 100 is 100 milliamperes, switching to the mouse mode can be performed regardless of the current that can be supplied by the USB host.

スキャナモードでの動作時に、ユーザによる切り替えスイッチ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 mouse scanner 100 resets the data line of the USB bus. A state is set (a state in which both the D + line and the D− line are low) (step S420).

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 PC 200 monitors the state of the USB bus, and when the host controller 212 detects the reset state of the USB bus, the PC 200 ends the device driver (step S430). Further, since the USB bus has been reset, the host controller 212 detects the mouse scanner 100 as a USB device again and executes re-enumeration (step S440). That is, the host controller 212 of the PC 200 issues a command for requesting the configuration descriptor CD to the mouse scanner 100 as a USB device (step S450). Note that the configuration descriptor request may be issued after an address setting request (step S120 in FIG. 4) or a device descriptor request (step S130 in FIG. 4) is issued again. It is the same as the processing.

コンフィグレーションディスクリプタCDを要求するコマンドを受領したマウススキャナ100のデバイスコントローラ152は、情報提供部154にホストコントローラ212に対してコンフィグレーションディスクリプタCD(図2)を返信させる(ステップS460)。このとき情報提供部154は、マウスモードに対応するコンフィグレーション1がUSBホストによって選択されるように、コンフィグレーションディスクリプタCDを転送する。また、このとき、転送されるコンフィグレーションディスクリプタCDに従属するインタフェースディスクリプタやエンドポイントディスクリプタも同様に、ホストコントローラ212に対して転送される。   The device controller 152 of the mouse scanner 100 that has received the command requesting the configuration descriptor CD causes the information providing unit 154 to return the configuration descriptor CD (FIG. 2) to the host controller 212 (step S460). At this time, the information providing unit 154 transfers the configuration descriptor CD so that the configuration 1 corresponding to the mouse mode is selected by the USB host. At this time, the interface descriptor and the endpoint descriptor subordinate to the transferred configuration descriptor CD are similarly transferred to the host controller 212.

ステップS470では、PC200が、取得したディスクリプタに基づき、USBデバイスとしてのマウススキャナ100に最適なデバイスドライバを割り当て、ロードする。その後、PC200のホストコントローラ212は、マウススキャナ100に対して、取得したディスクリプタに基づきマウスモードに対応するコンフィグレーション1(low power)を選択・指定し、コンフィグレーションの設定を要求するコマンドを発行する(ステップS480)。コマンドを受領したマウススキャナ100のデバイスコントローラ152のモード設定部156は、コンフィグレーション1(low power)を有効(アクティブ)とすることにより、マウスモードを有効な動作モードとして設定する(ステップS490)。これにより、USBデバイスとしてのマウススキャナ100の動作モードは、スキャナモードからマウスモードに変更される。   In step S470, the PC 200 allocates and loads an optimal device driver for the mouse scanner 100 as a USB device based on the acquired descriptor. Thereafter, the host controller 212 of the PC 200 selects and designates the configuration 1 (low power) corresponding to the mouse mode based on the acquired descriptor, and issues a command for requesting configuration setting to the mouse scanner 100. (Step S480). The mode setting unit 156 of the device controller 152 of the mouse scanner 100 that has received the command sets the mouse mode as a valid operation mode by enabling the configuration 1 (low power) (step S490). As a result, the operation mode of the mouse scanner 100 as the USB device is changed from the scanner mode to the mouse mode.

以上説明したように、マウスモードからスキャナモードへの切り替え(図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 PC 200 designates the scanner mode by assuming that the PC 200 can supply the maximum current consumption value (500 mA) in the scanner mode. If there is, the scanner mode is set as an effective operation mode. On the other hand, even if an instruction to switch from the mouse mode to the scanner mode (FIG. 5) is received, the mouse mode is designated by the PC 200 if the PC 200 cannot supply the maximum current consumption value of the scanner mode. The mode is set as a valid operation mode. When an instruction to switch from the scanner mode to the mouse mode (FIG. 6) is received, the PC 200 can always supply the maximum current consumption value (100 mA) of the mouse mode. According to the specification, the mouse mode is set as an effective operation mode. Therefore, in the mouse scanner 100 according to the present embodiment, the occurrence of malfunctions associated with the switching of the operation mode is suppressed regardless of the suppliable current value of the PC 200 as the USB host.

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 mouse scanner 100 has been described as an example. However, the present invention is not limited to the mouse scanner 100, and can be applied to a general apparatus corresponding to an interface that requires a device to notify a current consumption value from a device. . In addition, the present invention is not limited to the number of operation modes and types of operation modes (a mouse mode that provides a mouse function or a scanner mode that provides an image scanner function), and has a plurality of operation modes that provide arbitrary functions. Applicable to the device. For example, the present invention can be applied to an apparatus having a camera mode that provides a Web camera function, an audio mode that provides an audio function, or the like in addition to or instead of the mouse mode and the scanner mode.

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 mouse scanner 100 has a third operation mode in which the maximum current consumption is 32 milliamperes in addition to the mouse mode and the scanner mode, the third operation mode is set in the enumeration process. It may be set as an effective operation mode, or even in this case, the mouse mode may be set as an effective operation mode.

B−3.変形例3:
上記実施例におけるコンピュータシステム10の構成はあくまで一例であり、コンピュータシステム10の構成は種々変更可能である。例えば、例えば、スキャナ機構130がCMOSセンサ132以外のイメージセンサやLED134以外の光源を含むとしてもよい。また、デバイスディスクリプタDDやコンフィグレーションディスクリプタCDの内容もあくまで一例であり、これらの内容は種々変更可能である。
B-3. Modification 3:
The configuration of the computer system 10 in the above embodiment is merely an example, and the configuration of the computer system 10 can be variously changed. For example, the scanner mechanism 130 may include an image sensor other than the CMOS sensor 132 and a light source other than the LED 134. Further, the contents of the device descriptor DD and the configuration descriptor CD are merely examples, and these contents can be variously changed.

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.

本発明の実施例におけるマウススキャナ100の外観を示す説明図である。It is explanatory drawing which shows the external appearance of the mouse scanner 100 in the Example of this invention. マウススキャナ100を含むコンピュータシステム10の機能的構成を示すブロック図である。1 is a block diagram showing a functional configuration of a computer system 10 including a mouse scanner 100. FIG. デバイスコントローラ152が有するコンフィグレーションディスクリプタCDの一例を示す説明図である。It is explanatory drawing which shows an example of the configuration descriptor CD which the device controller 152 has. コンピュータシステム10におけるエニュメレーション処理の流れを示すフローチャートである。4 is a flowchart showing a flow of enumeration processing in the computer system 10. マウスモードからスキャナモードへと動作モードを切り替える切り替え処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the switching process which switches an operation mode from a mouse mode to a scanner mode. スキャナモードからマウスモードへと動作モードを切り替える切り替え処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the switching process which switches an operation mode from scanner mode to mouse mode.

符号の説明Explanation of symbols

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 SYMBOLS 10 ... Computer system 100 ... Mouse scanner 110 ... Control part 120 ... Mouse mechanism 122 ... Position sensor 130 ... Scanner mechanism 132 ... CMOS sensor 134 ... LED
DESCRIPTION OF SYMBOLS 140 ... Operation part 142 ... Changeover switch 150 ... USB interface 152 ... Device controller 154 ... Information provision part 156 ... Mode setting part 158 ... Memory | storage part 160 ... USB cable 200 ... PC
210 ... USB interface 212 ... Host controller

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に記載の装置であって、さらに、
ユーザによる前記有効な動作モードの切り替え指示を受領する操作部を備え、
前記モード設定部は、前記第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.
請求項2に記載の装置であって、
前記モード設定部は、前記切り替え指示が受領された場合には、前記インタフェースを前記ホストに前記情報提供要求を発行せしめる状態に設定する、装置。
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または請求項3に記載の装置であって、
前記モード設定部は、前記ホストが前記第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.
請求項2ないし請求項4のいずれかに記載の装置であって、
前記第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.
請求項1ないし請求項5のいずれかに記載の装置であって、
前記インタフェースは、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.
JP2008328346A 2008-12-24 2008-12-24 Control of apparatus corresponding to prescribed interface and having a plurality of operation modes Withdrawn JP2010152531A (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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