📄 closeuart4.c
字号:
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include "uart.h"
/* UART4 is defined in following devices */
/*********************************************************************
Function Prototype : void CloseUART4(void)
Include : uart.h
Description : This function disables the UART and clears the
interrupt enable and flag bits.
Arguments : None
Return Value : None
Remarks : This function first turns off the UART module and
then disables the UART transmit and receive interrupts.
The Interrupt Flag bits are also cleared.
*********************************************************************/
#ifdef _UART_IRDA_V1_4
void CloseUART4(void)
{
U4MODEbits.UARTEN = 0;
IEC5bits.U4RXIE = 0;
IEC5bits.U4TXIE = 0;
IFS5bits.U4RXIF = 0;
IFS5bits.U4TXIF = 0;
}
#else
#warning "Does not build on this target"
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -