ch341a_software_and_drivers/Drivers/LIB/CH341/CH341DLL.H

689 lines
29 KiB
C++
Raw Normal View History

// 2004.05.28, 2004.10.20, 2005.01.08, 2005.03.25, 2005.04.28, 2005.07.18, 2005.07.28, 2005.09.19, 2007.12.19, 2008.10.15,2022.5
//****************************************
//** Copyright (C) WCH 1999-2022 **
//** Web: http://www.winchiphead.com **
//****************************************
//** DLL for USB interface chip CH341 **
//** C, VC5.0 **
//****************************************
//
// USB<53><42><EFBFBD>߽ӿ<DFBD>оƬCH341<34><31><EFBFBD><EFBFBD>Ӧ<EFBFBD>ò<EFBFBD><C3B2>ӿڿ<D3BF> V2.2
// <20>Ͼ<EFBFBD><CFBE>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޹<EFBFBD>˾ <20><><EFBFBD><EFBFBD>: W.ch 2008.10
// CH341-DLL V2.2
// <20><><EFBFBD>л<EFBFBD><D0BB><EFBFBD>: Windows 98/ME, Windows 2000/XP/7/10/11
// support USB chip: CH341, CH341A<31><41> CH347 SPI/I2C
// USB => Parallel, I2C, SPI, ...
//
#ifndef _CH341_DLL_H
#define _CH341_DLL_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN64
#define mOFFSET( s, m ) ( (ULONG_PTR) & ( ( ( s * ) 0 ) -> m ) ) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><E1B9B9>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>ƫ<EFBFBD>Ƶ<EFBFBD>ַ<EFBFBD>ĺ<EFBFBD>
#else
#define mOFFSET( s, m ) ( (ULONG) & ( ( ( s * ) 0 ) -> m ) ) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><E1B9B9>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>ƫ<EFBFBD>Ƶ<EFBFBD>ַ<EFBFBD>ĺ<EFBFBD>
#endif
#ifndef max
#define max( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) ) // <20>ϴ<EFBFBD>ֵ
#endif
#ifndef min
#define min( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) ) // <20><>Сֵ
#endif
#ifdef ExAllocatePool
#undef ExAllocatePool // ɾ<><C9BE><EFBFBD><EFBFBD>TAG<41><47><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD>
#endif
#ifndef NTSTATUS
typedef LONG NTSTATUS; // <20><><EFBFBD><EFBFBD>״̬
#endif
typedef struct _USB_SETUP_PKT { // USB<53><42><EFBFBD>ƴ<EFBFBD><C6B4><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD>׶ε<D7B6><CEB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
UCHAR mUspReqType; // 00H <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
UCHAR mUspRequest; // 01H <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
union {
struct {
UCHAR mUspValueLow; // 02H ֵ<><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD>
UCHAR mUspValueHigh; // 03H ֵ<><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD>
};
USHORT mUspValue; // 02H-03H ֵ<><D6B5><EFBFBD><EFBFBD>
};
union {
struct {
UCHAR mUspIndexLow; // 04H <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD>
UCHAR mUspIndexHigh; // 05H <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD>
};
USHORT mUspIndex; // 04H-05H <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
};
USHORT mLength; // 06H-07H <20><><EFBFBD>ݽ׶ε<D7B6><CEB5><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
} mUSB_SETUP_PKT, *mPUSB_SETUP_PKT;
#define mCH341_PACKET_LENGTH 32 // CH341֧<31>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>ݰ<EFBFBD><DDB0>ij<EFBFBD><C4B3><EFBFBD>
#define mCH341_PKT_LEN_SHORT 8 // CH341֧<31>ֵĶ<D6B5><C4B6><EFBFBD><EFBFBD>ݰ<EFBFBD><DDB0>ij<EFBFBD><C4B3><EFBFBD>
typedef struct _WIN32_COMMAND { // <20><><EFBFBD><EFBFBD>WIN32<33><32><EFBFBD><EFBFBD><EFBFBD>ӿڽṹ
union {
ULONG mFunction; // <20><><EFBFBD><EFBFBD>ʱָ<CAB1><D6B8><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߹ܵ<DFB9><DCB5><EFBFBD>
NTSTATUS mStatus; // <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>״̬
};
ULONG mLength; // <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD><D8BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵij<DDB5><C4B3><EFBFBD>
union {
mUSB_SETUP_PKT mSetupPkt; // USB<53><42><EFBFBD>ƴ<EFBFBD><C6B4><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD>׶ε<D7B6><CEB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
UCHAR mBuffer[ 512]; // <20><><EFBFBD>ݻ<EFBFBD><DDBB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>Ϊ0<CEAA><30>255B
};
} mWIN32_COMMAND, *mPWIN32_COMMAND;
// WIN32Ӧ<32>ò<EFBFBD><C3B2>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>
#define IOCTL_CH341_COMMAND ( FILE_DEVICE_UNKNOWN << 16 | FILE_ANY_ACCESS << 14 | 0x0f34 << 2 | METHOD_BUFFERED ) // ר<>ýӿ<C3BD>
#define mWIN32_COMMAND_HEAD mOFFSET( mWIN32_COMMAND, mBuffer ) // WIN32<33><32><EFBFBD><EFBFBD><EFBFBD>ӿڵ<D3BF>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>
#define mCH341_MAX_NUMBER 16 // <20><><EFBFBD><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD>ӵ<EFBFBD>CH341<34><31>
#define mMAX_BUFFER_LENGTH 0x1000 // <20><><EFBFBD>ݻ<EFBFBD><DDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>󳤶<EFBFBD>4096
#define mMAX_COMMAND_LENGTH ( mWIN32_COMMAND_HEAD + mMAX_BUFFER_LENGTH ) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṹͷ<E1B9B9>ij<EFBFBD><C4B3><EFBFBD>
#define mDEFAULT_BUFFER_LEN 0x0400 // <20><><EFBFBD>ݻ<EFBFBD><DDBB><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD>ϳ<EFBFBD><CFB3><EFBFBD>1024
#define mDEFAULT_COMMAND_LEN ( mWIN32_COMMAND_HEAD + mDEFAULT_BUFFER_LEN ) // Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṹͷ<E1B9B9>ij<EFBFBD><C4B3><EFBFBD>
// CH341<34>˵<EFBFBD><CBB5><EFBFBD>ַ
#define mCH341_ENDP_INTER_UP 0x81 // CH341<34><31><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4>˵<EFBFBD><CBB5>ĵ<EFBFBD>ַ
#define mCH341_ENDP_INTER_DOWN 0x01 // CH341<34><31><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD><C2B4>˵<EFBFBD><CBB5>ĵ<EFBFBD>ַ
#define mCH341_ENDP_DATA_UP 0x82 // CH341<34><31><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>ϴ<EFBFBD><CFB4>˵<EFBFBD><CBB5>ĵ<EFBFBD>ַ
#define mCH341_ENDP_DATA_DOWN 0x02 // CH341<34><31><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>´<EFBFBD><C2B4>˵<EFBFBD><CBB5>ĵ<EFBFBD>ַ
// <20><EFBFBD><E8B1B8><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD>Ĺܵ<C4B9><DCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mPipeDeviceCtrl 0x00000004 // CH341<34><31><EFBFBD>ۺϿ<DBBA><CFBF>ƹܵ<C6B9>
#define mPipeInterUp 0x00000005 // CH341<34><31><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4>ܵ<EFBFBD>
#define mPipeDataUp 0x00000006 // CH341<34><31><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>ϴ<EFBFBD><CFB4>ܵ<EFBFBD>
#define mPipeDataDown 0x00000007 // CH341<34><31><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>´<EFBFBD><C2B4>ܵ<EFBFBD>
// Ӧ<>ò<EFBFBD><C3B2>ӿڵĹ<DAB5><C4B9>ܴ<EFBFBD><DCB4><EFBFBD>
#define mFuncNoOperation 0x00000000 // <20>޲<EFBFBD><DEB2><EFBFBD>
#define mFuncGetVersion 0x00000001 // <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B1BE>
#define mFuncGetConfig 0x00000002 // <20><>ȡUSB<53><EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mFuncSetTimeout 0x00000009 // <20><><EFBFBD><EFBFBD>USBͨѶ<CDA8><D1B6>ʱ
#define mFuncSetExclusive 0x0000000b // <20><><EFBFBD>ö<EFBFBD>ռʹ<D5BC><CAB9>
#define mFuncResetDevice 0x0000000c // <20><>λUSB<53>
#define mFuncResetPipe 0x0000000d // <20><>λUSB<53>ܵ<EFBFBD>
#define mFuncAbortPipe 0x0000000e // ȡ<><C8A1>USB<53>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// CH341<34><31><EFBFBD><EFBFBD>ר<EFBFBD>õĹ<C3B5><C4B9>ܴ<EFBFBD><DCB4><EFBFBD>
#define mFuncSetParaMode 0x0000000f // <20><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>ģʽ
#define mFuncReadData0 0x00000010 // <20>Ӳ<EFBFBD><D3B2>ڶ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>ݿ<EFBFBD>0
#define mFuncReadData1 0x00000011 // <20>Ӳ<EFBFBD><D3B2>ڶ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>ݿ<EFBFBD>1
#define mFuncWriteData0 0x00000012 // <20>򲢿<EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>0
#define mFuncWriteData1 0x00000013 // <20>򲢿<EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>1
#define mFuncWriteRead 0x00000014 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mFuncBufferMode 0x00000020 // <20><EFBFBD><E8B6A8><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>ģʽ<C4A3><CABD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
#define mFuncBufferModeDn 0x00000021 // <20><EFBFBD><E8B6A8><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD>ģʽ<C4A3><CABD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
#define mFuncGetVersionEx 0x00000022 // <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ż<EFBFBD>оƬ<D0BE>ͺ<EFBFBD>
// USB<53><EFBFBD><E8B1B8>׼<EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mUSB_CLR_FEATURE 0x01
#define mUSB_SET_FEATURE 0x03
#define mUSB_GET_STATUS 0x00
#define mUSB_SET_ADDRESS 0x05
#define mUSB_GET_DESCR 0x06
#define mUSB_SET_DESCR 0x07
#define mUSB_GET_CONFIG 0x08
#define mUSB_SET_CONFIG 0x09
#define mUSB_GET_INTERF 0x0a
#define mUSB_SET_INTERF 0x0b
#define mUSB_SYNC_FRAME 0x0c
// CH341<34><31><EFBFBD>ƴ<EFBFBD><C6B4><EFBFBD><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>ר<EFBFBD><D7A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341_VENDOR_READ 0xC0 // ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD>ƴ<EFBFBD><C6B4><EFBFBD>ʵ<EFBFBD>ֵ<EFBFBD>CH341<34><31><EFBFBD><EFBFBD>ר<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD>
#define mCH341_VENDOR_WRITE 0x40 // ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD>ƴ<EFBFBD><C6B4><EFBFBD>ʵ<EFBFBD>ֵ<EFBFBD>CH341<34><31><EFBFBD><EFBFBD>ר<EFBFBD><D7A8>д<EFBFBD><D0B4><EFBFBD><EFBFBD>
// CH341<34><31><EFBFBD>ƴ<EFBFBD><C6B4><EFBFBD><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>ר<EFBFBD><D7A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341_PARA_INIT 0xB1 // <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341_I2C_STATUS 0x52 // <20><>ȡI2C<32>ӿڵ<D3BF>״̬
#define mCH341_I2C_COMMAND 0x53 // <20><><EFBFBD><EFBFBD>I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD>
// CH341<34><31><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341_PARA_CMD_R0 0xAC // <20>Ӳ<EFBFBD><D3B2>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD>0,<2C><><EFBFBD>ֽ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
#define mCH341_PARA_CMD_R1 0xAD // <20>Ӳ<EFBFBD><D3B2>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD>1,<2C><><EFBFBD>ֽ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
#define mCH341_PARA_CMD_W0 0xA6 // <20>򲢿<EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>0,<2C>Ӵ<EFBFBD><D3B4>ֽڿ<D6BD>ʼΪ<CABC><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341_PARA_CMD_W1 0xA7 // <20>򲢿<EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>1,<2C>Ӵ<EFBFBD><D3B4>ֽڿ<D6BD>ʼΪ<CABC><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341_PARA_CMD_STS 0xA0 // <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>״̬
// CH341A<31><41><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_CMD_SET_OUTPUT 0xA1 // <20><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_CMD_IO_ADDR 0xA2 // MEM<45><4D><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7>д/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>Ӵ<EFBFBD><D3B4>ֽڿ<D6BD>ʼΪ<CABC><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_CMD_PRINT_OUT 0xA3 // PRINT<4E><54><EFBFBD>ݴ<EFBFBD>ӡ<EFBFBD><D3A1>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>,<2C>Ӵ<EFBFBD><D3B4>ֽڿ<D6BD>ʼΪ<CABC><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_CMD_PWM_OUT 0xA4 // PWM<57><4D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>Ӵ<EFBFBD><D3B4>ֽڿ<D6BD>ʼΪ<CABC><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_CMD_SHORT_PKT 0xA5 // <20>̰<EFBFBD>,<2C><><EFBFBD>ֽ<EFBFBD><D6BD>Ǹ<EFBFBD><C7B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ٴ<EFBFBD><D9B4>ֽڼ<D6BD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_CMD_SPI_STREAM 0xA8 // SPI<50>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>Ӵ<EFBFBD><D3B4>ֽڿ<D6BD>ʼΪ<CABC><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//#define mCH341A_CMD_SIO_STREAM 0xA9 // SIO<49>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>Ӵ<EFBFBD><D3B4>ֽڿ<D6BD>ʼΪ<CABC><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_CMD_I2C_STREAM 0xAA // I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>Ӵ<EFBFBD><D3B4>ֽڿ<D6BD>ʼΪI2C<32><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_CMD_UIO_STREAM 0xAB // UIO<49>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>Ӵ<EFBFBD><D3B4>ֽڿ<D6BD>ʼΪ<CABC><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_CMD_PIO_STREAM 0xAE // PIO<49>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>Ӵ<EFBFBD><D3B4>ֽڿ<D6BD>ʼΪ<CABC><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// CH341A<31><41><EFBFBD>ƴ<EFBFBD><C6B4><EFBFBD><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>ר<EFBFBD><D7A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_BUF_CLEAR 0xB2 // <20><><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_I2C_CMD_X 0x54 // <20><><EFBFBD><EFBFBD>I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>
#define mCH341A_DELAY_MS 0x5E // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>λ<EFBFBD><CEBB>ʱָ<CAB1><D6B8>ʱ<EFBFBD><CAB1>
#define mCH341A_GET_VER 0x5F // <20><>ȡоƬ<D0BE>
#define mCH341_EPP_IO_MAX ( mCH341_PACKET_LENGTH - 1 ) // CH341<34><31>EPP/MEM<45><4D>ʽ<EFBFBD>µ<EFBFBD><C2B5>ζ<EFBFBD>д<EFBFBD><D0B4><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>󳤶<EFBFBD>
#define mCH341A_EPP_IO_MAX 0xFF // CH341A<31><41>EPP/MEM<45><4D>ʽ<EFBFBD>µ<EFBFBD><C2B5>ζ<EFBFBD>д<EFBFBD><D0B4><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>󳤶<EFBFBD>
#define mCH341A_CMD_IO_ADDR_W 0x00 // MEM<45><4D><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7>д/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><D0B4><EFBFBD><EFBFBD>,λ6-λ0Ϊ<30><CEAA>ַ,<2C><>һ<EFBFBD><D2BB><EFBFBD>ֽ<EFBFBD>Ϊ<EFBFBD><CEAA>д<EFBFBD><D0B4><EFBFBD><EFBFBD>
#define mCH341A_CMD_IO_ADDR_R 0x80 // MEM<45><4D><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7>д/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,λ6-λ0Ϊ<30><CEAA>ַ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>𷵻<EFBFBD>
#define mCH341A_CMD_I2C_STM_STA 0x74 // I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼλ
#define mCH341A_CMD_I2C_STM_STO 0x75 // I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD>ֹͣλ
#define mCH341A_CMD_I2C_STM_OUT 0x80 // I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,λ5-λ0Ϊ<30><CEAA><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>,0<><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ֽڲ<D6BD><DAB2><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>
#define mCH341A_CMD_I2C_STM_IN 0xC0 // I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,λ5-λ0Ϊ<30><CEAA><EFBFBD><EFBFBD>,0<><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ֽڲ<D6BD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>
#define mCH341A_CMD_I2C_STM_MAX ( min( 0x3F, mCH341_PACKET_LENGTH ) ) // I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><DDB5><EFBFBD><EFBFBD>󳤶<EFBFBD>
#define mCH341A_CMD_I2C_STM_SET 0x60 // I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>,λ2=SPI<50><49>I/O<><4F>(0=<3D><><EFBFBD><EFBFBD><EBB5A5>,1=˫<><CBAB>˫<EFBFBD><CBAB>),λ1λ0=I2C<32>ٶ<EFBFBD>(00=<3D><><EFBFBD><EFBFBD>,01=<3D><>׼,10=<3D><><EFBFBD><EFBFBD>,11=<3D><><EFBFBD><EFBFBD>)
#define mCH341A_CMD_I2C_STM_US 0x40 // I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><>΢<EFBFBD><CEA2>Ϊ<EFBFBD><CEAA>λ<EFBFBD><CEBB>ʱ,λ3-λ0Ϊ<30><CEAA>ʱֵ
#define mCH341A_CMD_I2C_STM_MS 0x50 // I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>λ<EFBFBD><CEBB>ʱ,λ3-λ0Ϊ<30><CEAA>ʱֵ
#define mCH341A_CMD_I2C_STM_DLY 0x0F // I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
#define mCH341A_CMD_I2C_STM_END 0x00 // I2C<32>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>
#define mCH341A_CMD_UIO_STM_IN 0x00 // UIO<49>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>D7-D0
#define mCH341A_CMD_UIO_STM_DIR 0x40 // UIO<49>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A>趨I/O<><4F><EFBFBD><EFBFBD>D5-D0,λ5-λ0Ϊ<30><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define mCH341A_CMD_UIO_STM_OUT 0x80 // UIO<49>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>D5-D0,λ5-λ0Ϊ<30><CEAA><EFBFBD><EFBFBD>
#define mCH341A_CMD_UIO_STM_US 0xC0 // UIO<49>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><>΢<EFBFBD><CEA2>Ϊ<EFBFBD><CEAA>λ<EFBFBD><CEBB>ʱ,λ5-λ0Ϊ<30><CEAA>ʱֵ
#define mCH341A_CMD_UIO_STM_END 0x20 // UIO<49>ӿڵ<D3BF><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>
// CH341<34><31><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>ģʽ
#define mCH341_PARA_MODE_EPP 0x00 // CH341<34><31><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>ģʽΪEPP<50><50>ʽ
#define mCH341_PARA_MODE_EPP17 0x00 // CH341A<31><41><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>ģʽΪEPP<50><50>ʽV1.7
#define mCH341_PARA_MODE_EPP19 0x01 // CH341A<31><41><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>ģʽΪEPP<50><50>ʽV1.9
#define mCH341_PARA_MODE_MEM 0x02 // CH341<34><31><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>ģʽΪMEM<45><4D>ʽ
#define mCH341_PARA_MODE_ECP 0x03 // CH341A<31><41><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>ģʽΪECP<43><50>ʽ
// I/O<><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4>źŵ<C5BA>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD>ݶ<EFBFBD><DDB6><EFBFBD>
#define mStateBitERR 0x00000100 // ֻ<><D6BB><EFBFBD><EFBFBD>д,ERR#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬,1:<3A>ߵ<EFBFBD>ƽ,0:<3A>͵<EFBFBD>ƽ
#define mStateBitPEMP 0x00000200 // ֻ<><D6BB><EFBFBD><EFBFBD>д,PEMP<4D><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬,1:<3A>ߵ<EFBFBD>ƽ,0:<3A>͵<EFBFBD>ƽ
#define mStateBitINT 0x00000400 // ֻ<><D6BB><EFBFBD><EFBFBD>д,INT#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬,1:<3A>ߵ<EFBFBD>ƽ,0:<3A>͵<EFBFBD>ƽ
#define mStateBitSLCT 0x00000800 // ֻ<><D6BB><EFBFBD><EFBFBD>д,SLCT<43><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬,1:<3A>ߵ<EFBFBD>ƽ,0:<3A>͵<EFBFBD>ƽ
#define mStateBitWAIT 0x00002000 // ֻ<><D6BB><EFBFBD><EFBFBD>д,WAIT#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬,1:<3A>ߵ<EFBFBD>ƽ,0:<3A>͵<EFBFBD>ƽ
#define mStateBitDATAS 0x00004000 // ֻд<D6BB>ɶ<EFBFBD>,DATAS#/READ#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬,1:<3A>ߵ<EFBFBD>ƽ,0:<3A>͵<EFBFBD>ƽ
#define mStateBitADDRS 0x00008000 // ֻд<D6BB>ɶ<EFBFBD>,ADDRS#/ADDR/ALE<4C><45><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬,1:<3A>ߵ<EFBFBD>ƽ,0:<3A>͵<EFBFBD>ƽ
#define mStateBitRESET 0x00010000 // ֻд,RESET#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬,1:<3A>ߵ<EFBFBD>ƽ,0:<3A>͵<EFBFBD>ƽ
#define mStateBitWRITE 0x00020000 // ֻд,WRITE#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬,1:<3A>ߵ<EFBFBD>ƽ,0:<3A>͵<EFBFBD>ƽ
#define mStateBitSCL 0x00400000 // ֻ<><D6BB>,SCL<43><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬,1:<3A>ߵ<EFBFBD>ƽ,0:<3A>͵<EFBFBD>ƽ
#define mStateBitSDA 0x00800000 // ֻ<><D6BB>,SDA<44><41><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬,1:<3A>ߵ<EFBFBD>ƽ,0:<3A>͵<EFBFBD>ƽ
#define MAX_DEVICE_PATH_SIZE 128 // <20><EFBFBD><E8B1B8><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
#define MAX_DEVICE_ID_SIZE 64 // <20>豸ID<49><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
typedef VOID ( CALLBACK * mPCH341_INT_ROUTINE ) ( // <20>жϷ<D0B6><CFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ULONG iStatus ); // <20>ж<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>,<2C>ο<EFBFBD><CEBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ˵<CEBB><CBB5>
// λ7-λ0<CEBB><30>ӦCH341<34><31>D7-D0<44><30><EFBFBD><EFBFBD>
// λ8<CEBB><38>ӦCH341<34><31>ERR#<23><><EFBFBD><EFBFBD>, λ9<CEBB><39>ӦCH341<34><31>PEMP<4D><50><EFBFBD><EFBFBD>, λ10<31><30>ӦCH341<34><31>INT#<23><><EFBFBD><EFBFBD>, λ11<31><31>ӦCH341<34><31>SLCT<43><54><EFBFBD><EFBFBD>
HANDLE WINAPI CH341OpenDevice( // <20><><EFBFBD><EFBFBD>CH341<34>豸,<2C><><EFBFBD>ؾ<EFBFBD><D8BE><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,0<><30>Ӧ<EFBFBD><D3A6>һ<EFBFBD><D2BB><EFBFBD>
VOID WINAPI CH341CloseDevice( // <20>ر<EFBFBD>CH341<34>
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG WINAPI CH341GetVersion( ); // <20><><EFBFBD><EFBFBD>DLL<4C><EFBFBD><E6B1BE>,<2C><><EFBFBD>ذ汾<D8B0><E6B1BE>
ULONG WINAPI CH341DriverCommand( // ֱ<>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>򷵻<EFBFBD>0,<2C><><EFBFBD>򷵻<EFBFBD><F2B7B5BB><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,V1.6<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DLLҲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򿪺<EFBFBD><EFBFBD>ľ<EFBFBD><EFBFBD><EFBFBD>
mPWIN32_COMMAND ioCommand ); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B9B9>ָ<EFBFBD><D6B8>
// <20>ó<EFBFBD><C3B3><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5>ú󷵻<C3BA><F3B7B5BB><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṹ,<2C><><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD><C7B6><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B9B9>,
// <20><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>ʧ<EFBFBD><CAA7>ʱΪ0,<2C><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>ʱΪ<CAB1><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ֽ<EFBFBD>,<2C>򷵻<EFBFBD>mWIN32_COMMAND_HEAD+1,
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>ǰ,<2C>ֱ<EFBFBD><D6B1>ṩ:<3A>ܵ<EFBFBD><DCB5>Ż<EFBFBD><C5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD>,<2C><>ȡ<EFBFBD><C8A1><EFBFBD>ݵij<DDB5><C4B3><EFBFBD>(<28><>ѡ),<2C><><EFBFBD><EFBFBD>(<28><>ѡ)
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5>ú<EFBFBD>,<2C>ֱ𷵻<D6B1>:<3A><><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵij<DDB5><C4B3><EFBFBD>(<28><>ѡ),
// <20><><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>WINDOWS<57><53><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>,<2C><><EFBFBD>Բο<D4B2>NTSTATUS.H,
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵij<DDB5><C4B3><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>,<2C><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>Ϊ0
ULONG WINAPI CH341GetDrvVersion( ); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B1BE>,<2C><><EFBFBD>ذ汾<D8B0><E6B1BE>,<2C><><EFBFBD><EFBFBD><EFBFBD>򷵻<EFBFBD>0
BOOL WINAPI CH341ResetDevice( // <20><>λUSB<53>
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
BOOL WINAPI CH341GetDeviceDescr( // <20><>ȡ<EFBFBD><EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID oBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E3B9BB><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA>ʶ<EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341GetConfigDescr( // <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID oBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E3B9BB><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA>ʶ<EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341SetIntRoutine( // <20><EFBFBD>жϷ<D0B6><CFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
mPCH341_INT_ROUTINE iIntRoutine ); // ָ<><D6B8><EFBFBD>жϷ<D0B6><CFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ΪNULL<4C><4C>ȡ<EFBFBD><C8A1><EFBFBD>жϷ<D0B6><CFB7><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>øó<C3B8><C3B3><EFBFBD>
BOOL WINAPI CH341ReadInter( // <20><>ȡ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PULONG iStatus ); // ָ<><D6B8>һ<EFBFBD><D2BB>˫<EFBFBD>ֵ<EFBFBD>Ԫ,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>ж<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// λ7-λ0<CEBB><30>ӦCH341<34><31>D7-D0<44><30><EFBFBD><EFBFBD>
// λ8<CEBB><38>ӦCH341<34><31>ERR#<23><><EFBFBD><EFBFBD>, λ9<CEBB><39>ӦCH341<34><31>PEMP<4D><50><EFBFBD><EFBFBD>, λ10<31><30>ӦCH341<34><31>INT#<23><><EFBFBD><EFBFBD>, λ11<31><31>ӦCH341<34><31>SLCT<43><54><EFBFBD><EFBFBD>
BOOL WINAPI CH341AbortInter( // <20><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>ݶ<EFBFBD><DDB6><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
BOOL WINAPI CH341SetParaMode( // <20><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>ģʽ
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iMode ); // ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ: 0ΪEPPģʽ/EPPģʽV1.7, 1ΪEPPģʽV1.9, 2ΪMEMģʽ
BOOL WINAPI CH341InitParallel( // <20><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,RST#<23><><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iMode ); // ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ: 0ΪEPPģʽ/EPPģʽV1.7, 1ΪEPPģʽV1.9, 2ΪMEMģʽ, >= 0x00000100 <20><><EFBFBD>ֵ<EFBFBD>ǰģʽ
BOOL WINAPI CH341ReadData0( // <20><>0#<23>˿ڶ<CBBF>ȡ<EFBFBD><C8A1><EFBFBD>ݿ<EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID oBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E3B9BB><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA>ʶ<EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341ReadData1( // <20><>1#<23>˿ڶ<CBBF>ȡ<EFBFBD><C8A1><EFBFBD>ݿ<EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID oBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E3B9BB><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA>ʶ<EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341AbortRead( // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
BOOL WINAPI CH341WriteData0( // <20><>0#<23>˿<EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID iBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA><CAB5>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341WriteData1( // <20><>1#<23>˿<EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID iBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA><CAB5>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341AbortWrite( // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
BOOL WINAPI CH341GetStatus( // ͨ<><CDA8>CH341ֱ<31><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD>״̬
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PULONG iStatus ); // ָ<><D6B8>һ<EFBFBD><D2BB>˫<EFBFBD>ֵ<EFBFBD>Ԫ,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>,<2C>ο<EFBFBD><CEBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ˵<CEBB><CBB5>
// λ7-λ0<CEBB><30>ӦCH341<34><31>D7-D0<44><30><EFBFBD><EFBFBD>
// λ8<CEBB><38>ӦCH341<34><31>ERR#<23><><EFBFBD><EFBFBD>, λ9<CEBB><39>ӦCH341<34><31>PEMP<4D><50><EFBFBD><EFBFBD>, λ10<31><30>ӦCH341<34><31>INT#<23><><EFBFBD><EFBFBD>, λ11<31><31>ӦCH341<34><31>SLCT<43><54><EFBFBD><EFBFBD>, λ23<32><33>ӦCH341<34><31>SDA<44><41><EFBFBD><EFBFBD>
// λ13<31><33>ӦCH341<34><31>BUSY/WAIT#<23><><EFBFBD><EFBFBD>, λ14<31><34>ӦCH341<34><31>AUTOFD#/DATAS#<23><><EFBFBD><EFBFBD>,λ15<31><35>ӦCH341<34><31>SLCTIN#/ADDRS#<23><><EFBFBD><EFBFBD>
BOOL WINAPI CH341ReadI2C( // <20><>I2C<32>ӿڶ<D3BF>ȡһ<C8A1><D2BB><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
UCHAR iDevice, // <20><>7λָ<CEBB><D6B8>I2C<32><EFBFBD><E8B1B8>ַ
UCHAR iAddr, // ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>Ԫ<EFBFBD>ĵ<EFBFBD>ַ
PUCHAR oByte ); // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD>ֽڵ<D6BD>Ԫ,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>
BOOL WINAPI CH341WriteI2C( // <20><>I2C<32>ӿ<EFBFBD>д<EFBFBD><D0B4>һ<EFBFBD><D2BB><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
UCHAR iDevice, // <20><>7λָ<CEBB><D6B8>I2C<32><EFBFBD><E8B1B8>ַ
UCHAR iAddr, // ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>Ԫ<EFBFBD>ĵ<EFBFBD>ַ
UCHAR iByte ); // <20><>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>
BOOL WINAPI CH341EppReadData( // EPP<50><50>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: WR#=1, DS#=0, AS#=1, D0-D7=input
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID oBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E3B9BB><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA>ʶ<EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341EppReadAddr( // EPP<50><50>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>ַ: WR#=1, DS#=1, AS#=0, D0-D7=input
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID oBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E3B9BB><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD>ĵ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA>ʶ<EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341EppWriteData( // EPP<50><50>ʽд<CABD><D0B4><EFBFBD><EFBFBD>: WR#=0, DS#=0, AS#=1, D0-D7=output
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID iBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA><CAB5>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341EppWriteAddr( // EPP<50><50>ʽд<CABD><D0B4>ַ: WR#=0, DS#=1, AS#=0, D0-D7=output
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID iBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC>д<EFBFBD><D0B4><EFBFBD>ĵ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA><CAB5>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341EppSetAddr( // EPP<50><50>ʽ<EFBFBD><CABD><EFBFBD>õ<EFBFBD>ַ: WR#=0, DS#=1, AS#=0, D0-D7=output
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
UCHAR iAddr ); // ָ<><D6B8>EPP<50><50>ַ
BOOL WINAPI CH341MemReadAddr0( // MEM<45><4D>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>ַ0: WR#=1, DS#/RD#=0, AS#/ADDR=0, D0-D7=input
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID oBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E3B9BB><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>ӵ<EFBFBD>ַ0<D6B7><30>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA>ʶ<EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341MemReadAddr1( // MEM<45><4D>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>ַ1: WR#=1, DS#/RD#=0, AS#/ADDR=1, D0-D7=input
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID oBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E3B9BB><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>ӵ<EFBFBD>ַ1<D6B7><31>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA>ʶ<EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341MemWriteAddr0( // MEM<45><4D>ʽд<CABD><D0B4>ַ0: WR#=0, DS#/RD#=1, AS#/ADDR=0, D0-D7=output
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID iBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ0д<30><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA><CAB5>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341MemWriteAddr1( // MEM<45><4D>ʽд<CABD><D0B4>ַ1: WR#=0, DS#/RD#=1, AS#/ADDR=1, D0-D7=output
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID iBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ1д<31><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA><CAB5>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341SetExclusive( // <20><><EFBFBD>ö<EFBFBD>ռʹ<D5BC>õ<EFBFBD>ǰCH341<34>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iExclusive ); // Ϊ0<CEAA><30><EFBFBD><EFBFBD><E8B1B8><EFBFBD>Թ<EFBFBD><D4B9><EFBFBD>ʹ<EFBFBD><CAB9>,<2C><>0<EFBFBD><30><EFBFBD><EFBFBD>ռʹ<D5BC><CAB9>
BOOL WINAPI CH341SetTimeout( // <20><><EFBFBD><EFBFBD>USB<53><42><EFBFBD>ݶ<EFBFBD>д<EFBFBD>ij<EFBFBD>ʱ
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iWriteTimeout, // ָ<><D6B8>USBд<42><D0B4><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>ij<EFBFBD>ʱʱ<CAB1><CAB1>,<2C>Ժ<EFBFBD><D4BA><EFBFBD>mSΪ<53><CEAA>λ,0xFFFFFFFFָ<46><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ(Ĭ<><C4AC>ֵ)
ULONG iReadTimeout ); // ָ<><D6B8>USB<53><42>ȡ<EFBFBD><C8A1><EFBFBD>ݿ<EFBFBD><DDBF>ij<EFBFBD>ʱʱ<CAB1><CAB1>,<2C>Ժ<EFBFBD><D4BA><EFBFBD>mSΪ<53><CEAA>λ,0xFFFFFFFFָ<46><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ(Ĭ<><C4AC>ֵ)
BOOL WINAPI CH341ReadData( // <20><>ȡ<EFBFBD><C8A1><EFBFBD>ݿ<EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID oBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E3B9BB><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA>ʶ<EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
BOOL WINAPI CH341WriteData( // д<><D0B4><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PVOID iBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PULONG ioLength ); // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD><EFBFBD>ʱΪ׼<CEAA><D7BC>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA><CAB5>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
PVOID WINAPI CH341GetDeviceName( // <20><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD>ƵĻ<C6B5><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>򷵻<EFBFBD>NULL
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,0<><30>Ӧ<EFBFBD><D3A6>һ<EFBFBD><D2BB><EFBFBD>
ULONG WINAPI CH341GetVerIC( // <20><>ȡCH341оƬ<D0BE>İ汾,<2C><><EFBFBD><EFBFBD>:0=<3D><EFBFBD><E8B1B8>Ч,0x10=CH341,0x20=CH341A
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
#define IC_VER_CH341A 0x20
#define IC_VER_CH341A3 0x30
BOOL WINAPI CH341FlushBuffer( // <20><><EFBFBD><EFBFBD>CH341<34>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
BOOL WINAPI CH341WriteRead( // ִ<><D6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iWriteLength, // д<><D0B4><EFBFBD><EFBFBD><><D7BC>д<EFBFBD><D0B4><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
PVOID iWriteBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ULONG iReadStep, // ׼<><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><C4B3><EFBFBD>, ׼<><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>Ϊ(iReadStep*iReadTimes)
ULONG iReadTimes, // ׼<><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>
PULONG oReadLength, // ָ<>򳤶ȵ<F2B3A4B6>Ԫ,<2C><><EFBFBD>غ<EFBFBD>Ϊʵ<CEAA>ʶ<EFBFBD>ȡ<EFBFBD>ij<EFBFBD><C4B3><EFBFBD>
PVOID oReadBuffer ); // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E3B9BB><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
BOOL WINAPI CH341SetStream( // <20><><EFBFBD>ô<EFBFBD><C3B4><EFBFBD><EFBFBD><EFBFBD>ģʽ
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iMode ); // ָ<><D6B8>ģʽ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// λ1-λ0: I2C<32>ӿ<EFBFBD><D3BF>ٶ<EFBFBD>/SCLƵ<4C><C6B5>, 00=<3D><><EFBFBD><EFBFBD>/20KHz,01=<3D><>׼/100KHz(Ĭ<><C4AC>ֵ),10=<3D><><EFBFBD><EFBFBD>/400KHz,11=<3D><><EFBFBD><EFBFBD>/750KHz
// λ2: SPI<50><49>I/O<><4F>/IO<49><4F><EFBFBD><EFBFBD>, 0=<3D><><EFBFBD><EFBFBD><EBB5A5>(D3ʱ<33><CAB1>/D5<44><35>/D7<44><37>)(Ĭ<><C4AC>ֵ),1=˫<><CBAB>˫<EFBFBD><CBAB>(D3ʱ<33><CAB1>/D5<44><35>D4<44><34>/D7<44><37>D6<44><36>)
// λ7: SPI<50>ֽ<EFBFBD><D6BD>е<EFBFBD>λ˳<CEBB><CBB3>, 0=<3D><>λ<EFBFBD><CEBB>ǰ, 1=<3D><>λ<EFBFBD><CEBB>ǰ
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>Ϊ0
BOOL WINAPI CH341SetDelaymS( // <20><><EFBFBD><EFBFBD>Ӳ<EFBFBD><D3B2><EFBFBD><EFBFBD><ECB2BD>ʱ,<2C><><EFBFBD>ú<EFBFBD><C3BA>ܿ췵<DCBF><ECB7B5>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮ǰ<D6AE><C7B0>ʱָ<CAB1><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iDelay ); // ָ<><D6B8><EFBFBD><EFBFBD>ʱ<EFBFBD>ĺ<EFBFBD><C4BA><EFBFBD><EFBFBD><EFBFBD>
BOOL WINAPI CH341StreamI2C( // <20><><EFBFBD><EFBFBD>I2C<32><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,2<>߽ӿ<DFBD><><CAB1><EFBFBD><EFBFBD>ΪSCL<43><4C><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪSDA<44><41><EFBFBD><EFBFBD>(׼˫<D7BC><CBAB>I/O),<2C>ٶ<EFBFBD>Լ56K<36>ֽ<EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iWriteLength, // ׼<><D7BC>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>
PVOID iWriteBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ֽ<EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>I2C<32><EFBFBD><E8B1B8>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>λ
ULONG iReadLength, // ׼<><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>
PVOID oReadBuffer ); // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD><D8BA>Ƕ<EFBFBD><C7B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
typedef enum _EEPROM_TYPE { // EEPROM<4F>ͺ<EFBFBD>
ID_24C01,
ID_24C02,
ID_24C04,
ID_24C08,
ID_24C16,
ID_24C32,
ID_24C64,
ID_24C128,
ID_24C256,
ID_24C512,
ID_24C1024,
ID_24C2048,
ID_24C4096
} EEPROM_TYPE;
BOOL WINAPI CH341ReadEEPROM( // <20><>EEPROM<4F>ж<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>ݿ<EFBFBD>,<2C>ٶ<EFBFBD>Լ56K<36>ֽ<EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
EEPROM_TYPE iEepromID, // ָ<><D6B8>EEPROM<4F>ͺ<EFBFBD>
ULONG iAddr, // ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>Ԫ<EFBFBD>ĵ<EFBFBD>ַ
ULONG iLength, // ׼<><D7BC><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>
PUCHAR oBuffer ); // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD><D8BA>Ƕ<EFBFBD><C7B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
BOOL WINAPI CH341WriteEEPROM( // <20><>EEPROM<4F><4D>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
EEPROM_TYPE iEepromID, // ָ<><D6B8>EEPROM<4F>ͺ<EFBFBD>
ULONG iAddr, // ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>Ԫ<EFBFBD>ĵ<EFBFBD>ַ
ULONG iLength, // ׼<><D7BC>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>
PUCHAR iBuffer ); // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
BOOL WINAPI CH341GetInput( // ͨ<><CDA8>CH341ֱ<31><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD>״̬,Ч<>ʱ<EFBFBD>CH341GetStatus<75><73><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PULONG iStatus ); // ָ<><D6B8>һ<EFBFBD><D2BB>˫<EFBFBD>ֵ<EFBFBD>Ԫ,<2C><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>,<2C>ο<EFBFBD><CEBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ˵<CEBB><CBB5>
// λ7-λ0<CEBB><30>ӦCH341<34><31>D7-D0<44><30><EFBFBD><EFBFBD>
// λ8<CEBB><38>ӦCH341<34><31>ERR#<23><><EFBFBD><EFBFBD>, λ9<CEBB><39>ӦCH341<34><31>PEMP<4D><50><EFBFBD><EFBFBD>, λ10<31><30>ӦCH341<34><31>INT#<23><><EFBFBD><EFBFBD>, λ11<31><31>ӦCH341<34><31>SLCT<43><54><EFBFBD><EFBFBD>, λ23<32><33>ӦCH341<34><31>SDA<44><41><EFBFBD><EFBFBD>
// λ13<31><33>ӦCH341<34><31>BUSY/WAIT#<23><><EFBFBD><EFBFBD>, λ14<31><34>ӦCH341<34><31>AUTOFD#/DATAS#<23><><EFBFBD><EFBFBD>,λ15<31><35>ӦCH341<34><31>SLCTIN#/ADDRS#<23><><EFBFBD><EFBFBD>
BOOL WINAPI CH341SetOutput( // <20><><EFBFBD><EFBFBD>CH341<34><31>I/O<><4F><EFBFBD><EFBFBD>,<2C><>ͨ<EFBFBD><CDA8>CH341ֱ<31><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/* ***** <20><><EFBFBD><EFBFBD>ʹ<EFBFBD>ø<EFBFBD>API, <20><>ֹ<EFBFBD>޸<EFBFBD>I/O<><4F><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>оƬ ***** */
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iEnable, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>־,<2C>ο<EFBFBD><CEBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ˵<CEBB><CBB5>
// λ0Ϊ1˵<31><CBB5>iSetDataOut<75><74>λ15-λ8<CEBB><38>Ч,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// λ1Ϊ1˵<31><CBB5>iSetDirOut<75><74>λ15-λ8<CEBB><38>Ч,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// λ2Ϊ1˵<31><CBB5>iSetDataOut<75><74>7-λ0<CEBB><30>Ч,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// λ3Ϊ1˵<31><CBB5>iSetDirOut<75><74>λ7-λ0<CEBB><30>Ч,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// λ4Ϊ1˵<31><CBB5>iSetDataOut<75><74>λ23-λ16<31><36>Ч,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ULONG iSetDirOut, // <20><><EFBFBD><EFBFBD>I/O<><4F><EFBFBD><EFBFBD>,ijλ<C4B3><CEBB>0<EFBFBD><30><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>,ijλ<C4B3><CEBB>1<EFBFBD><31><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڷ<EFBFBD>ʽ<EFBFBD><CABD>Ĭ<EFBFBD><C4AC>ֵΪ0x000FC000,<2C>ο<EFBFBD><CEBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ˵<CEBB><CBB5>
ULONG iSetDataOut ); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>I/O<><4F><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>,<2C><>ôijλ<C4B3><CEBB><30><CAB1>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD>ƽ,ijλ<C4B3><CEBB><31><CAB1>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD>ƽ,<2C>ο<EFBFBD><CEBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ˵<CEBB><CBB5>
// λ7-λ0<CEBB><30>ӦCH341<34><31>D7-D0<44><30><EFBFBD><EFBFBD>
// λ8<CEBB><38>ӦCH341<34><31>ERR#<23><><EFBFBD><EFBFBD>, λ9<CEBB><39>ӦCH341<34><31>PEMP<4D><50><EFBFBD><EFBFBD>, λ10<31><30>ӦCH341<34><31>INT#<23><><EFBFBD><EFBFBD>, λ11<31><31>ӦCH341<34><31>SLCT<43><54><EFBFBD><EFBFBD>
// λ13<31><33>ӦCH341<34><31>WAIT#<23><><EFBFBD><EFBFBD>, λ14<31><34>ӦCH341<34><31>DATAS#/READ#<23><><EFBFBD><EFBFBD>,λ15<31><35>ӦCH341<34><31>ADDRS#/ADDR/ALE<4C><45><EFBFBD><EFBFBD>
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>I/O<><4F><EFBFBD><EFBFBD>: λ16<31><36>ӦCH341<34><31>RESET#<23><><EFBFBD><EFBFBD>, λ17<31><37>ӦCH341<34><31>WRITE#<23><><EFBFBD><EFBFBD>, λ18<31><38>ӦCH341<34><31>SCL<43><4C><EFBFBD><EFBFBD>, λ29<32><39>ӦCH341<34><31>SDA<44><41><EFBFBD><EFBFBD>
BOOL WINAPI CH341Set_D5_D0( // <20><><EFBFBD><EFBFBD>CH341<34><31>D5-D0<44><30><EFBFBD>ŵ<EFBFBD>I/O<><4F><EFBFBD><EFBFBD>,<2C><>ͨ<EFBFBD><CDA8>CH341<34><31>D5-D0<44><30><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>ʱ<EFBFBD>CH341SetOutput<75><74><EFBFBD><EFBFBD>
/* ***** <20><><EFBFBD><EFBFBD>ʹ<EFBFBD>ø<EFBFBD>API, <20><>ֹ<EFBFBD>޸<EFBFBD>I/O<><4F><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>оƬ ***** */
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iSetDirOut, // <20><><EFBFBD><EFBFBD>D5-D0<44><30><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>I/O<><4F><EFBFBD><EFBFBD>,ijλ<C4B3><CEBB>0<EFBFBD><30><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>,ijλ<C4B3><CEBB>1<EFBFBD><31><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڷ<EFBFBD>ʽ<EFBFBD><CABD>Ĭ<EFBFBD><C4AC>ֵΪ0x00ȫ<30><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ULONG iSetDataOut ); // <20><><EFBFBD><EFBFBD>D5-D0<44><30><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>I/O<><4F><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>,<2C><>ôijλ<C4B3><CEBB><30><CAB1>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD>ƽ,ijλ<C4B3><CEBB><31><CAB1>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD>ƽ
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>λ5-λ0<CEBB>ֱ<EFBFBD><D6B1><EFBFBD>ӦCH341<34><31>D5-D0<44><30><EFBFBD><EFBFBD>
BOOL WINAPI CH341StreamSPI3( // <20><>API<50><49>ʧЧ,<2C><><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>
ULONG iIndex,
ULONG iChipSelect,
ULONG iLength,
PVOID ioBuffer );
BOOL WINAPI CH341StreamSPI4( // <20><><EFBFBD><EFBFBD>SPI<50><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,4<>߽ӿ<DFBD><><CAB1><EFBFBD><EFBFBD>ΪDCK/D3<44><33><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪDOUT/D5<44><35><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪDIN/D7<44><37><EFBFBD><EFBFBD>ѡ<C6AC><D1A1>ΪD0/D1/D2,<2C>ٶ<EFBFBD>Լ68K<38>ֽ<EFBFBD>
/* SPIʱ<49><CAB1>: DCK/D3<44><33><EFBFBD><EFBFBD>Ϊʱ<CEAA><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, Ĭ<><C4AC>Ϊ<EFBFBD>͵<EFBFBD>ƽ, DOUT/D5<44><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮ǰ<D6AE>ĵ͵<C4B5>ƽ<EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD>, DIN/D7<44><37><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>½<EFBFBD><C2BD><EFBFBD>֮ǰ<D6AE>ĸߵ<C4B8>ƽ<EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD> */
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iChipSelect, // Ƭѡ<C6AC><D1A1><EFBFBD><EFBFBD>, λ7Ϊ0<CEAA><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƭѡ<C6AC><D1A1><EFBFBD><EFBFBD>, λ7Ϊ1<CEAA><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч: λ1λ0Ϊ00/01/10<31>ֱ<EFBFBD>ѡ<EFBFBD><D1A1>D0/D1/D2<44><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>͵<EFBFBD>ƽ<EFBFBD><C6BD>ЧƬѡ
ULONG iLength, // ׼<><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>
PVOID ioBuffer ); // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>DOUTд<54><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD><D8BA>Ǵ<EFBFBD>DIN<49><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
BOOL WINAPI CH341StreamSPI5( // <20><><EFBFBD><EFBFBD>SPI<50><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,5<>߽ӿ<DFBD><><CAB1><EFBFBD><EFBFBD>ΪDCK/D3<44><33><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪDOUT/D5<44><35>DOUT2/D4<44><34><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪDIN/D7<44><37>DIN2/D6<44><36><EFBFBD><EFBFBD>ѡ<C6AC><D1A1>ΪD0/D1/D2,<2C>ٶ<EFBFBD>Լ30K<30>ֽ<EFBFBD>*2
/* SPIʱ<49><CAB1>: DCK/D3<44><33><EFBFBD><EFBFBD>Ϊʱ<CEAA><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, Ĭ<><C4AC>Ϊ<EFBFBD>͵<EFBFBD>ƽ, DOUT/D5<44><35>DOUT2/D4<44><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮ǰ<D6AE>ĵ͵<C4B5>ƽ<EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD>, DIN/D7<44><37>DIN2/D6<44><36><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>½<EFBFBD><C2BD><EFBFBD>֮ǰ<D6AE>ĸߵ<C4B8>ƽ<EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD> */
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iChipSelect, // Ƭѡ<C6AC><D1A1><EFBFBD><EFBFBD>, λ7Ϊ0<CEAA><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƭѡ<C6AC><D1A1><EFBFBD><EFBFBD>, λ7Ϊ1<CEAA><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч: λ1λ0Ϊ00/01/10<31>ֱ<EFBFBD>ѡ<EFBFBD><D1A1>D0/D1/D2<44><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>͵<EFBFBD>ƽ<EFBFBD><C6BD>ЧƬѡ
ULONG iLength, // ׼<><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>
PVOID ioBuffer, // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>DOUTд<54><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD><D8BA>Ǵ<EFBFBD>DIN<49><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PVOID ioBuffer2 ); // ָ<><D6B8><EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>DOUT2д<32><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD><D8BA>Ǵ<EFBFBD>DIN2<4E><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
BOOL WINAPI CH341BitStreamSPI( // <20><><EFBFBD><EFBFBD>SPIλ<49><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,4<><34>/5<>߽ӿ<DFBD><><CAB1><EFBFBD><EFBFBD>ΪDCK/D3<44><33><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪDOUT/DOUT2<54><32><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪDIN/DIN2<4E><32><EFBFBD><EFBFBD>ѡ<C6AC><D1A1>ΪD0/D1/D2,<2C>ٶ<EFBFBD>Լ8Kλ*2
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
ULONG iLength, // ׼<><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>,һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>896,<2C><><EFBFBD><EFBFBD><E9B2BB><EFBFBD><EFBFBD>256
PVOID ioBuffer ); // ָ<><D6B8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>DOUT/DOUT2/D2-D0д<30><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>غ<EFBFBD><D8BA>Ǵ<EFBFBD>DIN/DIN2<4E><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/* SPIʱ<49><CAB1>: DCK/D3<44><33><EFBFBD><EFBFBD>Ϊʱ<CEAA><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, Ĭ<><C4AC>Ϊ<EFBFBD>͵<EFBFBD>ƽ, DOUT/D5<44><35>DOUT2/D4<44><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮ǰ<D6AE>ĵ͵<C4B5>ƽ<EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD>, DIN/D7<44><37>DIN2/D6<44><36><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>½<EFBFBD><C2BD><EFBFBD>֮ǰ<D6AE>ĸߵ<C4B8>ƽ<EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD> */
/* ioBuffer<65>е<EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ֽڹ<D6BD><38>ֱ<EFBFBD><D6B1><EFBFBD>ӦD7-D0<44><30><EFBFBD><EFBFBD>, λ5<CEBB><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DOUT, λ4<CEBB><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DOUT2, λ2-λ0<CEBB><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>D2-D0, λ7<CEBB><37>DIN<49><4E><EFBFBD><EFBFBD>, λ6<CEBB><36>DIN2<4E><32><EFBFBD><EFBFBD>, λ3<CEBB><33><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD> */
/* <20>ڵ<EFBFBD><DAB5>ø<EFBFBD>API֮ǰ,Ӧ<><D3A6><EFBFBD>ȵ<EFBFBD><C8B5><EFBFBD>CH341Set_D5_D0<44><30><EFBFBD><EFBFBD>CH341<34><31>D5-D0<44><30><EFBFBD>ŵ<EFBFBD>I/O<><4F><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>Ĭ<EFBFBD>ϵ<EFBFBD>ƽ */
BOOL WINAPI CH341SetBufUpload( // <20><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>ģʽ
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,0<><30>Ӧ<EFBFBD><D3A6>һ<EFBFBD><D2BB><EFBFBD>
ULONG iEnableOrClear ); // Ϊ0<CEAA><30><EFBFBD><EFBFBD>ֹ<EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>ģʽ,ʹ<><CAB9>ֱ<EFBFBD><D6B1><EFBFBD>ϴ<EFBFBD>,<2C><>0<EFBFBD><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>ģʽ<C4A3><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>ģʽ,<2C><>ôCH341<34><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򴴽<EFBFBD><F2B4B4BD>߳<EFBFBD><DFB3>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>USB<53>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>ݵ<EFBFBD><DDB5>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>CH341ReadData<74><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ػ<EFBFBD><D8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
LONG WINAPI CH341QueryBufUpload( // <20><>ѯ<EFBFBD>ڲ<EFBFBD><DAB2>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD><EFBFBD><EFBFBD>,<2C>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-1
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,0<><30>Ӧ<EFBFBD><D3A6>һ<EFBFBD><D2BB><EFBFBD>
BOOL WINAPI CH341SetBufDownload( // <20><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD>ģʽ
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,0<><30>Ӧ<EFBFBD><D3A6>һ<EFBFBD><D2BB><EFBFBD>
ULONG iEnableOrClear ); // Ϊ0<CEAA><30><EFBFBD><EFBFBD>ֹ<EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD>ģʽ,ʹ<><CAB9>ֱ<EFBFBD><D6B1><EFBFBD>´<EFBFBD>,<2C><>0<EFBFBD><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD>ģʽ<C4A3><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD>ģʽ,<2C><>ô<EFBFBD><C3B4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>CH341WriteData<74>󽫽<EFBFBD><F3BDABBD><EFBFBD><EFBFBD>ǽ<EFBFBD>USB<53>´<EFBFBD><C2B4><EFBFBD><EFBFBD>ݷŵ<DDB7><C5B5>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>CH341<34><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򴴽<EFBFBD><F2B4B4BD><EFBFBD><EFBFBD>߳<EFBFBD><DFB3>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
LONG WINAPI CH341QueryBufDownload( // <20><>ѯ<EFBFBD>ڲ<EFBFBD><DAB2>´<EFBFBD><C2B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD><EFBFBD><EFBFBD>(<28><>δ<EFBFBD><CEB4><EFBFBD><EFBFBD>),<2C>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-1
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,0<><30>Ӧ<EFBFBD><D3A6>һ<EFBFBD><D2BB><EFBFBD>
BOOL WINAPI CH341ResetInter( // <20><>λ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>ݶ<EFBFBD><DDB6><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
BOOL WINAPI CH341ResetRead( // <20><>λ<EFBFBD><CEBB><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
BOOL WINAPI CH341ResetWrite( // <20><>λ<EFBFBD><CEBB><EFBFBD>ݿ<EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
typedef VOID ( CALLBACK * mPCH341_NOTIFY_ROUTINE ) ( // <20><EFBFBD>¼<EFBFBD>֪ͨ<CDA8>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
ULONG iEventStatus ); // <20><EFBFBD>¼<EFBFBD><C2BC>͵<EFBFBD>ǰ״̬(<28><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD>): 0=<3D><EFBFBD>γ<EFBFBD><CEB3>¼<EFBFBD>, 3=<3D><EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
#define CH341_DEVICE_ARRIVAL 3 // <20><EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>,<2C>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>
#define CH341_DEVICE_REMOVE_PEND 1 // <20><EFBFBD><E8B1B8>Ҫ<EFBFBD>γ<EFBFBD>
#define CH341_DEVICE_REMOVE 0 // <20><EFBFBD>γ<EFBFBD><CEB3>¼<EFBFBD>,<2C>Ѿ<EFBFBD><D1BE>γ<EFBFBD>
BOOL WINAPI CH341SetDeviceNotify( // <20><EFBFBD><EFBFBD>¼<EFBFBD>֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,0<><30>Ӧ<EFBFBD><D3A6>һ<EFBFBD><D2BB><EFBFBD>
PCHAR iDeviceID, // <20><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><><D6B8><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><E8B1B8>ID,<2C>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>\0<><30>ֹ
mPCH341_NOTIFY_ROUTINE iNotifyRoutine ); // ָ<><D6B8><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>,ΪNULL<4C><4C>ȡ<EFBFBD><C8A1><EFBFBD>¼<EFBFBD>֪ͨ,<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD>¼<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>øó<C3B8><C3B3><EFBFBD>
BOOL WINAPI CH341SetupSerial( // <20>趨CH341<34>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>APIֻ<49><D6BB><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4>ڷ<EFBFBD>ʽ<EFBFBD><CABD>CH341оƬ
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,0<><30>Ӧ<EFBFBD><D3A6>һ<EFBFBD><D2BB><EFBFBD>
ULONG iParityMode, // ָ<><D6B8>CH341<34><31><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>ģʽ: NOPARITY/ODDPARITY/EVENPARITY/MARKPARITY/SPACEPARITY
ULONG iBaudRate ); // ָ<><D6B8>CH341<34><31><EFBFBD>ڵ<EFBFBD>ͨѶ<CDA8><D1B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>50<35><30>3000000֮<30><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
/* <20><><EFBFBD><EFBFBD>API<50><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4>ڷ<EFBFBD>ʽ<EFBFBD><CABD>CH341оƬ,<2C><><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD>APIһ<49><D2BB>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2>ڷ<EFBFBD>ʽ<EFBFBD><CABD>CH341оƬ
CH341OpenDevice
CH341CloseDevice
CH341SetupSerial
CH341ReadData
CH341WriteData
CH341SetBufUpload
CH341QueryBufUpload
CH341SetBufDownload
CH341QueryBufDownload
CH341SetDeviceNotify
CH341GetStatus
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҪAPI,<2C><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD>ҪAPI
CH341GetVersion
CH341DriverCommand
CH341GetDrvVersion
CH341ResetDevice
CH341GetDeviceDescr
CH341GetConfigDescr
CH341SetIntRoutine
CH341ReadInter
CH341AbortInter
CH341AbortRead
CH341AbortWrite
CH341ReadI2C
CH341WriteI2C
CH341SetExclusive
CH341SetTimeout
CH341GetDeviceName
CH341GetVerIC
CH341FlushBuffer
CH341WriteRead
CH341ResetInter
CH341ResetRead
CH341ResetWrite
*/
HANDLE WINAPI CH341OpenDeviceEx( // <20><><EFBFBD><EFBFBD>CH341<34>豸,<2C><><EFBFBD>ؾ<EFBFBD><D8BE><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,0<><30>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD>豸,1<><31>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>ĵڶ<C4B5><DAB6><EFBFBD><EFBFBD>豸,Ϊ<><CEAA>Լ<EFBFBD><EFBFBD><EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ر<EFBFBD><D8B1>
VOID WINAPI CH341CloseDeviceEx( // <20>ر<EFBFBD>CH341<34>
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>
PCHAR WINAPI CH341GetDeviceNameEx( // <20><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD>ƵĻ<C6B5><C4BB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>򷵻<EFBFBD>NULL
ULONG iIndex ); // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,0<><30>Ӧ<EFBFBD><D3A6>һ<EFBFBD><D2BB><EFBFBD>
BOOL WINAPI CH341SetDeviceNotifyEx( // <20><EFBFBD><EFBFBD>¼<EFBFBD>֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>
ULONG iIndex, // ָ<><D6B8>CH341<34><EFBFBD><E8B1B8><EFBFBD><EFBFBD>,0<><30>Ӧ<EFBFBD><D3A6>һ<EFBFBD><D2BB><EFBFBD>
PCHAR iDeviceID, // <20><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><><D6B8><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><E8B1B8>ID,<2C>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>\0<><30>ֹ
mPCH341_NOTIFY_ROUTINE iNotifyRoutine ); // ָ<><D6B8><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>,ΪNULL<4C><4C>ȡ<EFBFBD><C8A1><EFBFBD>¼<EFBFBD>֪ͨ,<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD>¼<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>øó<C3B8><C3B3><EFBFBD>
#ifdef __cplusplus
}
#endif
#endif // _CH341_DLL_H