资源简介
压缩包内一共有我收集的三分不同的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
- 上一篇:Devexpress13.1.5破解
- 下一篇:SMV 符号验证的使用文档
相关资源
- PLC上位机编程软件
- silicon lab公司的收音IC SI47XX全套开发工
- 读取串口数据并画实时曲线的VC 程序
- 课程设计蔬菜大棚自动控制系统,包
- 伺服电机上位机软件源代码
- 欧姆龙PLC与上位机通讯共享库
- 匿名领航者飞控源码、原理图和上位
- PN532上位机读写程序
- PN532上位机读写winfrom源码
- 三菱PLC 与 上位机SLMP通讯
- 组态王图库
- MPU6050数据发送到匿名上位机2.4版本的
- 基于stm32的上位机与下位机的通信
- MiniIMU上位机软件jy901上位机最新版.
- 单片机控制上位机端软件
- CYPRESS USB上位机VC程序
- QT开发的串口udptcp通信上位机软件
- MODBUS电压电流表程序+上位机
- 光立方完整资料(原理图+清单+程序
- 信号机上位机大为
- 温度数据采集上位机
- DS5000上位机软件
- 激光测距模块tof10120基于stm32f103开发板
- S32KCANbootloader上位机及下位机源码
- 基于stm32f407芯片双ADC多通道开启AD转换
- PN532工具V3.0老司机的店版本,nfc上位
- CSerialPort类使用
- VC MODBUS协议上位机程序
- STM32_USB收发例程,内含USB上位机和下
- stm32驱动ccd并且发送上位机
评论
共有 条评论