30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Description: This function turns off the UART module<br />

Include: uart.h<br />

Prototype: void CloseUART1(void);<br />

void CloseUART2(void);<br />

Arguments: None<br />

Return Value: None<br />

Remarks: This function first turns off the UART module and then disables the<br />

UART transmit and receive interrupts.The Interrupt Flag bits are also<br />

cleared.<br />

Source File: CloseUART1.c<br />

CloseUART2.c<br />

Code Example: CloseUART1();<br />

dsPIC<br />

®<br />

Language Tools Libraries<br />

DS51456B-page 142 2004 Microchip Technology Inc.<br />

ConfigIntUART1<br />

ConfigIntUART2<br />

Description: This function configures the UART Interrupts.<br />

Include: uart.h<br />

Prototype: void ConfigIntUART1(unsigned int config);<br />

void ConfigIntUART2(unsigned int config);<br />

Arguments: config Individual interrupt enable/disable information as defined<br />

below:<br />

Receive Interrupt enable<br />

UART_RX_INT_EN<br />

UART_RX_INT_DIS<br />

Receive Interrupt Priority<br />

UART_RX_INT_PR0<br />

UART_RX_INT_PR1<br />

UART_RX_INT_PR2<br />

UART_RX_INT_PR3<br />

UART_RX_INT_PR4<br />

UART_RX_INT_PR5<br />

UART_RX_INT_PR6<br />

UART_RX_INT_PR7<br />

Transmit Interrupt enable<br />

UART_TX_INT_EN<br />

UART_TX_INT_DIS<br />

Giao tiếp UART với chân ALT chỉ có sẵn cho<br />

thiết bị nhất định và các bảng dữ liệu phù hợp nên<br />

gọi.<br />

UART Dịch vụ báo thức vào Start<br />

UART_EN_WAKE<br />

UART_DIS_WAKE<br />

Chế độ UART lặp bật / tắt<br />

UART_EN_LOOPBACK<br />

UART_DIS_LOOPBACK<br />

Đầu vào để Capture mô-đun<br />

UART_EN_ABAUD<br />

UART_DIS_ABAUD<br />

dsPIC<br />

®<br />

Thư viện Công cụ Ngôn ngữ<br />

DS51456B trang 144 2004 Microchip Technology Inc<br />

Chẵn lẻ và bit dữ liệu chọn<br />

UART_NO_PAR_9BIT<br />

UART_ODD_PAR_8BIT<br />

UART_EVEN_PAR_8BIT<br />

UART_NO_PAR_8BIT<br />

Số Dừng bit<br />

UART_2STOPBITS<br />

UART_1STOPBIT<br />

config2 này chứa các thông số phải được cấu hình trong<br />

UxSTA đăng ký theo quy định dưới đây:<br />

Chế độ UART truyền gián đoạn chọn<br />

UART_INT_TX_BUF_EMPTY<br />

UART_INT_TX<br />

UART Transmit lao bit<br />

UART_TX_PIN_NORMAL<br />

UART_TX_PIN_LOW<br />

UART truyền cho phép / vô hiệu hóa<br />

UART_TX_ENABLE<br />

UART_TX_DISABLE<br />

UART nhận chế độ ngắt chọn<br />

UART_INT_RX_BUF_FUL<br />

UART_INT_RX_3_4_FUL<br />

UART_INT_RX_CHAR

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!