Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / colonet / testing / wl_network_colonet / serial.h @ 13

History | View | Annotate | Download (1020 Bytes)

1
/*
2
        serial.h - Contains definitions and function prototypes for the RS232 serial port
3
*/
4

    
5
#ifndef _SERIAL_H
6
#define _SERIAL_H
7

    
8
// Tested baud rates
9
#define BAUD9600    103
10
#define BAUD115200  8  //Warning--3.5% error
11

    
12
// Untested baud rates that might be right --aaron
13
#define BAUD1M             0
14
#define BAUD500K     1
15
#define BAUD250K     3
16
#define BAUD230400   3   //Warning--8.5% error
17
#define BAUD76800    12
18
#define BAUD57600    16  //Warning--2.1% error
19
#define BAUD38400    25
20
#define BAUD28800    34
21
#define BAUD19200    51
22
#define BAUD14400    68
23
#define BAUD4800     207
24
#define BAUD2400     416  //Might not work, since it needs some high bits set
25

    
26
// Function descriptions are available in serial.c
27

    
28
//serial (serial0) is the main serial (DB9 connection)
29
void serial_init( unsigned int ubrr);
30
int serial_putchar(char c);
31
int serial_getchar(void);
32
int serial_getchar_nb(void);
33

    
34

    
35
void serial1_init( unsigned int ubrr);
36
int serial1_putchar(char c);
37
int serial1_getchar(void);
38
int serial1_getchar_nb(void);
39

    
40

    
41

    
42
#endif