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

Subversion Repositories openfire2

[/] [openfire2/] [trunk/] [sw/] [lib/] [openfire.h] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 toni32
/* peripherals address and configurations */
2 4 toni32
/* basic i/o */
3 3 toni32
/* openfire soc - 20070327 - a.anton */
4
 
5 4 toni32
#ifndef __OPENFIRE_H
6
#define __OPENFIRE_H
7 3 toni32
 
8 4 toni32
#define SP3SK_GPIO              0x08000000L
9 3 toni32
 
10 4 toni32
#define SP3SK_GPIO_SEGMENTS_N   0x000000FFL
11
#define SP3SK_GPIO_DRIVERS_N    0x00000F00L
12
#define SP3SK_GPIO_PUSHBUTTONS  0x0000F000L
13
#define SP3SK_GPIO_LEDS         0x00FF0000L
14
#define SP3SK_GPIO_SWITCHES     0xFF000000L
15 3 toni32
 
16 4 toni32
#define UARTS_STATUS_REGISTER   0x08000004L
17 3 toni32
 
18 4 toni32
#define UART1_DATA_PRESENT      0x00000001L
19
#define UART1_RX_HALF_FULL      0x00000002L
20
#define UART1_RX_FULL           0x00000004L
21
#define UART1_TX_HALF_FULL      0x00000008L
22
#define UART1_TX_BUFFER_FULL    0x00000010L
23 3 toni32
 
24 4 toni32
#define UART2_DATA_PRESENT      0x00010000L
25
#define UART2_RX_HALF_FULL      0x00020000L
26
#define UART2_RX_FULL           0x00040000L
27
#define UART2_TX_HALF_FULL      0x00080000L
28
#define UART2_TX_FULL           0x00100000L
29 3 toni32
 
30 4 toni32
#define UART1_TXRX_DATA         0x08000008L
31
#define UART2_TXRX_DATA         0x0800000CL
32 3 toni32
 
33 4 toni32
#define PROM_READER             0x08000010L
34
#define PROM_DATA               0x000000FFL
35
#define PROM_REQUEST_SYNC       0x00000100L
36
#define PROM_REQUEST_DATA       0x00000200L
37
#define PROM_SYNCED             0x00000400L
38
#define PROM_DATA_READY         0x00000800L
39 3 toni32
 
40 4 toni32
#define TIMER1_PORT             0x08000014L
41
#define TIMER1_VALUE            0x7FFFFFFFL
42
#define TIMER1_CONTROL          0x80000000L
43
 
44
#define INTERRUPT_ENABLE        0x08000018L
45
#define INTERRUPT_TIMER1        0x00000001L
46
#define INTERRUPT_UART1_RX      0x00000002L
47
#define INTERRUPT_UART2_RX      0x00000004L
48
 
49
unsigned char inbyte(void);
50
int outbyte( unsigned char c);
51
int havebyte(void);
52
 
53
char *gethexstring(char *string, unsigned *value, unsigned maxdigits);
54
void puthexstring(char *string, unsigned number, unsigned size);
55
 
56
void uart1_printchar(unsigned char c);
57
void uart1_printline(char *txt);
58
char uart1_readchar(void);
59
void uart1_readline(char *buffer);
60
 
61
int *__errno(void);
62
 
63
#endif

powered by: WebSVN 2.1.0

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