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

📄 uart.h

📁 台湾亚信电子ASIX11015的UART驱动,很经典的.我也正在学习驱动编写,希望和大家一起探讨
💻 H
字号:
 /*
******************************************************************************
 *     Copyright (c) 2005	ASIX Electronic Corporation      All rights reserved.
 *
 *     This is unpublished proprietary source code of ASIX Electronic Corporation
 *
 *     The copyright notice above does not evidence any actual or intended
 *     publication of such source code.
 ******************************************************************************
 */
/*================================================================================
 * Module Name : uart.h
 * Purpose     : A header file of uart.c includes UART0 and UART1 module.
 * Author      : Robin Lee
 * Date        : 2006-01-10
 * Notes       :
 * $Log: uart.h,v $
 * Revision 1.3  2006/05/03 02:46:00  robin6633
 * Changed the the function name UART_GetBufCount()
 * to UART_GetRxBufCount() .
 *
 * Revision 1.2  2006/05/02 01:43:45  robin6633
 * Add an expanding function to get the counter value of UART software buffer.
 *
 * Revision 1.1  2006/04/07 11:39:14  robin6633
 * no message
 *
 *================================================================================
 */

#ifndef __UART_H__
#define __UART_H__

/* INCLUDE FILE DECLARATIONS */
#include	"uart_cfg.h"


/* NAMING CONSTANT DECLARATIONS */
#if UART0_ENABLE
#define MAX_TX_UART0_BUF_SIZE	512
#define MAX_TX_UART0_MASK		(MAX_TX_UART0_BUF_SIZE - 1)
#define MAX_RX_UART0_BUF_SIZE	512
#define MAX_RX_UART0_MASK		(MAX_RX_UART0_BUF_SIZE - 1)
#endif

#if UART1_ENABLE
#define MAX_TX_UART1_BUF_SIZE	512
#define MAX_TX_UART1_MASK		(MAX_TX_UART1_BUF_SIZE - 1)
#define MAX_RX_UART1_BUF_SIZE	512
#define MAX_RX_UART1_MASK		(MAX_RX_UART1_BUF_SIZE - 1)
#endif

/* GLOBAL VARIABLES */
#if UART0_ENABLE
extern U16_T uart0_RxCount;
#endif

#if UART1_ENABLE
extern U16_T uart1_RxCount;
#endif


/* EXPORTED SUBPROGRAM SPECIFICATIONS */
void	UART_Init(void);
S8_T	putchar(S8_T);
S8_T	_getkey(void);
S8_T	NOBLK_getkey(void);
BOOL	UART_ParityChk(S8_T checkbyte);
void	UART0_SetMode(U8_T mode);
void	UART1_SetMode(U8_T mode);
BOOL	UART_SetPort(U8_T portNum);
U16_T	UART_GetRxBufCount(void);
void	PMM_Uart0Init(void);


#endif /* End of __UART_H__ */

/* End of uart.h */

⌨️ 快捷键说明

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