AG903ライブラリリファレンス
内容インデックスホーム
前へ上へ次へ
usb_cdc_commif_api.h

Communication Device Class Driver API Header

Communication Device Class Driver提供ヘッダ 

アプリケーション向け(Data Class Interface以外)

none

AXELL CORPORATION

2017_02_22 初版 

2017_10_26 Ver2.0

1: 10: 11: 15: #ifndef __USB_CDC_COMMIF_API_H__ 16: #define __USB_CDC_COMMIF_API_H__ 17: 18: 19: #include "usb_cdc_type.h" 20: #include "usb_cdc_log.h" 21: 22: 23: #define CDC_MAJOR_VERSION (0x01) 24: 25: 26: #define CDC_MINOR_VERSION (0x00) 27: 28: 29: 30: typedef enum { 31: COMM_FEATURE_SELECTOR_ABSTRACT_STATE = 1, 32: COMM_FEATURE_SELECTOR_COUNTRY_SETTING 33: } COMM_FEATURE_SELECTOR; 34: 35: 36: typedef enum { 37: LINE_CODING_STOPBIT_1, 38: LINE_CODING_STOPBIT_15, 39: LINE_CODING_STOPBIT_2 40: } LINE_CODING_STOPBIT; 41: 42: 43: typedef enum { 44: LINE_CODING_PARITY_NONE, 45: LINE_CODING_PARITY_ODD, 46: LINE_CODING_PARITY_EVEN, 47: LINE_CODING_PARITY_MARK, 48: LINE_CODING_PARITY_SPACE 49: } LINE_CODING_PARITY; 50: 51: 52: typedef enum { 53: LINE_CODING_DATABIT_5 = 5, 54: LINE_CODING_DATABIT_6, 55: LINE_CODING_DATABIT_7, 56: LINE_CODING_DATABIT_8, 57: LINE_CODING_DATABIT_16 = 16 58: } LINE_CODING_DATABIT; 59: 60: 61: typedef struct CdcCommFeature* PCDC_COMM_FEATURE; 62: typedef struct CdcLineCoding* PCDC_LINE_CODING; 63: typedef struct CdcControlLineState* PCDC_CONTROL_LINE_STATE; 64: typedef struct CdcSendBreak* PCDC_SEND_BREAK; 65: 66: 71: typedef struct CdcCommFeature { 72: COMM_FEATURE_SELECTOR FeatureSelector; 73: uhs_ubit16_t u16Data; 74: } CDC_COMM_FEATURE; 75: 76: 79: typedef struct CdcLineCoding { 80: uhs_ubit32_t u32BaudRate; 81: LINE_CODING_STOPBIT StopBit; 82: LINE_CODING_PARITY Parity; 83: LINE_CODING_DATABIT DataBit; 84: } CDC_LINE_CODING; 85: 86: 91: typedef struct CdcControlLineState { 92: uhs_ubit16_t u16Data; 93: } CDC_CONTROL_LINE_STATE; 94: 95: 100: typedef struct CdcSendBreak { 101: uhs_ubit16_t u16Data; 102: } CDC_SEND_BREAK; 103: 104: 105: extern uhs_status_t Usbh_Cdc_GetVersion(uhs_ubit8_t* pu8MajorVersion, uhs_ubit8_t* pu8MinorVersion); 106: extern uhs_status_t Usbh_Cdc_RegistCallBack(void* pContext, cdc_callback_t pUserNotifyCallback, uhs_ubit8_t u8TotalBuffSize); 107: extern uhs_status_t Usbh_Cdc_SendEncapsulatedCommand(void* pContext, PCDC_BUFF_INFO pstData); 108: extern uhs_status_t Usbh_Cdc_GetEncapsulatedResponse(void* pContext, PCDC_BUFF_INFO pstData); 109: extern uhs_status_t Usbh_Cdc_SetCommFeature(void* pContext, PCDC_COMM_FEATURE pstData); 110: extern uhs_status_t Usbh_Cdc_GetCommFeature(void* pContext, PCDC_COMM_FEATURE pstData); 111: extern uhs_status_t Usbh_Cdc_ClearCommFeature(void* pContext, PCDC_COMM_FEATURE pstData); 112: extern uhs_status_t Usbh_Cdc_SetLineCoding(void* pContext, PCDC_LINE_CODING pstData); 113: extern uhs_status_t Usbh_Cdc_GetLineCoding(void* pContext, PCDC_LINE_CODING pstData); 114: extern uhs_status_t Usbh_Cdc_SetControlLineState(void* pContext, PCDC_CONTROL_LINE_STATE pstData); 115: extern uhs_status_t Usbh_Cdc_SendBreak(void* pContext, PCDC_SEND_BREAK pstData); 116: 117: 118: 119: 120: 121: 122: 123: 124: #ifdef USBH_STACK_DEBUG_BUILD 125: #define CIAPI_CDC_REPORT_SUMMARY(err) Usbh_Cdc_Log_ReportError( g_filename, __LINE__, (err), (uhs_ubit8_t*)"1", 0 ) 126: #define CIAPI_CDC_REPORT_DETAIL(err, mesg, len) Usbh_Cdc_Log_ReportError( g_filename, __LINE__, (err), (mesg), (len) ) 127: #define CIAPI_CDC_REPORT_MILESTONE(num) Usbh_Cdc_Log_ReportMilestone((num)) 128: #else 129: #define CIAPI_CDC_REPORT_SUMMARY(err) Usbh_Cdc_Log_ReportDummy(err) 130: #define CIAPI_CDC_REPORT_DETAIL(err, mesg, len) Usbh_Cdc_Log_ReportDummy(err) 131: #define CIAPI_CDC_REPORT_MILESTONE(num) Usbh_Cdc_Log_ReportMilestone((num)) 132: #endif 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: #endif
名前 
説明 
コミュニケーションクラス特有通知コード 
非同期シリアル通信設定情報 データビット 
非同期シリアル通信設定情報 パリティ 
非同期シリアル通信設定情報 ストップビット 
 
名前 
説明 
 
現在の通信機能をデフォルトに設定する 
 
現在の通信機能を取得する 
 
Communication Class Interface で転送された受信データを取得する 
 
現在の非同期シリアル通信設定を取得する 
 
ファームウェアバージョン情報を取得をする。 
 
CDCドライバの初期化および通知用コールバック関数の登録 
 
ブレーク信号を送出する 
 
指定された送信データを Communication Class Interface で転送する 
 
通信機能を設定する 
 
RS232 制御信号線を設定する 
 
非同期シリアル通信を設定する 
名前 
説明 
CDC ドライバ:メジャーバージョン 
CDC ドライバ:マイナーバージョン 
 
名前 
説明 
 
通信機能情報
設定または取得したデータの詳細については、「Universal Serial Bus Communications Class Subclass Specification for PSTN Devices」を参照して下さい。
生成タイミング : 通信機能情報の設定および取得前
削除タイミング : 通信機能情報の設定および取得後 
 
RS232 制御信号線設定情報
設定するデータの詳細については、「Universal Serial Bus Communications Class Subclass Specification for PSTN Devices」を参照して下さい。
生成タイミング : RS232 制御信号線設定前
削除タイミング : RS232 制御信号線設定後 
 
非同期シリアル通信設定情報
生成タイミング : 非同期シリアル通信の設定および取得前
削除タイミング : 非同期シリアル通信の設定および取得後 
 
ブレーク信号送出情報型
設定するデータの詳細については、「Universal Serial Bus Communications Class Subclass Specification for PSTN Devices」を参照して下さい。
生成タイミング : ブレーク信号送出前
削除タイミング : ブレーク信号送出後 
 
通信機能情報
設定または取得したデータの詳細については、「Universal Serial Bus Communications Class Subclass Specification for PSTN Devices」を参照して下さい。
生成タイミング : 通信機能情報の設定および取得前
削除タイミング : 通信機能情報の設定および取得後 
 
RS232 制御信号線設定情報
設定するデータの詳細については、「Universal Serial Bus Communications Class Subclass Specification for PSTN Devices」を参照して下さい。
生成タイミング : RS232 制御信号線設定前
削除タイミング : RS232 制御信号線設定後 
 
非同期シリアル通信設定情報
生成タイミング : 非同期シリアル通信の設定および取得前
削除タイミング : 非同期シリアル通信の設定および取得後 
 
ブレーク信号送出情報型
設定するデータの詳細については、「Universal Serial Bus Communications Class Subclass Specification for PSTN Devices」を参照して下さい。
生成タイミング : ブレーク信号送出前
削除タイミング : ブレーク信号送出後 
名前 
説明 
通信機能情報へのポインタ 
RS232 制御信号線設定情報へのポインタ 
非同期シリアル通信設定情報へのポインタ 
ブレーク信号送出情報へのポインタ 
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.