| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
DAN-113 bảng dữ liệu(PDF) 4 Page - Exar Corporation |
|
|
|||||||||||||||||||||||||||||
DAN-113 bảng dữ liệu(HTML) 4 Page - Exar Corporation |
|
4 / 6 page ![]() DATA COMMUNICATIONS APPLICATION NOTE DAN113 4 EXAR Corporation, 48720 Kato Road, Fremont, CA 94538 TEL 1-510- 668-7000 – FAX 1-510-668-7017 - www.exar.com \ XRPORT_IOCTL_INDEX + 2, \ METHOD_BUFFERED, \ FILE_ANY_ACCESS) For general configuration settings of serial port, such as baud rate, byte size, stop bit, and parity, SetCommState function is used. The first parameter is the handle of the communication device, which is returned from CreateFile function call. The second parameter is a pointer to a DCB structure containing the configuration information for the specified communication device. On the other hand, application may call GetCommState function to report back the current states of the communication port. Examples The following is a code segment of how to do data communication in the serial ports. Its purpose is just to give user a quick start on his/her application. We assume the user has a basic knowledge on programming in C/C++. More programming information is also available in Microsoft SDK document. Open a serial port: PortHandle = NULL;//initialize to NULL if (cPortNo <= 9) ComName.Format("COM%d",cPortNo); else ComName.Format("\\\\.\\COM%d",cPortNo); //port number has //any value greater than 9 if((PortHandle=CreateFile(ComName,GENERIC_READ|GENERIC_WRITE,0,0,O PEN_EXISTING,FILE_FLAG_OVERLAPPED,0)) == INVALID_HANDLE_VALUE) //NON OVERLAPPED READ AND WRITE { DWORD err=GetLastError(); return (NULL);//if port creation failed } else //port was successfully opened { //Do any necessary port setting. } Read and Write: // Read it's contents into a buffer. |
|
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |