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

📄 writeuart3.c

📁 Mplab C30编译器
💻 C
字号:
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include "uart.h"


/* UART3 is defined in following devices */
#ifdef _UART_IRDA_V1_3

/*********************************************************************
Function Prototype : void WriteUART3(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.
*********************************************************************/
void WriteUART3(unsigned int data)
{
    if(U3MODEbits.PDSEL == 3)
        U3TXREG = data;
    else
        U3TXREG = data & 0xFF;
}

#else
#warning "Does not build on this target"
#endif

⌨️ 快捷键说明

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