nxuart.h

来自「class to work with UART port on ATmega12」· C头文件 代码 · 共 36 行

H
36
字号
#ifndef _NX_UART
#define _NX_UART

#if (defined(__ATmega128__) || defined(__ATmega2560__))

#include "ioavr.h"
#include "nxConfig.h"

#ifdef NXUART_USE_V20090211

#define nxUART0   0

class nxUARTPort
{
	public:
		nxUARTPort(unsigned char UARTNum, unsigned int UARTSpeed);
		unsigned char PortNum;
		unsigned int  BaudRate;
		bool DataReady;
		void Init();
		void ReceiveData (unsigned char * pBuf, unsigned int Count);
		void TransmitData(unsigned char * pBuf, unsigned int Count);
		~nxUARTPort();
	private:
		//no
	
};

#endif

#else
#error this module designed for ATmega128/2560 only
#endif

#endif

⌨️ 快捷键说明

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