⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 commchannel.hpp

📁 一个开放源代码的AVR单片机编程器
💻 HPP
字号:
/*****************************************************************************
 *
 * Atmel Corporation
 *
 * File              : CommChannel.hpp
 * Compiler          : Dev-C++ 4.9.8.0 - http://bloodshed.net/dev/
 * Revision          : $Revision: 3.0 $
 * Date              : $Date: Tuesday, January 17, 2006 18:33:56 UTC $
 * Updated by        : $Author: raapeland $
 *
 * Support mail      : avr@atmel.com
 *
 * Target platform   : Win32
 *
 * AppNote           : AVR911 - AVR Open-source Programmer
 *
 * Description       : An abstract class for general byte-by-byte communication.
 *                     Serialport, USB, TCP/IP or similar implementations can be derived
 *                     from this class to create a technology-independent
 *                     communication interface.
 *
 *                     This abstract class does not provide any constructor as it is
 *                     too specific for this generalized class. Derived classes should
 *                     implement their own constructors for specific communication devices.
 *
 * 
 ****************************************************************************/
#ifndef COMMCHANNEL_HPP
#define COMMCHANNEL_HPP

using namespace std;

class CommChannel
{
	public:
		// Destructor
		virtual ~CommChannel() = 0;

		// Open the communication channel.
		virtual void openChannel() = 0;

		// Close the communication channel.
		virtual void closeChannel() = 0;

		// Transmit a single byte.
		virtual void sendByte( long data ) = 0;

		// Receive a single byte.
		virtual long getByte() = 0;

		// Flush the transmit buffer.
		virtual void flushTX() = 0;

		// Flush the receive buffer.
		virtual void flushRX() = 0;

		// Transmit multiple bytes.
		virtual void sendMultiple( unsigned char * data, long bufsize ) = 0;    
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -