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

📄 uart.h

📁 周立功PXA270教学实验箱的ARM汇编指令实验2
💻 H
字号:
/****************************************Copyright (c)**************************************************
**                               Guangzhou ZHIYUAN electronics Co.,LTD.
**                                     
**                                 http://www.zyinside.com
**
**--------------File Info-------------------------------------------------------------------------------
** File Name: UART.h
** Last modified Date: 2006-8-10
** Last Version: v1.0
** Description: PXA27x的串口软件包 (头文件)
**
**------------------------------------------------------------------------------------------------------
** Created By: 黄绍斌
** Created date: 2006-8-10
** Version: v1.0
** Descriptions:
**
**------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Descriptions:
**
*******************************************************************************************************/
#ifndef  __UART_H
#define  __UART_H


#ifndef  IN_UART  

/********************************************************************************************************
** Function name: UART_Init
** Descriptions: 初始化串口。设置为8位数据位,1位停止位,无奇偶校验,波特率为UART_BPS
** Input: 无
** Output: 无
********************************************************************************************************/
extern void  UART_Init(uint32 bps);



/********************************************************************************************************
** Function name: UART_SendByte
** Descriptions: 向串口发送字节数据,并等待发送完毕。
** Input: data      要发送的数据
** Output: 无
********************************************************************************************************/
extern void  UART_SendByte(uint8 data);



/********************************************************************************************************
** Function name: UART_SendStr
** Descriptions: 向串口发送一字符串。
**               对于'\n'字符,发送时会加入'\r'字符。
** Input: str		要发送的字符串的指针
** Output: 无
********************************************************************************************************/
extern void  UART_SendStr(char const *str);



/********************************************************************************************************
** Function name: UART_GetKey
** Descriptions: 从UART口读取一字节按键数据。
**               会一直等待,直到接收到1字节数据。
** Input: 无
** Output: 返回值即是读出值
********************************************************************************************************/
extern int  UART_GetKey(void);



#endif      // IN_UART    

#endif      // __UART_H
/*********************************************************************************************************
**                            End Of File
********************************************************************************************************/

⌨️ 快捷键说明

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