Serial Support Functions (not for user code)

Functions

int uart_send_general_buffered (char c, FILE *fp)
int uart_recv_general_buffered (FILE *fp)
void serial_receive_isr (struct OU_FILE_BUF *ou_fp)
void serial_transmit_isr (struct OU_FILE_BUF *ou_fp)

Function Documentation

void serial_receive_isr ( struct OU_FILE_BUF ou_fp  ) 

Interrupt service routine body for receiving a byte on a serial port. This function should never be called by user code.

Bytes not fitting in the buffer are dropped on the floor

Parameters:
ou_fp A valid OU File structure for the input port
Author:
Andrew H. Fagg

References OU_FILE_BUF::buf_in_back, OU_FILE_BUF::buf_in_front, OU_FILE_BUF::buf_size_in, OU_FILE_BUF::buffer, and OU_FILE_BUF::port.

void serial_transmit_isr ( struct OU_FILE_BUF ou_fp  ) 

Interrupt service routine body for sending a byte to a serial port. This function should never be called by user code.

Parameters:
ou_fp A valid OU File structure for the output port
Author:
Andrew H. Fagg

References OU_FILE_BUF::buf_out_back, OU_FILE_BUF::buf_out_front, OU_FILE_BUF::buf_size_in, OU_FILE_BUF::buf_size_out, OU_FILE_BUF::buffer, OU_FILE_BUF::port, serial0_transmit_disable(), serial1_transmit_disable(), serial2_transmit_disable(), and serial3_transmit_disable().

int uart_recv_general_buffered ( FILE *  fp  ) 

LibC interface function for receiving a character from the input buffer. This function should never be called by user code.

Parameters:
fp A valid file pointer for the desired output port
Returns:
The next character in the buffer.
Author:
Andrew H. Fagg

References OU_FILE_BUF::buf_in_back, OU_FILE_BUF::buf_in_front, OU_FILE_BUF::buf_size_in, and OU_FILE_BUF::buffer.

Referenced by serial_init_buffered().

int uart_send_general_buffered ( char  c,
FILE *  fp 
)

LibC interface function for sending a character to the output buffer. This function should never be called by user code.

Parameters:
c Character to send
fp A valid file pointer for the desired output port
Returns:
0 if no errors
Author:
Andrew H. Fagg

References OU_FILE_BUF::buf_out_back, OU_FILE_BUF::buf_out_front, OU_FILE_BUF::buf_size_in, OU_FILE_BUF::buf_size_out, OU_FILE_BUF::buffer, OU_FILE_BUF::port, serial0_transmit_enable(), serial1_transmit_enable(), serial2_transmit_enable(), and serial3_transmit_enable().

Referenced by serial_init_buffered().

Generated on Tue Feb 14 00:23:58 2012 for OU Atmel Utilities Library by  doxygen 1.6.3