91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

壓縮包內一共有我收集的三分不同的CSerial串口標準函數頭文件,可以直接調用,根據自己需要選擇一個好用的串口類吧

資源截圖

代碼片段和文件信息

//	Serial.cpp?-?Implementation?of?the?CSerial?class
//
// Copyright?(C)?1999-2003?Ramon?de?Klein?(Ramon.de.Klein@ict.nl)
//
//?This?library?is?free?software;?you?can?redistribute?it?and/or
//?modify?it?under?the?terms?of?the?GNU?Lesser?General?Public
//?License?as?published?by?the?Free?Software?Foundation;?either
//?version?2.1?of?the?License?or?(at?your?option)?any?later?version.
//?
//?This?library?is?distributed?in?the?hope?that?it?will?be?useful
//?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
//?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the?GNU
//?Lesser?General?Public?License?for?more?details.
//?
//?You?should?have?received?a?copy?of?the?GNU?Lesser?General?Public
//?License?along?with?this?library;?if?not?write?to?the?Free?Software
//?Foundation?Inc.?59?Temple?Place?Suite?330?Boston?MA??02111-1307??USA


//////////////////////////////////////////////////////////////////////
//?Include?the?standard?header?files

#define?STRICT
#include?
#include?
#include?


//////////////////////////////////////////////////////////////////////
//?Include?module?headerfile

#include?“Serial.h“

//#define?SERIAL_NO_OVERLAPPED
//////////////////////////////////////////////////////////////////////
//?Disable?warning?C4127:?conditional?expression?is?constant?which
//?is?generated?when?using?the?_RPTF?and?_ASSERTE?macros.

#pragma?warning(disable:?4127)


//////////////////////////////////////////////////////////////////////
//?Enable?debug?memory?manager

#ifdef?_DEBUG

#ifdef?THIS_FILE
#undef?THIS_FILE
#endif

static?const?char?THIS_FILE[]?=?__FILE__;
#define?new?DEBUG_NEW

#endif


//////////////////////////////////////////////////////////////////////
//?Helper?methods

inline?void?CSerial::CheckRequirements?(LPOVERLAPPED?lpOverlapped?DWORD?dwTimeout)?const
{
#ifdef?SERIAL_NO_OVERLAPPED

//?Check?if?an?overlapped?structure?has?been?specified
if?(lpOverlapped?||?(dwTimeout?!=?INFINITE))
{
//?Quit?application
::MessageBox(0_T(“Overlapped?I/O?and?time-outs?are?not?supported?when?overlapped?I/O?is?disabled.“)_T(“Serial?library“)?MB_IConerror?|?MB_TASKMODAL);
::DebugBreak();
::ExitProcess(0xFFFFFFF);
}

#endif

#ifdef?SERIAL_NO_CANCELIO

//?Check?if?0?or?INFINITE?time-out?has?been?specified?because
//?the?communication?I/O?cannot?be?cancelled.
if?((dwTimeout?!=?0)?&&?(dwTimeout?!=?INFINITE))
{
//?Quit?application
::MessageBox(0_T(“Timeouts?are?not?supported?when?SERIAL_NO_CANCELIO?is?defined“)_T(“Serial?library“)?MB_IConerror?|?MB_TASKMODAL);
::DebugBreak();
::ExitProcess(0xFFFFFFF);
}

#endif //?SERIAL_NO_CANCELIO

//?Avoid?warnings
(void)?dwTimeout;
(void)?lpOverlapped;
}

inline?BOOL?CSerial::CancelCommIo?(void)
{
#ifdef?SERIAL_NO_CANCELIO
//?CancelIo?shouldn‘t?have?been?called?at?this?point
::DebugBreak();
return?FALSE;
#else

//?Cancel?the?I/O?requ

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-12-02?23:59??CSerial\
?????文件???????35688??2008-02-13?22:01??CSerial\Serial.cpp
?????文件???????13352??2009-10-17?22:31??CSerial\Serial.h
?????文件????????7312??2008-12-05?13:33??CSerial\SerialEx.cpp
?????文件????????4042??2003-11-07?16:09??CSerial\SerialEx.h
?????文件????????4098??2003-11-02?15:50??CSerial\SerialMFC.h
?????文件????????3562??2003-11-02?10:18??CSerial\SerialWnd.cpp
?????文件????????3043??2003-11-02?15:50??CSerial\SerialWnd.h
?????文件????????1292??2009-10-20?10:11??CSerial\Text1.cpp
?????目錄???????????0??2012-11-13?01:48??CSerial例子1\
?????文件????????5080??2012-11-13?01:43??CSerial例子1\CSerial.cpp
?????文件?????????814??2012-11-13?01:43??CSerial例子1\CSerial.h
?????目錄???????????0??2012-11-13?01:56??CSerial例子2\
?????文件???????10322??2012-11-13?01:50??CSerial例子2\CSerial.cpp
?????文件????????1337??2012-11-13?01:49??CSerial例子2\CSerial.h

評論

共有 條評論