ser_simple_avr.c File Reference

Simple serial I/O driver. More...

#include "ser_simple_avr.h"
#include <cfg/compiler.h>
#include <appconfig.h>
#include <cfg/macros.h>
#include "hw_cpu.h"
#include <avr/io.h>

Go to the source code of this file.


Functions

int _ser_putchar (int c)
 Send a character over the serial line.
int _ser_getchar (void)
 Get a character from the serial line.
int _ser_getchar_nowait (void)
 Get a character from the receiver buffer If the buffer is empty, ser_getchar_nowait() returns immediatly EOF.
void _ser_setbaudrate (unsigned long rate)
 Set the baudrate.
int _ser_print (const char *s)
 Send a string.
void _ser_purge (void)
 Dummy functions.
struct Serial_ser_open (void)
 Initialize serial.
void _ser_close (void)
 Clean up serial port, disabling the associated hardware.

Detailed Description

Simple serial I/O driver.

Version:
Id
ser_simple_avr.c 1227 2008-04-09 15:09:42Z batt
Author:
Francesco Sacchi <batt@develer.com>

Definition in file ser_simple_avr.c.


Function Documentation

int _ser_getchar ( void   ) 

Get a character from the serial line.

If ther is no character in the buffer this function wait until one is received (no timeout).

Returns:
the character received.

Definition at line 109 of file ser_simple_avr.c.

int _ser_putchar ( int  c  ) 

Send a character over the serial line.

Returns:
the character sent.

Definition at line 82 of file ser_simple_avr.c.