C:/usr/src/avr/plotter/usrat.c File Reference

#include <stdio.h>
#include <avr/io.h>
#include "usrat.h"

Go to the source code of this file.

Functions

void usart_init (uint16_t baudval)
 Initialize USART, perform fdevopen with uart_putchar.
int uart_putchar (char data)
 putchar() for USART.
int uart_getchar ()
 getchar() for USART. Wait for data if not available.
uint8_t uart_available ()
 Check data availability in USART buffer.
uint8_t uart_getc ()
 Nonblocking, nonchecking getchar for USART. Use with care.
void SIG_USART_RECV (void)


Function Documentation

void SIG_USART_RECV ( void   ) 

Definition at line 74 of file usrat.c.

uint8_t uart_available ( void   ) 

Check data availability in USART buffer.

Returns:
1 if buffer is not empty.

Definition at line 61 of file usrat.c.

uint8_t uart_getc (  ) 

Nonblocking, nonchecking getchar for USART. Use with care.

Definition at line 66 of file usrat.c.

int uart_getchar (  ) 

getchar() for USART. Wait for data if not available.

Returns:
value read.
See also:
uart_available()

Definition at line 53 of file usrat.c.

int uart_putchar ( char  data  ) 

putchar() for USART.

Parameters:
data character to print.

Definition at line 37 of file usrat.c.

void usart_init ( uint16_t  baudval  ) 

Initialize USART, perform fdevopen with uart_putchar.

Parameters:
baudval (F_CPU/(16*baudrate))-1
See also:
uart_putchar()

Definition at line 13 of file usrat.c.


Generated on Sat Jul 4 05:27:39 2009 for motori by  doxygen 1.5.9