Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
http://shukra.cedt.iisc.ernet.in/moodle/mod/assi...
Jump to...
/**
** uart.h file UART functions declarations
**/
#define UART_PARTITY_NONE 0
#define UART_PARTITY_ODD 1
#define UART_PARTITY_EVEN 2
#define UART_PARTITY_MARK 3
#define UART_PARTITY_SPACE 4
/*
* initialize UART based on the port number, baudrate and parity
type
*
* returns 0 if no error and opened properly else error no
indicating error type
* */
int UART_Init(
int iPort, /* UART port number as per chip */
int iBaudRate, /* baudrate not all may be supported */
int iParity_NOEMS); /* parity enable 0- none, 1-odd, 2-even,
3-mark, 4-space */
/*
* UART write - send chars through UART using buffer and count
passed as parameters. If the FIFO is
* full return back with number of bytes that was successfully
added to FIFO (Non blocking)
*
* returns number of bytes actually transferred
* */
int UART_Write(
int iPort, /* port identifier */
int iBytes, /* max number of bytes that should be written */
unsigned char *pcBytes); /* buffer to be used to write into FIFO
*/
/*
1 of 3
http://shukra.cedt.iisc.ernet.in/moodle/mod/assi...
Submission draft
No files submitted yet
Browse No le selected.
Upload this le
2 of 3
http://shukra.cedt.iisc.ernet.in/moodle/mod/assi...
emsys-1
3 of 3