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

Subversion Repositories scarm

[/] [scarm/] [trunk/] [src/] [SoC/] [UART/] [scUART.h] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 zhong
// scUART.h: interface for the scUART class.
2
//
3
//////////////////////////////////////////////////////////////////////
4
 
5
#if !defined(AFX_SCUART_H__14577C18_3BE8_11D6_B9E3_000000000000__INCLUDED_)
6
#define AFX_SCUART_H__14577C18_3BE8_11D6_B9E3_000000000000__INCLUDED_
7
 
8
#if _MSC_VER > 1000
9
#pragma once
10
#endif // _MSC_VER > 1000
11
#define UARTCTRL_NUMREGS 8
12
 
13
#define R_UARTTXDATA     0x0
14
#define R_UARTRXDATA     0x1
15
#define R_UARTCONTROL    0x2
16
#define R_UARTSTATUS     0x3
17
#define R_UARTRESERVED1  0x4
18
#define R_UARTRESERVED2  0x5
19
#define R_UARTRESERVED3  0x6
20
#define R_UARTRESERVED4  0x7
21
 
22
#define UARTSTATUS_IN_DATA 0x1
23
#define UARTSTATUS_OUT_FREE 0x2
24
#include"scTypes.h"
25
class scUART
26
{
27
typedef struct UARTCTRLBTAG
28
{
29
  uint32_t addr: 32;      // IN - address, 0 to 7
30
  uint32_t data: 32;      // IN/OUT - 32 bits of data
31
  uint32_t interrupt: 1;  // OUT - has an interrupt happened?
32
  uint32_t r:1;           // IN - is a read happening?
33
  uint32_t w:1;           // IN - is a write happening?
34
};
35
public:
36
        scUART();
37
        virtual ~scUART();
38
 
39
};
40
 
41
#endif // !defined(AFX_SCUART_H__14577C18_3BE8_11D6_B9E3_000000000000__INCLUDED_)

powered by: WebSVN 2.1.0

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