UART API UART ROM driver variables


typdef  struct UART_CONFIG {-->
	uint32_t sys_clk_in_hz; // Sytem clock in hz.-->
	uint32_t baudrate_in_hz; // Baudrate in hz-->
	uint8_t  config; //bit 1:0-->
			// 00: 7 bits length, 01: 8 bits lenght, others: reserved-->
			//   00: No Parity, 01: reserved, 10: Even, 11: Odd-->
			//bit4			//   0: 1 Stop bit, 1: 2 Stop bits  	uint8_t sync_mod; //bit0: 0(Async mode), 1(Sync mode)				//bit1: 0(Un_RXD is sampledon the falling edge of SCLK)				//        1(Un_RXD is sampled onthe rising edge of SCLK)				//bit2: 0(Start and stop bits are transmittedas in asynchronous 					mode)				//        1(Start and stop bitsare not transmitted)				//bit3: 0(the UART is a slave on Sync mode)				//       1(the UART is a master on Sync mode)	uint16_t error_en; //Bit0:OverrunEn, bit1: UnderrunEn, bit2: FrameErrEn,  			 // bit3: ParityErrEn,bit4: RxNoiseEn}-->


The handle to the instance of the UART driver. Each UART has one handle, so there can be several handles for up to three UART blocks. This handle is created by Init API and used by the transfer functions for the corresponding UART block.

typedef  void     *UART_HANDLE_T   ;    // defineTYPE for uart handle pointer-->


typedef struct  uart_A {		 // parms passed touart driver function-->
	uint8_t  *  buffer ; // The pointer of buffer. -->
				// For uart_get_line function, buffer for receiving data. -->
				// For uart_put_line function, buffer for transmittingdata.	uint32_t   size;     // [IN] The size of buffer.				//[OUT]The number of bytes transmitted/received.	uint16_t    transfer_mode;				// 0x00:  For uart_get_line function, transfer without 			-->
 				// termination.-->
				// For uart_put_line function, transfer without termination.-->
 				// 0x01:  For uart_get_line function, stop transfer when -->
				// <CR><LF> are received.-->
				// For uart_put_line function, transfer is stopped after-->
				// reaching \0. <CR><LF> characters are sent outafter that. -->
				// 0x02:  For uart_get_line function, stop transfer when<LF> -->
				// is received.-->
				// For uart_put_line function, transfer is stopped after-->
				// reaching \0. A <LF> character is sent out afterthat.-->
				//0x03:  For uart_get_line function, RESERVED.-->
				// For uart_put_line function, transfer is stopped after -->
				// reaching \0.-->
	uint16_t   driver_mode;				//0x00: Polling mode, functionis blocked until transfer is-->
				// finished.				// 0x01: Intr mode, function exit immediately,callback function-->
				// is invoked when transfer is finished.				//0x02: RESERVED-->
	UART_CALLBK_T     callback_func_pt; 	// callback function} UART_PARAM_T  ;-->