JP4367003B2 - Interface device, interface control method, and interface control program - Google Patents

Interface device, interface control method, and interface control program Download PDF

Info

Publication number
JP4367003B2
JP4367003B2 JP2003146738A JP2003146738A JP4367003B2 JP 4367003 B2 JP4367003 B2 JP 4367003B2 JP 2003146738 A JP2003146738 A JP 2003146738A JP 2003146738 A JP2003146738 A JP 2003146738A JP 4367003 B2 JP4367003 B2 JP 4367003B2
Authority
JP
Japan
Prior art keywords
function
descriptor
interface
host
usb
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.)
Expired - Fee Related
Application number
JP2003146738A
Other languages
Japanese (ja)
Other versions
JP2004348589A (en
JP2004348589A5 (en
Inventor
康 寺島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2003146738A priority Critical patent/JP4367003B2/en
Publication of JP2004348589A publication Critical patent/JP2004348589A/en
Publication of JP2004348589A5 publication Critical patent/JP2004348589A5/ja
Application granted granted Critical
Publication of JP4367003B2 publication Critical patent/JP4367003B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、ホストからデバイスへの機能切替えリクエストによる設定機能の変更により、ホストとデバイスの区別なく、ホストになったり、デバイスになったりできるようにされたインタフェース装置及びインタフェース制御方法、並びにインタフェース制御プログラムに関する。
【0002】
【従来の技術】
コンピュータと各種周辺装置とを接続するためのバスとして、USB(Universal Serial Bus)が知られている。このUSBは、2本の信号線と2本の電源線とが内包されたケーブルバスとされ、最近提供されている、多くのパーソナルコンピュータやその周辺装置には、このUSBに対応したインタフェースが装備されている。USBインタフェースでは、1つのホストコンピュータ(以下、単にUSBホストと称す)に対し、1以上の周辺装置がバス接続されるシステムが想定されている。このUSBを介しUSBホストに接続される周辺装置は一般的にUSBデバイスと称されている。
【0003】
USBホストにUSBデバイスが接続されれば、USBホストからそのUSBデバイスに対しては、一意的なアドレスが割り当てられるようになっている。また、USBデバイスには、USBホストとの間の通信を終端するためのエンドポイント(Endpoint)が複数備えられている。このエンドポイントは具体的にデータ格納用のFIFO(First In First Out)バッファとして構成されており、USBホストとUSBデバイスとの間で通信が行われるに際しては、そのエンドポイントを介し通信が行われるようになっている。
【0004】
因みに、特許文献1には、USBデバイスとしてのハードディスクドライブ装置やFD(フレキシブル磁気ディスク)ドライブ装置、キーボード、ポインティングデバイス等を物理的に取外すことなく、外部のコンピュータ装置で兼用することができるコンピュータ装置が記載されている。
【0005】
【特許文献1】
特開2002―366268号公報
【0006】
【発明が解決しようとする課題】
ところで、USBの通信規格では、1つのUSBデバイスにはただ1つのディスクリプタ(descriptor)(USB通信規格において、どのような機能のデバイスが接続されているかを示す記述子)を持つようにされている。そのため、これまでのUSBデバイスでは、そのデバイスが複数の機能を持つ場合には、複数のディスクリプタを持つことが不可とされていたことから、1つのディスクリプタに対し複数のインタフェース(USB通信規格では、接続手段を示す)を実装せざるを得なかった。
【0007】
また、USBデバイスはUSBホストからのリクエストに応じてデータ転送を行うことから、USBデバイスから主体的にデータ転送を行うことは不可とされ、必然的にそのような形態でデータ転送が行われるように、USBデバイスが設計されていた。このような不具合を回避するには、USBホストコントローラとUSBデバイスコントローラを同一機器上に実装するか、USB―OTG規格に沿ったUSBコントローラを実装するしかなかった。
【0008】
本発明の目的は、ホストとデバイスの区別なく、機能切替えリクエストによる設定機能の変更によりホストになったり、デバイスになったりできるようにすることにある。
【0009】
【課題を解決するための手段】
本発明は、ホストからデバイスへの機能切替えリクエストによる設定機能の変更により、アプリケーションから見て、上記ホスト又は上記デバイスの区別なく、データ転送が可能とされているようにして、インタフェースディスクリプタ及びインタフェースディスクリプタの代替設定である他のディスクリプタを有し、インタフェースディスクリプタにホスト機能が設定される場合は他のディスクリプタにデバイス機能が設定され、インタフェースディスクリプタにデバイス機能が設定される場合は他のディスクリプタにホスト機能が設定され、初期状態ではインタフェースディスクリプタに設定された機能が有効となり、ホストからデバイスに定期的に問合せを行って、アプリケーションが発行する機能切替えリクエストをデバイスから受け取ることにより、インタフェースディスクリプタに設定された機能を無効とし、他のディスクリプタに設定された機能を有効とし、有効とされる機能に基づいて、機能切替えリクエスト又はデータの転送を行うものである。
【0010】
これまでにあっては、デバイスはホストからのリクエストに応じてデータ転送を行い、デバイスから主体的にデータ転送を行うことは不可とされていたが、ホストでの設定機能は自律的に変更可能とされ、また、その設定機能の変更に伴い、以上のように、デバイスでの設定機能がホストからの機能切替えリクエストにより変更可能とされる場合には、デバイスからも主体的にデータ転送を行うことが可能となる。
【0011】
【発明の実施の形態】
以下、本発明の一実施の形態をインタフェースはUSBであるとして、図1から図5により説明する。
先ず本発明に係るUSBシステムについて説明すれば、その一例でのシステム構成を図1に示す。図示のように、そのUSBシステムは、USBホスト11とUSBデバイス13とがUSBケーブル12により接続された状態として構成されている。このうち、先ずUSBホスト11について説明すれば、そのソフトウェアとハードウェアの構成は、USBホストコントローラ111とそれを制御するデバイスドライバ112、更には、そのデバイスドライバ112を利用するアプリケーション113により構成される。そのデバイスドライバ112はまた、使用される機能毎に分けられている。即ち、デバイスドライバ112は、ホスト機能デバイスドライバ1121とデバイス機能デバイスドライバ1122から構成されている。
【0012】
以上のような事情はUSBデバイス13側でも同様であり、そのソフトウェアとハードウェアの構成は、USBデバイスコントローラ131とそれを制御するデバイスドライバ132、更には、そのデバイスドライバ132を利用するアプリケーション133により構成される。そのデバイスドライバ132はまた、使用される機能毎に分けられている。即ち、デバイスドライバ132は、ホスト機能デバイスドライバ1321とデバイス機能デバイスドライバ1322から構成されている。このUSBデバイス13側では、USBの機能としては物理的に1つであるが、1つのインタフェース上に、少なくとも2つの機能(ホスト機能及びデバイス機能)が区別された状態として存在している。上述のように、デバイスドライバ112,132各々には、それら機能に対応したデバイスドライバが実装されている。
【0013】
ここで、USBデバイス13がホスト機能及びデバイス機能を有していることについて説明すれば、一般的に、USBの機能を表現するためにディスクリプタが使用される。複数の機能を表現するためには、インタフェースディスクリプタが複数記述されるが、本発明では、インタフェースを1つに見せるためにインタフェースディスクリプタは1つとし、その上に2つの機能が実装されていることを示す。図2にはディスクリプタの階層構成が示されているが、これからも判るように、インタフェースディスクリプタは1つであり、代替設定としてのディスクリプタが記述されることで、別の機能が存在していることを示している。そして、各々のインタフェース、代替設定に対してエンドポイントディスクリプタが関連付けられている。
【0014】
その図2について詳細に説明すれば、図2に示す例では、ディスクリプタ階層として、USBホスト11、USBデバイス13各々について以下の構成が成立するものとする。先ずデバイスディスクリプタ(Device)21が存在する。このデバイスディスクリプタ21にデバイス固有の情報とエンドポイント0(コントロールエンドポイント)情報が含まれている。このエンドポイント0情報には、デフォルトコントロールパイプ(default control pipe)における最大パケットサイズが記述される。また、そのデバイスディスクリプタ21に関連付けされて、コンフィギュレーションディスプリクタ(Configuration0)22が存在する。このコンフィギュレーションディスクリプタ22には、インタフェースの数や電源特性が記述される。図2においては、インタフェースの数は1である。
【0015】
更に、1つのインターフェィスディスクリプタ(Interface0)23が存在しているが、代替設定として、オルターネート0(Alternate0)24のディスクリプタが記述されることで、別の機能が存在していることを示している。そして、各々のインタフェース、代替設定に対してエンドポイントディスクリプタが関連付けられている。インタフェース0に関連付けられているエンドポイント情報は、図2に示す例においては、3つ存在している。エンドポイント1(Endpoint1)231、エンドポイント2(Endpoint2)232、エンドポイント3(Endpoint3)233各々のエンドポイント情報であり、デフォルトコントロールパイプ用として存在しているエンドポイント0(Endpoint0)221のエンドポイント情報とは別の、バルク(Bulk)転送、インタラプト(Interrupt)転送、アイソクロナス(Isochronous)転送のエンドポイント情報が記述される。図2に示す例においては、エンドポイント1、エンドポイント2、エンドポイント3各々には、Bulk IN転送、Bulk OUT転送、Interrupt IN転送の情報と、各エンドポイントにおける最大パケットサイズが記述される。
【0016】
また、オルターネート0に関連付けられているエンドポイント情報も、図2に示す例においては、3つ存在している。エンドポイント1(Endpoint1)241、エンドポイント2(Endpoint2)242、エンドポイント3(Endpoint3)243各々のエンドポイント情報であり、このオルターネート0のインタフェース固有のエンドポイント情報には、インタフェース0と同様の情報が記述されており、エンドポイントディスクリプタはインタフェースディスクリプタとその代替設定においては同一の構成にしておく。但し、インタフェース0とオルターネート0のインタフェース情報における違いは、USB Host機能を有しているか、USB Device機能を有しているかの違いになる。
【0017】
インタフェースディスクリプタ内にUSB Device機能を保有していることの情報を入れ、代替設定のディスクリプタ内にUSB Host機能を有していることの情報を入れることで、USBデバイス13として、USB Host機能及びUSB Device機能を有していることを表す。以降の説明において、ディスクリプタの構成は上記の通りであるとする。図2に示す例において、インタフェース0においては、USB Deviceとしてのストレージ機能が、また、オルターネート0においては、USB Hostとしてのデバッグ機能が有効になるように記載される。この情報は、インタフェースディスクリプタ内のClass/SubClassの組合せにて決定される。因みに、これらの機能を入れ替えて設定しておくことは基本的に不可能である。つまり、インタフェースディスクリプタ内にUSB Host機能を有していることの情報を入れ、代替設定のディスクリプタ内にUSB Device機能を有していることの情報をいれるという設定は不可とされる。
【0018】
以上の構成において、インタフェースディスクリプタに設定された機能が初期状態で有効な機能として設定されることになる。つまり、インタフェースディスクリプタ内にUSB Device機能の設定が、また、代替設定のディスクリプタ内にUSB Host機能の設定がされていれば、初期状態においては、USB Device機能が有効になるように、システム設定されることになる。
【0019】
したがって、USBホスト11では、それらディスクリプタ情報をUSBデバイス13から受け取ることで、USBデバイス13の機能を認識するようになる。1つのインタフェース上に、少なくとも2つの機能が区別された状態として存在していること知る手段として、ディスクリプタ構成に全てを記述する必要はなく、例えばベンダ定義のコマンドを用いるようにして、別の手段を用いることでも可能である。
【0020】
また、USBホスト11も同様のディスクリプタ情報を保持しており、インタフェースディスクリプタ内にUSB Host機能の設定が、また、代替設定のディスクリプタ内にUSB Device機能の設定がされていれば、初期状態においては、USB Host機能が有効になるように、システム設定される。そして、これらの機能を入れ替えて設定しておくことは基本的に不可とされる。このようにして、初期状態のUSBシステムにおいては、USBホスト11とUSBデバイス13は一意に区別されることになる。
【0021】
ここで、USBデバイス13がUSBホスト11に接続された際に、USBホスト11とUSBデバイス13との間で行われるセットアップの手順について説明すれば、USBデバイス13が接続されたことを検知すると、USBホスト11によりデフォルトコントロールパイプが形成される。デフォルトコントロールパイプが形成されれば、このデフォルトコントロールパイプを介し、USBホスト11によりUSBデバイス13のセットアップが開始される。先ずUSBホスト11は、USBデバイス13に対してコントロール転送を開始し、そのセットアップステージにおいて、Get Descriptor(DEVICE指定)リクエストを送信することで、デバイスディスクリプタをUSBホスト11に送信することが要求される。
【0022】
この要求に対する応答として、USBデバイス13からは、コントロール転送のデータステージにおいて、デバイスディスクリプタがUSBホスト11宛てに送信される。このデバイスディスクリプタが受信されれば、USBホスト11からは、ステータスステージにおいて、USBデバイス13のエンドポイント0宛てに長さ0のデータパケットが送信されることにより、正常にディスクリプタが受信されたことが通知される。このようにして、デバイスディスクリプタがUSBホスト11に送信されることで、USBホスト11はUSBデバイス13に関する一般情報を有するようになる。この一般情報には、USBデバイス13のプロトコルコードやエンドポイント0の最大パケットサイズ等が含まれている。
【0023】
USBホスト11ではまた、デバイスディスクリプタが受信されれば、USBデバイス13に対して一意のアドレス(以下、単にデバイスアドレスと称す)を割り当てるが、このデバイスアドレスの割当てが完了すれば、USBデバイス13に対し、Set Addressリクエストが送信されることによって、デバイスアドレスの割り当てが報告される。このようにして、USBデバイス13に対して、デバイスアドレスが設定される。
【0024】
以上のようにして、デバイスアドレスの設定が完了すれば、USBホスト11からは、再度、セットアップステージにおいて、Get Descriptor(CNFIGURATION指定)リクエストがUSBデバイス13に送信されることによって、コンフィギュレーションディスクリプタ等をUSBホスト11に送信することが、USBデバイス13に要求される。USBデバイス13からは、その要求に応答して、データステージにおいて、コンフィギュレーションディスクリプタ、インタフェースディスクリプタ、代替設定及びそれらに付随するエンドポイントディスクリプタがUSBホスト11に送信される。これに対する応答として、USBホスト11からはまた、ステータスステージにおいて、USBデバイス13のエンドポイント0宛てに長さ0のデータパケットが送信されることで、正常にそれらディスクリプタが受信されたことが通知される。
【0025】
以上のようにして、USBデバイス13からUSBホスト11へ送られるコンフィギュレーションディスクリプタ等には、USBデバイス13が有する情報が含まれている。この際に、USBホスト11が受け取るディスクリプタの構成は、インタフェースディスクリプタ内にはUSB Device機能の設定が、また、代替設定のディスクリプタ内にはUSB Host機能が設定されている。
【0026】
USBホスト11では、図2に示すディスクリプタ情報を全て受け取ると、各エンドポイントの番号とインタフェース番号との関係を把握するとともに、USBデバイス13の構成が以下のように設定される。
即ち、インタフェースディスクリプタ及びその代替設定にUSBデバイス13の機能が記述されているが、インタフェースディスクリプタに記述された機能であるところのストレージ機能が最初に有効になるように、USBデバイス13のエンドポイント及びインタフェース構成が設定される。これは、後述する機能変更のリクエストがくるまでは、デバッグ機能に対する要求を全てStall(停止)させるようにするためである。
【0027】
そして、エンドポイント情報のコンフィギュレーションを行い、図2に記載されたエンドポイント情報に基づき、Bulk転送やInterrupt転送等の転送モード、更には、IN/OUTの方向、最大パケットサイズが決定される。その際、代替設定に記述されたデバッグ機能もセットアップ後にも使用できるように、デバッグ機能を有することと、ディスクリプタ階層の情報を保持しておく。
【0028】
その後、USBホスト11からは、コントロール転送のセットアップステージにおいて、Set ConfigurationリクエストUSBデバイス13に送信されることによって、設定通りにインタフェース機能を設定することが要求される。USBデバイス13では、そのSet Configurationコマンドに従って、インタフェース設定が行われる。このようにして、USBデバイス13のセットアップは完了される。このセットアップ作業以降、USBデバイス13は、インタフェースディスクリプタに設定された機能であるところのUSB Deviceとして機能するようになる。この時点では、代替設定に記述されたUSB Host機能は有効にはならないが、USB Host機能を有することをUSBホスト11は理解していることになる。
【0029】
更に、その後、USBホスト11からUSBデバイス13に対しては、コンフィギュレーションが行われる。この際でのデータ転送には、先ほどコンフィギュレーションされたデバイスアドレスが使用される。USBホスト11は、先ほどと逆方向にディスクリプタ情報が転送されるように、Get Descriptor(DEVICE指定)とGet Descriptor(Configuration指定)を行うことで、USBホスト11からディスクリプタ情報がUSBデバイス13に転送される。その後、USBホスト11が逆方向のSet Configurationを行うことで、USBデバイス13はUSBホスト11のセットアップを完了する。
【0030】
以上の一連の作業が行われることで、USBシステムのセットアップが完了される。これにより、USBホスト11では、USBデバイス13がUSB Host/USB Deviceの両機能を有しており、USB Deviceが有効であることが判る。一方、USBデバイス13では、USBホスト11がUSB Host/USB Deviceの両機能を有しており、USB Hostが有効であることが判る。
【0031】
さて、図1に示すUSBシステムにおいて、USB HostとUSB Deviceの機能を切替る方法について具体的に説明すれば、機能の切替えは、インタラプト転送及びSET INTERFACEのコマンドを利用して行われる。これらのコマンドはUSBの規格上で定義されているコマンドであり、機能の切り替えは、USBホスト11上においてアプリケーションが切替わるとき、あるいはUSBデバイス13において、データ転送要求が発生した場合に起こる。因みに、USBホスト11上においてアプリケーションが切替わるときとは、1)USBホスト機能を利用していたアプリケーションがUSBデバイス機能を利用してデータ転送を発生させる場合や、2)USBデバイス機能を利用していたアプリケーションがUSBホスト機能を利用してデータ転送を発生させる場合を指す。
【0032】
図3に、その切替えの際に、現在の機能から別の機能の使用要求がなされた場合での動作シーケンスを示す。これによる場合、先ずUSBホスト11は、インタラプト転送を利用して、SOF(スタートオブフレーム)の発生するタイミングで、USBデバイス13に対しUSB Host機能が主体となってのデータ転送要求が発生しているか否かを定期的に確認する(処理301,302)。USBデバイス13でUSB Host機能を利用したデータ転送要求が発生している場合、あるいはUSBホスト11でUSB Device機能を利用したデータ転送要求が発生している場合には、データ転送要求がありとして、機能の切替えが行われることになる(処理303)。
【0033】
そのUSB Host/USB Device機能の機能切替えに先立っては、先ずUSBホスト11は、USBデバイス13のエンドポイント0宛てのコントロール転送を開始し、そのセットアップステージにおいて、そのエンドポイント0に対しては、GET INTERFACE(ベンダ定義のコマンド)が送信される(処理304)。このGET INTERFACEは、現在、USBデバイス13側では如何なる機能が設定された上、実行されているのか、その設定機能情報を要求する旨のコマンドである。その要求に応答して、USBデバイス13からは、データステージにおいて、現在設定されている機能に対応したデータがUSBホスト11側に送信される(処理305)。この場合、USBデバイス13には、USB Device機能が設定されているので、その旨の情報がUSBホスト11に送信される。その情報を受け取れば、USBホスト11からは、ステータスステージにおいて、正常に情報の受信が行われた旨がUSBデバイス13側に通知される(処理306)。
【0034】
以上のようにして、USBホスト11では、USBデバイス13に現に設定されている機能が確認されているが、果して、その機能がUSBホスト11が要求している機能と一致しているか否かが判定される(処理307)。もしも、一致していれば、その後に機能切替えのための設定機能変更要求は発生されることはないが、一致していなければ、その後に、設定機能変更要求が発生されるようになっている。この場合、USBホスト11からUSBデバイス13に対しては、デバッグ機能への切替えが要求されているが、USBデバイス13での設定機能はUSB Device機能であることから、設定機能変更要求が発生されることになる。
【0035】
その設定機能変更要求の発生に際しては、それに先立って、先ずUSBホスト11はUSB Host機能からUSB Device機能に仮切替えされる(処理308)。その後、USBホスト11は、USBデバイス13のエンドポイント0宛てのコントロール転送を開始し、そのセットアップステージにおいて、設定機能変更要求としてのSET INTERFACE(ベンダ定義のコマンド)が送信される(処理309)。このSET INTERFACEは、現在、USBデバイス13側に設定されている機能を指定機能に変更することを要求する旨のコマンドである。このコマンドにはUSB Host機能への切替えの情報が埋め込まれている。したがって、USBデバイス13では、そのコマンドを受信後、指定機能への切替えが行われる(処理310)。この場合、USBデバイス13には、それまでUSB Device機能が設定されていたが、設定機能はUSB Host機能に変更されることになる。この設定機能の変更後、コントロール転送のステータスステージで、機能切替えの成否がUSBデバイス13からUSBホスト11に送信される(処理311)。
【0036】
機能の切替えに成功した場合には、USBホスト11側での機能はUSB Host機能からUSB Device機能に最終的に切替えされ、後述のように、新機能であるUSB Host機能とUSB Deviceとの間でデータ通信が開始される。しかしながら、機能の切替えに失敗した場合、新機能であるUSB Host機能はUSBデバイス13側では有効とならず、また、USBホスト11はUSB Host機能に戻され、以前の機能でデータ通信が行われる。代替設定の機能からインタフェースディスクリプタの機能への機能切替えも同様な動作で行われる。
【0037】
引き続き、設定機能変更後でのデータ転送動作を図4に示すシーケンスに従って説明すれば、USBホスト11側のUSB Device機能からベンダ定義によるコマンド発行リクエストが出される(処理312)。そのリクエストにUSBデバイス13側のUSB Host機能が応答し、コマンドがUSBホスト11のUSB Device機能に発行される(処理313)。そのコマンドを受信したUSBホスト11のUSB Device機能はコマンド内容を解釈した上、ステータスをUSBデバイス13のUSB Host機能に返答する(処理314)。この後は、コマンドに従って、Bulk転送やInterrupt転送、Isochronous転送によるデータ転送が行われる(処理315)。
【0038】
更に、データ転送終了後での機能変更動作シーケンスを図5により説明すれば、USBホスト11は、インタラプト転送を利用して、SOF(スタートオブフレーム)の発生するタイミングで、USBデバイス13に対しUSB Host機能が主体となってのデータ転送要求が発生しているか否かを確認する(処理316,3317)。USBデバイス13でUSB Host機能を利用したデータ転送が発生しない場合、あるいはUSBホスト11でUSB Host機能を利用したデータ転送が発生する場合には、以降、図3での機能変更の場合と同様のシーケンスに従って、機能切替えが行われることになる。この機能変更が終了すれば、初期状態、即ち、USBホスト11側はUSB Host機能を、また、USBデバイス13側はUSB Device機能を有するようになる。
【0039】
以上、説明したように、USBホスト/USBデバイスにおいて、機能切替えベンダリクエストを発行する機能を備えたデバイスドライバを有することにより、これらの機能全てに必要なコンフィギュレーションやインタフェース、エンドポイントを持つことなく、必要最低限のコンフィギュレーションやインタフェース、エンドポイントで通信路を確保することができる。同時に、USBホストコントローラ、あるいはUSBデバイスコントローラの何れか1つしか有さないシステムにおいて、USBデバイスの機能、あるいはUSBホストの機能を実現することができる。
【0040】
上記効果に加え、複数の機能を同時に使用することにより、ホストアプリケーションからは複数のアプリケーションの同時利用が可能になり、ユーザの利便性が向上されることになる。それとともに、USBシステムのユーザーアプリケーションからは、USBホストコントローラ及びUSBデバイスコントローラの存在を意識することなく、データ転送を行うことが可能になる。
【0041】
因みに、本発明に係るUSBシステムでの特徴としては、以下のような内容(1)〜(8)が考えられる。
即ち、
(1):ホストコンピュータと周辺機器をUSBにより接続するUSB制御システムであって、USBホスト及びUSBデバイス上のアプリケーションからはそれらの機能の違いを意識することなく、データ転送が可能とされているUSB制御システム。
(2):(1)に記載のUSB制御システムにおいて、ホストコンピュータと周辺機器各々がホスト機能とデバイス機能を持つことを特徴とするUSB制御システム。
(3):(1)に記載のUSB制御システムにおいて、ホストが機能取得・切替えリクエストを発行する機能を備えたデバイスドライバを有し、前記USBホストは定期的にUSBデバイスにデータ転送の有無を問い合わせることを特徴とするUSB制御システム。
(4):(1)に記載のUSB制御システムにおいて、デバイスドライバはホスト機能、デバイス機能ごとに有するが、デバイスドライバはインタフェースが1つとして振舞うことを特徴とするUSB制御システム。
【0042】
(5):(1)に記載のUSB制御システムにおいて、前記機能切替えベンダリクエストを受信する機能を備えた制御部は、機能切替えベンダリクエストの受信時に、シームレスに指定された機能の内容に従った動作状態へ移行させることを特徴とするUSB制御システム。
(6):(1)に記載のUSB制御システムにおいて、前記機能切替えのために周辺機器の機能の情報をホストコンピュータに送る(ホストコンピュータは機能の情報を受信する)ことを特徴とするUSB制御システム。
(7):(1)に記載のUSB制御システムにおいて、前記機能切替えのためにUSBホストの機能の情報を周辺機器に送ることを特徴とするUSB制御システム。(8):(1)に記載のUSB制御システムにおいて、(2)に記載された問い合わせ機能はホストコントローラを保有するUSBホストから問い合わせが送られることを特徴とするUSB制御システム。
【0043】
以上、本発明者によってなされた発明を実施の形態に基づき、具体的に説明したが、本発明は上記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲内で種々変更可能であることはいうまでもない。
【0044】
【発明の効果】
ホストとデバイスの区別なく、機能切替えリクエストによる設定機能の変更によりホストになったり、デバイスになったりできる。
【図面の簡単な説明】
【図1】本発明に係るUSBシステムの一例でのシステム構成を示す図である。
【図2】USBデバイスのディスクリプタの階層構成を示す図である。
【図3】現在の機能から別の機能の使用要求が行われた場合での動作シーケンスを示す図である。
【図4】設定機能変更後でのデータ転送動作シーケンスを示す図である。
【図5】データ転送終了後での機能変更動作シーケンスを示す図である。
【符号の説明】
11…USBホスト、12…USBケーブル、13…USBデバイス、111…USBホストコントローラ、112,132…デバイスドライバ、113,133…アプリケーション、1121,1321…ホスト機能デバイスドライバ、1122,1322…デバイス機能デバイスドライバ、131…USBデバイスコントローラ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an interface device, an interface control method, and an interface control that can be configured as a host or a device without distinguishing between the host and the device by changing a setting function in response to a function switching request from the host to the device. Regarding the program.
[0002]
[Prior art]
A USB (Universal Serial Bus) is known as a bus for connecting a computer and various peripheral devices. This USB is a cable bus that contains two signal lines and two power lines, and many personal computers and peripheral devices that have been provided recently are equipped with interfaces that support this USB. Has been. The USB interface is assumed to be a system in which one or more peripheral devices are connected by bus to one host computer (hereinafter simply referred to as a USB host). A peripheral device connected to a USB host via the USB is generally called a USB device.
[0003]
When a USB device is connected to the USB host, a unique address is assigned from the USB host to the USB device. Also, the USB device is provided with a plurality of endpoints (Endpoints) for terminating communication with the USB host. This endpoint is specifically configured as a FIFO (First In First Out) buffer for storing data. When communication is performed between the USB host and the USB device, communication is performed via the endpoint. It is like that.
[0004]
Incidentally, Patent Document 1 discloses a computer device that can be used as an external computer device without physically removing a hard disk drive device, FD (flexible magnetic disk) drive device, keyboard, pointing device, or the like as a USB device. Is described.
[0005]
[Patent Document 1]
JP 2002-366268 A
[0006]
[Problems to be solved by the invention]
By the way, in the USB communication standard, one USB device has only one descriptor (descriptor indicating what function device is connected in the USB communication standard). . Therefore, in the conventional USB device, when the device has a plurality of functions, it is impossible to have a plurality of descriptors. Therefore, a plurality of interfaces (in the USB communication standard, (Indicating connection means).
[0007]
Further, since the USB device performs data transfer in response to a request from the USB host, it is impossible to perform data transfer independently from the USB device, and data transfer is inevitably performed in such a form. In addition, a USB device was designed. In order to avoid such a problem, the USB host controller and the USB device controller must be mounted on the same device, or a USB controller conforming to the USB-OTG standard must be mounted.
[0008]
It is an object of the present invention to be able to become a host or a device by changing a setting function by a function switching request without distinguishing between a host and a device.
[0009]
[Means for Solving the Problems]
  The present inventionBy changing the setting function due to a function switching request from the host to the deviceASeen from the applicationWhen the data transfer is enabled without distinguishing between the host or the device, the interface descriptor and other descriptors that are alternative settings for the interface descriptor are included, and the host function is set in the interface descriptor. When the device function is set in the descriptor and the device function is set in the interface descriptor, the host function is set in the other descriptor. In the initial state, the function set in the interface descriptor is valid and is periodically sent from the host to the device. The function set in the interface descriptor is invalidated by receiving the function switching request issued by the application from the device. It was valid, based on the features that are enabled, and performs transfer function switching request or data.
[0010]
In the past, devices transferred data in response to requests from the host, and it was not possible to transfer data independently from the device, but the setting function at the host can be changed autonomously. If the setting function on the device can be changed by a function switching request from the host as described above, along with the change of the setting function, the device also actively transfers data. It becomes possible.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to FIGS. 1 to 5 assuming that the interface is USB.
First, a USB system according to the present invention will be described. FIG. 1 shows a system configuration as an example. As shown in the figure, the USB system is configured in a state in which a USB host 11 and a USB device 13 are connected by a USB cable 12. Of these, first, the USB host 11 will be described. The software and hardware are configured by a USB host controller 111, a device driver 112 that controls the USB host controller 111, and an application 113 that uses the device driver 112. . The device driver 112 is also divided for each function used. That is, the device driver 112 includes a host function device driver 1121 and a device function device driver 1122.
[0012]
The situation as described above is the same on the USB device 13 side, and the configuration of the software and hardware depends on the USB device controller 131, the device driver 132 that controls the USB device controller 131, and the application 133 that uses the device driver 132. Composed. The device driver 132 is also divided for each function used. That is, the device driver 132 includes a host function device driver 1321 and a device function device driver 1322. On the USB device 13 side, there is physically one USB function, but at least two functions (host function and device function) exist on one interface as distinguished from each other. As described above, device drivers corresponding to these functions are mounted on the device drivers 112 and 132, respectively.
[0013]
Here, to describe that the USB device 13 has a host function and a device function, generally, a descriptor is used to express a USB function. In order to express a plurality of functions, a plurality of interface descriptors are described. In the present invention, in order to make an interface appear as one, there is one interface descriptor, and two functions are mounted thereon. Indicates. Although FIG. 2 shows the hierarchical structure of descriptors, as will be understood, there is only one interface descriptor, and another function exists by describing a descriptor as an alternative setting. Is shown. An endpoint descriptor is associated with each interface and alternative setting.
[0014]
2 will be described in detail. In the example shown in FIG. 2, the following configurations are assumed for the USB host 11 and the USB device 13 as the descriptor hierarchy. First, a device descriptor (Device) 21 exists. This device descriptor 21 includes device-specific information and end point 0 (control end point) information. This endpoint 0 information describes the maximum packet size in the default control pipe. Further, a configuration descriptor (Configuration 0) 22 exists in association with the device descriptor 21. The configuration descriptor 22 describes the number of interfaces and power supply characteristics. In FIG. 2, the number of interfaces is one.
[0015]
Furthermore, although one interface descriptor (Interface0) 23 exists, as a substitute setting, the descriptor of alternate 0 (Alternate0) 24 is described, which indicates that another function exists. . An endpoint descriptor is associated with each interface and alternative setting. In the example shown in FIG. 2, there are three pieces of endpoint information associated with the interface 0. Endpoint 1 (Endpoint 1) 231, Endpoint 2 (Endpoint 2) 232, Endpoint 3 (Endpoint 3) 233 endpoint information of endpoint 0 (Endpoint 0) 221 existing for the default control pipe Separately from the information, endpoint information of bulk transfer, interrupt transfer, and isochronous transfer is described. In the example shown in FIG. 2, each of the endpoint 1, the endpoint 2, and the endpoint 3 describes information on Bulk IN transfer, Bulk OUT transfer, and Interrupt IN transfer, and the maximum packet size at each endpoint.
[0016]
There are also three pieces of endpoint information associated with the alternate 0 in the example shown in FIG. This is endpoint information for each of endpoint 1 (Endpoint 1) 241, endpoint 2 (Endpoint 2) 242, endpoint 3 (Endpoint 3) 243. Information is described, and the endpoint descriptor has the same configuration in the interface descriptor and its alternative setting. However, the difference in interface information between interface 0 and alternate 0 is the difference between having a USB Host function or having a USB Device function.
[0017]
The information indicating that the USB Device function is held in the interface descriptor and the information indicating that the USB Host function is included in the alternative setting descriptor are entered as the USB device 13 and the USB Host function and USB. Indicates that the device has a function. In the following description, it is assumed that the configuration of the descriptor is as described above. In the example illustrated in FIG. 2, the interface 0 is described so that the storage function as a USB device is enabled, and the alternate 0 is described so that the debug function as a USB host is enabled. This information is determined by the combination of Class / SubClass in the interface descriptor. Incidentally, it is basically impossible to set these functions interchangeably. That is, the setting that the information indicating that the USB Host function is provided in the interface descriptor and the information indicating that the USB Device function is included in the substitute setting descriptor is not allowed.
[0018]
In the above configuration, the function set in the interface descriptor is set as an effective function in the initial state. In other words, if the USB Device function is set in the interface descriptor and the USB Host function is set in the alternative setting descriptor, the system settings are set so that the USB Device function is enabled in the initial state. Will be.
[0019]
Therefore, the USB host 11 recognizes the function of the USB device 13 by receiving the descriptor information from the USB device 13. As a means of knowing that at least two functions exist as a distinguished state on one interface, it is not necessary to describe everything in the descriptor configuration. For example, another means can be used by using a vendor-defined command. It is also possible to use
[0020]
The USB host 11 also holds the same descriptor information. If the USB Host function is set in the interface descriptor and the USB Device function is set in the alternative setting descriptor, the initial state is set. The system is set to enable the USB Host function. It is basically impossible to set these functions interchangeably. In this way, in the USB system in the initial state, the USB host 11 and the USB device 13 are uniquely distinguished.
[0021]
Here, when the USB device 13 is connected to the USB host 11, the setup procedure performed between the USB host 11 and the USB device 13 will be described. A default control pipe is formed by the USB host 11. If the default control pipe is formed, setup of the USB device 13 is started by the USB host 11 via the default control pipe. First, the USB host 11 starts control transfer to the USB device 13 and transmits a device descriptor to the USB host 11 by transmitting a Get Descriptor (DEVICE designation) request in the setup stage. .
[0022]
As a response to this request, the device descriptor is transmitted from the USB device 13 to the USB host 11 in the control transfer data stage. If this device descriptor is received, it is confirmed that the descriptor is normally received from the USB host 11 by transmitting a zero-length data packet to the endpoint 0 of the USB device 13 in the status stage. Be notified. In this way, the device descriptor is transmitted to the USB host 11, so that the USB host 11 has general information regarding the USB device 13. This general information includes the protocol code of the USB device 13, the maximum packet size of the endpoint 0, and the like.
[0023]
In addition, when the device descriptor is received, the USB host 11 assigns a unique address (hereinafter simply referred to as a device address) to the USB device 13. When the device address assignment is completed, the USB host 13 is assigned to the USB device 13. On the other hand, device address assignment is reported by sending a Set Address request. In this way, a device address is set for the USB device 13.
[0024]
When the setting of the device address is completed as described above, the USB host 11 sends a Get Descriptor (CNFIGURATION designation) request to the USB device 13 again in the setup stage, so that the configuration descriptor and the like can be obtained. The USB device 13 is requested to transmit to the USB host 11. In response to the request, the USB device 13 transmits a configuration descriptor, an interface descriptor, an alternative setting, and an endpoint descriptor associated therewith to the USB host 11 in the data stage. As a response to this, the USB host 11 also notifies that the descriptors have been received normally by transmitting data packets of length 0 to the endpoint 0 of the USB device 13 in the status stage. The
[0025]
As described above, the configuration descriptor or the like sent from the USB device 13 to the USB host 11 includes information held by the USB device 13. At this time, in the configuration of the descriptor received by the USB host 11, the USB Device function setting is set in the interface descriptor, and the USB Host function is set in the alternative setting descriptor.
[0026]
When all the descriptor information shown in FIG. 2 is received, the USB host 11 grasps the relationship between each endpoint number and the interface number, and the configuration of the USB device 13 is set as follows.
That is, although the function of the USB device 13 is described in the interface descriptor and its alternative setting, the endpoint of the USB device 13 and the storage function that is the function described in the interface descriptor are first enabled. The interface configuration is set. This is to stop all requests for the debug function until a function change request to be described later is received.
[0027]
Then, the end point information is configured, and based on the end point information described in FIG. 2, the transfer mode such as Bulk transfer and Interrupt transfer, the IN / OUT direction, and the maximum packet size are determined. At this time, the debug function and the descriptor hierarchy information are held so that the debug function described in the alternative setting can be used even after the setup.
[0028]
Thereafter, the USB host 11 is requested to set the interface function as set by being transmitted to the Set Configuration request USB device 13 in the control transfer setup stage. In the USB device 13, interface setting is performed according to the Set Configuration command. In this way, the setup of the USB device 13 is completed. After this setup operation, the USB device 13 functions as a USB Device that is a function set in the interface descriptor. At this point, the USB Host function described in the alternative setting is not valid, but the USB host 11 understands that it has the USB Host function.
[0029]
Further, after that, configuration from the USB host 11 to the USB device 13 is performed. For the data transfer at this time, the device address configured earlier is used. The USB host 11 transfers the descriptor information from the USB host 11 to the USB device 13 by performing Get Descriptor (DEVICE designation) and Get Descriptor (Configuration designation) so that the descriptor information is transferred in the opposite direction. The Thereafter, the USB device 11 completes the setup of the USB host 11 by performing Set Configuration in the reverse direction.
[0030]
The USB system setup is completed by performing the above series of operations. Thereby, in the USB host 11, it can be seen that the USB device 13 has both USB Host / USB Device functions, and the USB Device is effective. On the other hand, in the USB device 13, the USB host 11 has both functions of USB Host / USB Device, and it can be seen that the USB Host is effective.
[0031]
Now, in the USB system shown in FIG. 1, the method for switching the functions of the USB Host and USB Device will be described in detail. Switching between functions includes interrupt transfer and SET. This is done using the INTERFACE command. These commands are commands defined in the USB standard, and switching of functions occurs when an application is switched on the USB host 11 or when a data transfer request is generated in the USB device 13. By the way, when an application is switched on the USB host 11, 1) an application that uses the USB host function generates data transfer using the USB device function, or 2) uses an USB device function. This refers to a case where a previously used application generates data transfer using the USB host function.
[0032]
FIG. 3 shows an operation sequence when a request for using another function is made from the current function at the time of switching. In this case, first, the USB host 11 uses interrupt transfer to generate a data transfer request mainly for the USB Host function to the USB device 13 at the timing when SOF (start of frame) occurs. It is confirmed periodically whether or not (processing 301, 302). When a data transfer request using the USB Host function is generated in the USB device 13 or when a data transfer request using the USB Device function is generated in the USB host 11, it is assumed that there is a data transfer request. Function switching is performed (processing 303).
[0033]
Prior to the function switching of the USB Host / USB Device function, the USB host 11 first starts control transfer to the endpoint 0 of the USB device 13, and in the setup stage, for the endpoint 0, GET INTERFACE (a vendor-defined command) is transmitted (process 304). This GET INTERFACE is a command for requesting the set function information of what function is currently set and executed on the USB device 13 side. In response to the request, the USB device 13 transmits data corresponding to the currently set function to the USB host 11 side in the data stage (process 305). In this case, since the USB Device function is set in the USB device 13, information to that effect is transmitted to the USB host 11. If the information is received, the USB host 11 notifies the USB device 13 that the information has been normally received in the status stage (process 306).
[0034]
As described above, in the USB host 11, the function currently set in the USB device 13 is confirmed. However, whether or not the function matches the function requested by the USB host 11. It is determined (process 307). If they match, a setting function change request for function switching is not generated after that, but if they do not match, a setting function change request is generated after that. . In this case, the USB host 11 requests the USB device 13 to switch to the debug function, but since the setting function in the USB device 13 is the USB Device function, a setting function change request is generated. Will be.
[0035]
Prior to the generation of the setting function change request, the USB host 11 is temporarily switched from the USB Host function to the USB Device function (process 308). Thereafter, the USB host 11 starts control transfer to the endpoint 0 of the USB device 13, and, in the setup stage, sets the SET function as a setting function change request. INTERFACE (a vendor-defined command) is transmitted (process 309). This SET INTERFACE is a command for requesting that the function currently set on the USB device 13 side be changed to the designated function. Information on switching to the USB Host function is embedded in this command. Therefore, after receiving the command, the USB device 13 switches to the designated function (processing 310). In this case, the USB Device function has been set in the USB device 13 until then, but the setting function is changed to the USB Host function. After the change of the setting function, the success or failure of the function switching is transmitted from the USB device 13 to the USB host 11 in the control transfer status stage (processing 311).
[0036]
If the function switching is successful, the function on the USB host 11 side is finally switched from the USB Host function to the USB Device function, and between the new USB Host function and USB Device, as will be described later. The data communication is started. However, if the function switching fails, the new USB Host function is not effective on the USB device 13 side, and the USB host 11 is returned to the USB Host function and data communication is performed with the previous function. . The function switching from the substitute setting function to the interface descriptor function is performed in the same manner.
[0037]
If the data transfer operation after changing the setting function is described according to the sequence shown in FIG. 4, a vendor-defined command issue request is issued from the USB Device function on the USB host 11 side (process 312). The USB Host function on the USB device 13 side responds to the request, and a command is issued to the USB Device function of the USB host 11 (processing 313). The USB Device function of the USB host 11 that has received the command interprets the command contents and returns a status to the USB Host function of the USB device 13 (process 314). Thereafter, data transfer by Bulk transfer, Interrupt transfer, or Isochronous transfer is performed according to the command (process 315).
[0038]
Further, the function change operation sequence after the data transfer is completed will be described with reference to FIG. 5. The USB host 11 uses the interrupt transfer to transfer the USB device 13 to the USB device 13 at the timing when SOF (start of frame) occurs. It is confirmed whether or not a data transfer request mainly generated by the Host function has occurred (processing 316, 3317). When the data transfer using the USB Host function does not occur in the USB device 13 or the data transfer using the USB Host function occurs in the USB host 11, the same as the case of the function change in FIG. Function switching is performed according to the sequence. When this function change is completed, the initial state, that is, the USB host 11 side has the USB Host function, and the USB device 13 side has the USB Device function.
[0039]
As described above, a USB host / USB device has a device driver having a function for issuing a function switching vendor request, so that it does not have a configuration, an interface, and an endpoint necessary for all these functions. The communication path can be secured with the minimum required configuration, interface, and endpoint. At the same time, the function of the USB device or the function of the USB host can be realized in a system having only one of the USB host controller and the USB device controller.
[0040]
In addition to the above effects, by using a plurality of functions simultaneously, a plurality of applications can be used simultaneously from the host application, and convenience for the user is improved. At the same time, it becomes possible to transfer data from the user application of the USB system without being aware of the existence of the USB host controller and the USB device controller.
[0041]
Incidentally, the following contents (1) to (8) can be considered as features in the USB system according to the present invention.
That is,
(1): A USB control system that connects a host computer and peripheral devices via USB, and data transfer is possible from applications on the USB host and USB device without being aware of the differences in their functions. USB control system.
(2): The USB control system according to (1), wherein each of the host computer and the peripheral device has a host function and a device function.
(3): In the USB control system according to (1), the host has a device driver having a function of issuing a function acquisition / switching request, and the USB host periodically checks whether or not data is transferred to the USB device. USB control system characterized by inquiring.
(4): The USB control system according to (1), wherein the device driver has a host function and a device function, but the device driver behaves as one interface.
[0042]
(5): In the USB control system according to (1), the control unit having the function of receiving the function switching vendor request follows the contents of the seamlessly designated function when receiving the function switching vendor request. A USB control system characterized by shifting to an operating state.
(6): The USB control system according to (1), wherein the function information of the peripheral device is sent to the host computer for the function switching (the host computer receives the function information). system.
(7): The USB control system according to (1), wherein the function information of the USB host is sent to a peripheral device for the function switching. (8): The USB control system according to (1), wherein the inquiry function described in (2) is sent from a USB host having a host controller.
[0043]
As mentioned above, the invention made by the present inventor has been specifically described based on the embodiment. However, the present invention is not limited to the embodiment described above, and various modifications can be made without departing from the scope of the invention. Needless to say.
[0044]
【The invention's effect】
Regardless of whether the device is a host or a device, it can become a host or a device by changing the setting function by a function switching request.
[Brief description of the drawings]
FIG. 1 is a diagram showing a system configuration of an example of a USB system according to the present invention.
FIG. 2 is a diagram illustrating a hierarchical configuration of descriptors of a USB device.
FIG. 3 is a diagram showing an operation sequence when a request for using another function is made from the current function.
FIG. 4 is a diagram showing a data transfer operation sequence after a setting function change.
FIG. 5 is a diagram showing a function change operation sequence after the end of data transfer;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 11 ... USB host, 12 ... USB cable, 13 ... USB device, 111 ... USB host controller, 112, 132 ... Device driver, 113, 133 ... Application, 1121, 1321 ... Host function device driver, 1122, 1322 ... Device function device Driver, 131 ... USB device controller

Claims (7)

ホスト機能からデバイス機能への機能切替えリクエストによる設定機能の変更により、アプリケーションから見て、ホスト又はデバイスの区別なく、データ転送が可能とされているインタフェース装置であって、
インタフェースディスクリプタ及び上記インタフェースディスクリプタの代替設定である他のディスクリプタを有し、上記インタフェースディスクリプタにホスト機能が設定される場合は上記他のディスクリプタにデバイス機能が設定され、上記インタフェースディスクリプタに上記デバイス機能が設定される場合は上記他のディスクリプタに上記ホスト機能が設定され、初期状態では上記インタフェースディスクリプタに設定された機能が有効となり、上記ホストから上記デバイスに定期的に問合せを行って、上記アプリケーションが発行する上記機能切替えリクエストを上記デバイスから受け取ることにより、上記インタフェースディスクリプタに設定された機能を無効とし、上記他のディスクリプタに設定された機能を有効とするデバイスドライバと、
上記デバイスドライバが有効とする機能に基づいて、上記機能切替えリクエスト又はデータの転送を行うコントローラ部と、を備える
インタフェース装置。
By changing the settings function by function switching request to the device functions from the host function, as seen from the application, without distinguishing between the host or device, an interface device a data transfer is possible,
If there is an interface descriptor and another descriptor that is an alternative setting for the interface descriptor, and the host function is set in the interface descriptor, the device function is set in the other descriptor, and the device function is set in the interface descriptor If this is the case, the host function is set in the other descriptor. In the initial state, the function set in the interface descriptor is valid. The host periodically queries the device and issues the application. By receiving the function switching request from the device, the function set in the interface descriptor is invalidated and the function set in the other descriptor is validated. And vinegar driver,
An interface device comprising: a controller unit configured to transfer the function switching request or data based on a function enabled by the device driver .
請求項1記載のインタフェース装置において、
上記ホストから、定期的に上記デバイスに対しデータ転送要求の有無の問合せを行い、該問合せの結果如何に応じて、上記デバイスから該デバイスでの設定機能を取得して、設定機能の変更が必要か否かを判断し、設定機能の変更が必要な場合に、上記デバイスに上記機能切替えリクエストを発行する
ンタフェース装置。
The interface device according to claim 1,
From the host periodically polls for the presence or absence of a data transfer request to the device, the result depending on how the said query, acquires the setting function at the device from the device, necessary to change the setting function whether the determined, if necessary to change the setting function, and issues a request switch the function to the device
Interface devices.
請求項1又は2記載のインタフェース装置において、
上記デバイスドライバは、1つの上記インタフェースディスクリプタを有することを特徴とするインタフェース装置。
The interface device according to claim 1 or 2,
The interface device, wherein the device driver has one interface descriptor .
ホスト機能からデバイス機能への機能切替えリクエストによる設定機能の変更により、アプリケーションから見て、ホスト又はデバイスの区別なく、データ転送が可能とされているインタフェース制御方法であって、
インタフェースディスクリプタ及び上記インタフェースディスクリプタの代替設定である他のディスクリプタを有し、上記インタフェースディスクリプタにホスト機能が設定される場合は上記他のディスクリプタにデバイス機能が設定され、上記インタフェースディスクリプタに上記デバイス機能が設定される場合は上記他のディスクリプタに上記ホスト機能が設定され、初期状態では上記インタフェースディスクリプタに設定された機能が有効となり、上記ホストから上記デバイスに定期的に問合せを行って、上記アプリケーションが発行する上記機能切替えリクエストを上記デバイスから受け取ることにより、上記インタフェースディスクリプタに設定された機能を無効とし、上記他のディスクリプタに設定された機能を有効とするステップと、
上記有効とされる機能に基づいて、上記機能切替えリクエスト又はデータの転送を行うステップと、を含む
インタフェース制御方法。
By changing the settings function by function switching request to the device functions from the host function, as seen from the application, without distinguishing between the host or device, an interface control method a data transfer is possible,
If there is an interface descriptor and another descriptor that is an alternative setting for the interface descriptor, and the host function is set in the interface descriptor, the device function is set in the other descriptor, and the device function is set in the interface descriptor If this is the case, the host function is set in the other descriptor. In the initial state, the function set in the interface descriptor is valid. The host periodically queries the device and issues the application. By receiving the function switching request from the device, the function set in the interface descriptor is invalidated and the function set in the other descriptor is validated. And-flops,
And a step of transferring the function switching request or data based on the enabled function .
請求項4記載のインタフェース制御方法において、
上記ホストから、定期的に上記デバイスに対しデータ転送要求の有無の問合せを行う問合せステップと、
該問合せステップで得られた問合せの結果に応じて、上記デバイスから該デバイスでの設定機能を取得する設定機能取得ステップと、
該設定機能取得ステップで取得された設定機能に基づき、設定機能の変更が必要か否かを判断の上、設定機能の変更が必要な場合に、上記デバイスに機能切替えリクエストを発行する機能切替えリクエスト発行ステップと
を含むインタフェース制御方法。
The interface control method according to claim 4, wherein
From the host, the inquiry step of querying whether the data transfer request to periodically the device,
In accordance with the result of the inquiry obtained in the inquiry step, a setting function acquisition step for acquiring a setting function in the device from the device;
A function switching request for issuing a function switching request to the device when it is necessary to change the setting function based on the setting function acquired in the setting function acquisition step. An interface control method including an issuing step.
ホスト機能からデバイス機能への機能切替えリクエストによる設定機能の変更により、アプリケーションから見て、ホスト又はデバイスの区別なく、データ転送が可能とされているインタフェース制御プログラムであって、
インタフェースディスクリプタ及び上記インタフェースディスクリプタの代替設定である他のディスクリプタを有し、上記インタフェースディスクリプタにホスト機能が設定される場合は上記他のディスクリプタにデバイス機能が設定され、上記インタフェースディスクリプタに上記デバイス機能が設定される場合は上記他のディスクリプタに上記ホスト機能が設定され、初期状態では上記インタフェースディスクリプタに設定された機能が有効となり、上記ホストから上記デバイスに定期的に問合せを行って、上記アプリケーションが発行する上記機能切替えリクエストを上記デバイスから受け取ることにより、上記インタフェースディスクリプタに設定された機能を無効とし、上記他のディスクリプタに設定された機能を有効とするステップと、
上記有効とされる機能に基づいて、上記機能切替えリクエスト又はデータの転送を行うステップと、を含む
インタフェース制御プログラム。
An interface control program that enables data transfer without changing the host or device as seen from the application by changing the setting function in response to a function switching request from the host function to the device function.
If there is an interface descriptor and another descriptor that is an alternative setting for the interface descriptor, and the host function is set in the interface descriptor, the device function is set in the other descriptor, and the device function is set in the interface descriptor If this is the case, the host function is set in the other descriptor. In the initial state, the function set in the interface descriptor is valid. The host periodically queries the device and issues the application. By receiving the function switching request from the device, the function set in the interface descriptor is invalidated and the function set in the other descriptor is validated. And-flops,
And a step of transferring the function switching request or data based on the valid function .
請求項6記載のインタフェース制御プログラムにおいて、The interface control program according to claim 6,
上記ホストから、定期的に上記デバイスに対しデータ転送要求の有無の問合せを行う問合せステップと、An inquiry step for making an inquiry about the presence or absence of a data transfer request to the device periodically from the host;
該問合せステップで得られた問合せの結果に応じて、上記デバイス該デバイスでの設定機能を取得する設定機能取得ステップと、In accordance with the result of the inquiry obtained in the inquiry step, a setting function acquisition step for acquiring a setting function in the device.
該設定機能取得ステップで取得された設定機能に基づき、設定機能の変更が必要か否かを判断の上、設定機能の変更が必要な場合に、上記デバイスに機能切替えリクエストを発行する機能切替えリクエスト発行ステップとA function switching request for issuing a function switching request to the device when it is necessary to change the setting function based on the setting function acquired in the setting function acquisition step. Issuing step and
を含むインタフェース制御プログラム。Interface control program including
JP2003146738A 2003-05-23 2003-05-23 Interface device, interface control method, and interface control program Expired - Fee Related JP4367003B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003146738A JP4367003B2 (en) 2003-05-23 2003-05-23 Interface device, interface control method, and interface control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003146738A JP4367003B2 (en) 2003-05-23 2003-05-23 Interface device, interface control method, and interface control program

Publications (3)

Publication Number Publication Date
JP2004348589A JP2004348589A (en) 2004-12-09
JP2004348589A5 JP2004348589A5 (en) 2006-07-06
JP4367003B2 true JP4367003B2 (en) 2009-11-18

Family

ID=33533503

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003146738A Expired - Fee Related JP4367003B2 (en) 2003-05-23 2003-05-23 Interface device, interface control method, and interface control program

Country Status (1)

Country Link
JP (1) JP4367003B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4792361B2 (en) * 2006-09-27 2011-10-12 富士通株式会社 Response device, response method, and response program

Also Published As

Publication number Publication date
JP2004348589A (en) 2004-12-09

Similar Documents

Publication Publication Date Title
JP3045985B2 (en) Connection establishment method, communication method, state change transmission method, state change execution method, wireless device, wireless device, and computer
CA2657827C (en) Method and apparatus for distributing usb hub functions across a network
JP4261069B2 (en) USB flash memory device
US6353866B1 (en) Apparatus and method for initializing a universal serial bus device
AU2006222461B2 (en) Method and apparatus for improving the performance of USB mass storage devices in the presence of long transmission delays
JP4377603B2 (en) Bus communication system and communication control method thereof
US6185607B1 (en) Method for managing network data transfers with minimal host processor involvement
US7162566B2 (en) USB-based host-to-host networking method
JP4432385B2 (en) Data relay system
CN110688333A (en) PCIE (peripheral component interface express) -based DMA (direct memory Access) data transmission system and method
TWI233553B (en) Bus system and bus interface for connection to a bus
JP4367003B2 (en) Interface device, interface control method, and interface control program
JP3091184B2 (en) Communication system and communication device
JP3653051B2 (en) Data transfer method, system and program by protocol conversion
JP2003281072A (en) Method and device for controlling device
JP3579884B2 (en) Data communication method and apparatus, printer and control method therefor
AU2006200756B2 (en) A USB flash memory device for connecting to a USB-defined BUS
JP2639248B2 (en) Communication interface device
JP2015022678A (en) Network information processing device having power saving function
KR101460360B1 (en) A multi-function usb apparatus, a function of usb simultaneous recognition system and a method thereof
KR20050057635A (en) A device including means for transferring information indicating wether or not the device supports dma
JP2007004815A (en) Link bridge
JP2004326350A (en) Data processor and data processing method
JP2003280829A (en) Printer and printer system
JP2003523575A (en) Coupling system and method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060523

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060523

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090303

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090422

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090804

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090817

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120904

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130904

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees