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

Subversion Repositories openfire2

[/] [openfire2/] [trunk/] [sw/] [lib/] [openfire.h] - Diff between revs 3 and 4

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 3 Rev 4
Line 1... Line 1...
/* peripherals address and configurations */
/* peripherals address and configurations */
 
/* basic i/o */
/* openfire soc - 20070327 - a.anton */
/* openfire soc - 20070327 - a.anton */
 
 
#define SP3SK_GPIO              0x08000000
#ifndef __OPENFIRE_H
 
#define __OPENFIRE_H
 
 
#define SP3SK_GPIO_SEGMENTS_N   0x000000FF
#define SP3SK_GPIO              0x08000000L
#define SP3SK_GPIO_DRIVERS_N    0x00000F00
 
#define SP3SK_GPIO_PUSHBUTTONS  0x0000F000
#define SP3SK_GPIO_SEGMENTS_N   0x000000FFL
#define SP3SK_GPIO_LEDS         0x00FF0000
#define SP3SK_GPIO_DRIVERS_N    0x00000F00L
#define SP3SK_GPIO_SWITCHES     0xFF000000
#define SP3SK_GPIO_PUSHBUTTONS  0x0000F000L
 
#define SP3SK_GPIO_LEDS         0x00FF0000L
#define UARTS_STATUS_REGISTER   0x08000004
#define SP3SK_GPIO_SWITCHES     0xFF000000L
 
 
#define UART1_DATA_PRESENT      0x00000001
#define UARTS_STATUS_REGISTER   0x08000004L
#define UART1_RX_HALF_FULL      0x00000002
 
#define UART1_RX_FULL           0x00000004
#define UART1_DATA_PRESENT      0x00000001L
#define UART1_TX_HALF_FULL      0x00000008
#define UART1_RX_HALF_FULL      0x00000002L
#define UART1_TX_BUFFER_FULL    0x00000010
#define UART1_RX_FULL           0x00000004L
 
#define UART1_TX_HALF_FULL      0x00000008L
#define UART2_DATA_PRESENT      0x00010000
#define UART1_TX_BUFFER_FULL    0x00000010L
#define UART2_RX_HALF_FULL      0x00020000
 
#define UART2_RX_FULL           0x00040000
#define UART2_DATA_PRESENT      0x00010000L
#define UART2_TX_HALF_FULL      0x00080000
#define UART2_RX_HALF_FULL      0x00020000L
#define UART2_TX_FULL           0x00100000
#define UART2_RX_FULL           0x00040000L
 
#define UART2_TX_HALF_FULL      0x00080000L
#define UART1_TXRX_DATA         0x08000008
#define UART2_TX_FULL           0x00100000L
#define UART2_TXRX_DATA         0x0800000C
 
 
#define UART1_TXRX_DATA         0x08000008L
#define PROM_READER             0x08000010
#define UART2_TXRX_DATA         0x0800000CL
#define PROM_DATA               0x000000FF
 
#define PROM_REQUEST_SYNC       0x00000100
#define PROM_READER             0x08000010L
#define PROM_REQUEST_DATA       0x00000200
#define PROM_DATA               0x000000FFL
#define PROM_SYNCED             0x00000400
#define PROM_REQUEST_SYNC       0x00000100L
#define PROM_DATA_READY         0x00000800
#define PROM_REQUEST_DATA       0x00000200L
 
#define PROM_SYNCED             0x00000400L
#define TIMER1_PORT             0x08000014
#define PROM_DATA_READY         0x00000800L
#define TIMER1_VALUE            0x7FFFFFFF
 
#define TIMER1_CONTROL          0x80000000
#define TIMER1_PORT             0x08000014L
 
#define TIMER1_VALUE            0x7FFFFFFFL
#define INTERRUPT_ENABLE        0x08000018
#define TIMER1_CONTROL          0x80000000L
#define INTERRUPT_TIMER1        0x00000001
 
#define INTERRUPT_UART1_RX      0x00000002
#define INTERRUPT_ENABLE        0x08000018L
#define INTERRUPT_UART2_RX      0x00000004
#define INTERRUPT_TIMER1        0x00000001L
 
#define INTERRUPT_UART1_RX      0x00000002L
 
#define INTERRUPT_UART2_RX      0x00000004L
 
 
 
unsigned char inbyte(void);
 
int outbyte( unsigned char c);
 
int havebyte(void);
 
 
 
char *gethexstring(char *string, unsigned *value, unsigned maxdigits);
 
void puthexstring(char *string, unsigned number, unsigned size);
 
 
 
void uart1_printchar(unsigned char c);
 
void uart1_printline(char *txt);
 
char uart1_readchar(void);
 
void uart1_readline(char *buffer);
 
 
 
int *__errno(void);
 
 
 
#endif
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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