?? serial_config.h
字號:
#include "uart.h"
////////////////////////////////////////////
/// UART selection ///
////////////////////////////////////////////
#define Uart_Parity Uart_Not_Parity // can slect other:
// Uart_Zero_Parity
// Uart_Odd_Parity
// Uart_Even_Parity
#define Uart_Data_Bit Uart_Data_Bit_8 // can select 7bit
#define Uart_Stop_Bit Uart_Stop_Bit_2 // can select 1bit
#define Uart6_Reception_Error_Interrupt Uart6_Reception_Error_Interrupt_is_INTSRE6 // can select INTSR6
#define Uart6_First Uart6_First_LSB // can select MSB
#define Uart6_TxD6_Output_Level Uart6_TxD6_Output_Normal // can select Interval
#define Uart0_BaseClk Uart0_BaseClk_2 // can select:
//Uart0_BaseClk_1//fxclk0 = TM50 output
//Uart0_BaseClk_2// fxclk0 = fprs/2
//Uart0_BaseClk_3// fxclk0 = fprs/8
//Uart0_BaseClk_4// fxclk0 = fprs/32
#define Uart0_CounterClk 8 // = fxclk0/8, can select from 8 to 31
// Format of Clock Selection Register 6 (CKSR6). only for UART6. Pls refer to page358 in manual
#define Uart6_BaseClk_1 0 // fxclk6 = fprs/(2^n), can select n from 0 to 10
#define Uart6_BaseClk_2 11 // fxclk6 = TM50 output
#define Uart6_BaseClk Uart6_BaseClk_1 // can select Uart6_BaseClk_2
//Format of Baud Rate Generator Control Register 6 (BRGC6). only for UART6. Pls refer to page359 in manual
#define Uart6_CounterClk 8 // = fxclk0/8, can select from 8 to 255
#define Uart0_Transmit_Operation() Uart0_Transmit_Enable() // can select Disable
#define Uart0_Receive_Operation() Uart0_Receive_Enable() // can select Disable
#define Uart6_Transmit_Operation() Uart6_Transmit_Enable() // can select Disable
#define Uart6_Receive_Operation() Uart6_Receive_Enable() // can select Disable
#define Uart0_ReceiveSize 0x01
#define Uart0_SendSize 0x01
#define Uart6_ReceiveSize 0x01
#define Uart6_SendSize 0x01
unsigned char Uart0_SendDataBuf[Uart0_SendSize]={0x55};
unsigned char Uart0_ReceiveDataBuf[Uart0_ReceiveSize]={0x55};
unsigned char Uart6_SendDataBuf[Uart6_SendSize]={0x55};
unsigned char Uart6_ReceiveDataBuf[Uart6_ReceiveSize]={0x55};
unsigned char *Uart0_SendBuf = Uart0_SendDataBuf;
unsigned char *Uart0_ReceiveBuf = Uart0_ReceiveDataBuf;
unsigned char *Uart6_SendBuf = Uart6_SendDataBuf;
unsigned char *Uart6_ReceiveBuf = Uart6_ReceiveDataBuf;
unsigned char Uart0_ReceiveCount = Uart0_ReceiveSize;
unsigned char Uart0_SendCount = Uart0_SendSize;
unsigned char Uart6_ReceiveCount = Uart6_ReceiveSize;
unsigned char Uart6_SendCount = Uart6_SendSize;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -