低功耗蓝牙cc2541学习笔记之UART-1-协议栈函数功能说明
2017-07-23 11:51
567 查看
协议栈UART实验
打开串口功能
HAL_UART=TRUE
HAL_UART_USB=FALSE
串口操作定义在hal_uart.h 头文件中
/*
* Initialize UART at the startup
* 初始化UART
*/
extern void HalUARTInit ( void );
/*
* Open a port based on the configuration
* 打开串口
*/
extern uint8 HalUARTOpen ( uint8 port, halUARTCfg_t *config );
/*
* Close a port
* 关闭串口
*/
extern void HalUARTClose ( uint8 port );
/*
* Read a buffer from the UART
* 从串口读取数据
*/
extern uint16 HalUARTRead ( uint8 port, uint8 *pBuffer, uint16 length );
/*
* Write a buff to the uart
* 向串口写入数据
*/
extern uint16 HalUARTWrite ( uint8 port, uint8 *pBuffer, uint16 length );
/*
* Write a buffer to the UART
*/
extern uint8 HalUARTIoctl ( uint8 port, uint8 cmd, halUARTIoctl_t *pIoctl );
/*
* This to support polling
*/
extern void HalUARTPoll( void );
/*
* Return the number of bytes in the Rx buffer
*/
extern uint16 Hal_UART_RxBufLen ( uint8 port );
/*
* Return the number of bytes in the Tx buffer
*/
extern uint16 Hal_UART_TxBufLen ( uint8 port );
/*
* This enable/disable flow control
*/
extern void Hal_UART_FlowControlSet ( uint8 port, bool status );
/*
* Initialize hardware for UART
*/
extern uint8 HalUART_HW_Init(uint8 port);
/*
* Abort UART when entering sleep mode
*/
extern void HalUARTSuspend(void);
/*
* Resume UART after wakeup from sleep
* 从睡眠状态恢复uart
*/
extern void HalUARTResume(void);
打开串口功能
HAL_UART=TRUE
HAL_UART_USB=FALSE
串口操作定义在hal_uart.h 头文件中
/*
* Initialize UART at the startup
* 初始化UART
*/
extern void HalUARTInit ( void );
/*
* Open a port based on the configuration
* 打开串口
*/
extern uint8 HalUARTOpen ( uint8 port, halUARTCfg_t *config );
/*
* Close a port
* 关闭串口
*/
extern void HalUARTClose ( uint8 port );
/*
* Read a buffer from the UART
* 从串口读取数据
*/
extern uint16 HalUARTRead ( uint8 port, uint8 *pBuffer, uint16 length );
/*
* Write a buff to the uart
* 向串口写入数据
*/
extern uint16 HalUARTWrite ( uint8 port, uint8 *pBuffer, uint16 length );
/*
* Write a buffer to the UART
*/
extern uint8 HalUARTIoctl ( uint8 port, uint8 cmd, halUARTIoctl_t *pIoctl );
/*
* This to support polling
*/
extern void HalUARTPoll( void );
/*
* Return the number of bytes in the Rx buffer
*/
extern uint16 Hal_UART_RxBufLen ( uint8 port );
/*
* Return the number of bytes in the Tx buffer
*/
extern uint16 Hal_UART_TxBufLen ( uint8 port );
/*
* This enable/disable flow control
*/
extern void Hal_UART_FlowControlSet ( uint8 port, bool status );
/*
* Initialize hardware for UART
*/
extern uint8 HalUART_HW_Init(uint8 port);
/*
* Abort UART when entering sleep mode
*/
extern void HalUARTSuspend(void);
/*
* Resume UART after wakeup from sleep
* 从睡眠状态恢复uart
*/
extern void HalUARTResume(void);
相关文章推荐
- 低功耗蓝牙cc2541学习笔记之UART-4-协议栈uart接受数据实验
- 低功耗蓝牙cc2541学习笔记之UART-3-协议栈uart发送 实验
- 低功耗蓝牙cc2541学习笔记之UART-2-驱动uart
- 低功耗蓝牙cc2541学习笔记之无线通信- 分析SimpleBLEPeripheral_Init()函数
- 低功耗蓝牙cc2541学习笔记之LED-2
- 低功耗蓝牙cc2541学习笔记之LED-1
- 【OpenCV学习笔记】【函数学习】十四(cvSeq的用法说明(功能很多,按照需求使用))
- php学习笔记5--php自创功能函数的封装
- 低功耗蓝牙BLE [学习笔记]
- 【MFC学习笔记3】ASSERT()函数用法,CFileFind Class 说明。
- CC2541蓝牙学习——定时器1的捕获/比较功能
- Python学习笔记之常用函数及说明
- Python学习笔记:split()函数和strip()函数的使用说明
- Xpose模块抓取函数功能学习笔记
- 韩顺平_轻松搞定网页设计(html+css+javascript)_第33讲_Object类_闭包_成员函数再说明_聪明的猪小练习_学习笔记_源代码图解_PPT文档整理
- tinyos学习笔记7--TestLinkLocal例程功能说明
- JXCELL实例学习与研究(六) 之 sheet的分页功能的实现,以及基本EXCEL公式的使用 以及补充函数说明
- java 内存学习笔记 一(内存划分与功能说明)
- 学习笔记之低功耗蓝牙开发
- php中__get()和__set()函数学习笔记和实例说明!