OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [sim/] [serial.h] - Blame information for rev 246

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 hellwig
/*
2 246 hellwig
 * serial.h -- serial line simulation
3 8 hellwig
 */
4
 
5
 
6 246 hellwig
#ifndef _SERIAL_H_
7
#define _SERIAL_H_
8 8 hellwig
 
9
 
10 246 hellwig
#define SERIAL_RCVR_CTRL        0        /* receiver control register */
11
#define SERIAL_RCVR_DATA        4       /* receiver data register */
12
#define SERIAL_XMTR_CTRL        8       /* transmitter control register */
13
#define SERIAL_XMTR_DATA        12      /* transmitter data register */
14 8 hellwig
 
15 246 hellwig
#define SERIAL_RCVR_RDY         0x01    /* receiver has a character */
16
#define SERIAL_RCVR_IEN         0x02    /* enable receiver interrupt */
17
#define SERIAL_RCVR_USEC        2000    /* input checking interval */
18 8 hellwig
 
19 246 hellwig
#define SERIAL_XMTR_RDY         0x01    /* transmitter accepts a character */
20
#define SERIAL_XMTR_IEN         0x02    /* enable transmitter interrupt */
21
#define SERIAL_XMTR_USEC        1042    /* output speed */
22 8 hellwig
 
23
 
24 246 hellwig
Word serialRead(Word addr);
25
void serialWrite(Word addr, Word data);
26 8 hellwig
 
27 246 hellwig
void serialReset(void);
28
void serialInit(int numSerials, Bool connectTerminals[]);
29
void serialExit(void);
30 8 hellwig
 
31
 
32 246 hellwig
#endif /* _SERIAL_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.