請先看『使用說明』
RS485 Module under WinCE
From LEXWiKi
(Difference between revisions)
Line 13: | Line 13: | ||
4.click AutoFlow if you want to test flowcontrol.<br /> | 4.click AutoFlow if you want to test flowcontrol.<br /> | ||
- | + | == Sample code Introduction == | |
+ | |||
+ | ===Create Com Port=== | ||
+ | bool CreatCom(CString Com_Str,DWORD Send_buf,DWORD Rec_buf,int flow_control) | ||
+ | '''Parameters'''<br /> | ||
+ | Com_Str: The name of COM port to be created<br /> | ||
+ | Send_buf:Setting Send buffer<br /> | ||
+ | Rec_buf: Setting Recive buffer<br /> | ||
+ | flow_control:flow control flag :1(on) or 0(off)<br /> | ||
+ | |||
+ | ===Setting Com port === | ||
+ | bool SetCom(int rate, BYTE ByteSize, TCHAR parity, TCHAR stopbit, int rtsflag) | ||
+ | '''Parameters'''<br /> |
Revision as of 18:35, 17 March 2010
Note:this source code and binary only suppor RS485 test on VIA series motherboard
Contents |
The Sample code source you can download from
Source file: RS485_Src_CE.rar
Binary file: RS485_Bin_CE.rar
How to use this Demo Application

1.Selcet RS485 com port and Rts Signal Control ,Click Open.
2. Put some message in editbox and then press send button
3.Click Recive button and than the message will display in editbox.
4.click AutoFlow if you want to test flowcontrol.
Sample code Introduction
Create Com Port
bool CreatCom(CString Com_Str,DWORD Send_buf,DWORD Rec_buf,int flow_control)
Parameters
Com_Str: The name of COM port to be created
Send_buf:Setting Send buffer
Rec_buf: Setting Recive buffer
flow_control:flow control flag :1(on) or 0(off)
Setting Com port
bool SetCom(int rate, BYTE ByteSize, TCHAR parity, TCHAR stopbit, int rtsflag)
Parameters