H8,SH,マイコン,ぼやき川柳,ダウンロード

CDC(Communication Device Class Version1.1 クラスコード02h)、サブクラスコード02h=Abstract Control Modelを対象にします
TAやモデムの事の様です
標準リクエストは省略して、使いそうなクラスリクエストは下記です。英語だから分からない、しかもドキュメントの構成が分かり辛いです


6.2.1 SendEncapsulatedCommand (Mandatory)

 
USB仮想シリアル・サンプル・プロジェクトでは未使用? でもMandatory・・・
This request is used to issue a command in the format of the supported control protocol of the Communication Class interface.
 
バイトフィールド説 明
0bmRequestType0 01 00001B
1bRequest00h:SEND_ENCAPSULATED_COMMAND
2wValueZero
3
4wIndexInterface
5
6wLengthAmount of data, in bytes,
associated with this recipient.
7
8
DataControl protocol-based command

 

6.2.2 GetEncapsulatedResponse (Mandatory)


USB仮想シリアル・サンプル・プロジェクトでは未使用? でもMandatory・・・
This request is used to request a response in the format of the supported control protocol of the Communication Class interface.
 
バイトフィールド説 明
0bmRequestType1 01 00001B
1bRequest01h:GET_ENCAPSULATED_RESPONSE
2wValueZero
3
4wIndexInterface
5
6wLengthAmount of data, in bytes,
associated with this recipient.
7
8DataProtocol dependent data

 

6.2.12 SetLineCoding


使用!!
This request allows the host to specify typical asynchronous line-character formatting properties, which may be required by some applications. This request applies to asynchronous byte stream data class interfaces and endpoints; it also applies to data transfers both from the host to the device and from the device to the host.
 
バイトフィールド説 明
0bmRequestType0 01 00001B
1bRequest20h:SET_LINE_CODING・・・・・・・・・・・・・・・・・
2wValueZero
3
4wIndexInterface
5
6wLengthSize of Structure
7
8DataLine Coding Structure

 

6.2.13 GetLineCoding


USB仮想シリアル・サンプル・プロジェクトで使用!!
This request allows the host to find out the currently configured line coding.
 
バイトフィールド説 明
0bmRequestType1 01 00001B
1bRequest21h:GET_LINE_CODING・・・・・・・・・・・・・・・・・
2wValueZero
3
4wIndexInterface
5
6wLengthSize of Structure
7
8DataLine Coding Structure

 
The line coding properties are defined in the following table:
Off-
set
FieldSizeValueDescription
0

dwDTERate4NumberData terminal rate, in bits per second.
4bCharFormat1NumberStop bits
・・0 - 1 Stop bit
・・1 - 1.5 Stop bits
・・2 - 2 Stop bits
5bParityType1NumberParity
・・0 - None
・・1 - Odd
・・2 - Even
・・3 - Mark
・・4 - Space
6

bDataBits1NumberData bits (5, 6, 7, 8 or 16).
 
 

6.2.14 SetControlLineState


USB仮想シリアル・サンプル・プロジェクトで使用!!
This request generates RS-232/V.24 style control signals.

 
バイトフィールド説 明
0bmRequestType0 01 00001B
1bRequest22h:SET_CONTROL_LINE_STATE・・・・・・・・・・・・・・・・・
2wValueControl Signal Bitmap
3
4wIndexInterface
5
6wLengthZero
7
8DataNone

 
Control Signal Bitmap Values for SetControlLineState
 
Bit positionDescription
D15...D2RESERVED (Reset to zero)・・・・・・・・・・・・・・・・・
D1Carrier control for half duplex modems. This signal corresponds to
V.24 signal 105 and RS-232 signal RTS.
・・・・・・・・・・0 - Deactivate carrier
・・・・・・・・・・1 - Activate carrier

The device ignores the value of this bit when operating
in full duplex mode.
D0Indicates to DCE if DTE is present or not. This signal corresponds
to V.24 signal 108/2 and RS-232 signal DTR.
・・・・・・・・・・0 - Not Present
・・・・・・・・・・1 - Present

 
 
 
 

16

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
   
 
 
 
 
 
 
 

Menu

管理人/副管理人のみ編集できます