#ifndef		__PRINT_H_
#define		__PRINT_H_
/*H******************************************************************************
* NAME:         time_count.h
*********************************************************************************/
//硬件定义
#define	printUsart USART3
#define	print_DMA	DMA1
#define	printR_DMAy_Channelx DMA1_Channel3
#define	printT_DMAy_Channelx DMA1_Channel2
#define	printRxDmaChNb 3
#define	printTxDmaChNb 2
//缓冲数定义
#define	C_printBuf 100

#define	C_printQueue 80                 //打印机消息队列


//=============================================================================
//字符定义
#define	LF	0x0a						//打印换行命令

#define	ESC	0X1B

#define	J	0x4A

#define	DLE	0X10

#define	EOT	0X04

#define	PCR  0X0D



typedef enum
{
noSend,				
sending,		
}printProStae_TypeDef; 




//******************************************************************************
//*-------------- 变量声名 -----------------------------------------------------
//******************************************************************************
extern	uint8_t printBuf[gunNumber][C_printBuf];
extern	uint32_t printQueue[gunNumber][C_printQueue];
extern	volatile printProStae_TypeDef printState;


														
//******************************************************************************
//*-------------- 函数声名 -----------------------------------------------------
//******************************************************************************
extern	void printUsartIsr(void);
extern	void printTxDmaInt(void);
extern	void printSend(u8 *pData, u8 len);

extern	uint8_t	print_init(uint8_t *pdata);
extern	uint8_t	printChinese(uint8_t *pData);
extern	uint8_t	printLF(uint8_t *pdata);
extern	uint8_t	printCR(uint8_t *pData);
extern	uint8_t	LFnRow(uint8_t *pData,uint8_t row);
extern	uint8_t	setPageLen(uint8_t *pData,uint8_t pageLen);
extern	uint8_t	setLeftSpace(uint8_t *pData,uint8_t spaceNumber);
extern	uint8_t	setRightSpace(uint8_t *pData,uint8_t spaceNumber);
extern	uint8_t	setWordSpace(uint8_t *pData, uint8_t wordSpace);
extern	uint8_t	setRowSpace(uint8_t *pData, uint8_t rowSpace);
											
#endif	//#ifndef		
