📄 writeuart1.c
字号:
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include "uart.h"
/*********************************************************************
Function Prototype : void WriteUART1(unsigned int data)
Include : uart.h
Description : This function writes data to be transmitted into the
transmit buffer (UxTXREG) register.
Arguments : data - This is the data to be transmitted.
Return Value : None
Remarks : This function writes the data to be transmitted into
the transmit buffer.
If 9-bit transmission is enabled, the 9-bit value is
written into the transmit buffer.
If 8-bit transmission is enabled, then upper byte is
masked and then written into the transmit buffer.
*********************************************************************/
#ifdef _UART_IRDA_V1_1
void WriteUART1(unsigned int data)
{
if(U1MODEbits.PDSEL == 3)
U1TXREG = data;
else
U1TXREG = data & 0xFF;
}
#else
#warning "Does not build on this target"
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -