Files
vhdl/lib/CPUs/MIPS/bsp/examples/bootloader/libsys_boot.h
T
jens 8867efa451 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@272 cc03376c-175c-47c8-b038-4cd826a8556b
2009-01-21 08:52:05 +00:00

51 lines
1.2 KiB
C

#ifndef LIBSYS_H
#define LIBSYS_H
// ---------------------------------------------------------
// Types
// ---------------------------------------------------------
#define INT8 char
#define INT16 short
#define INT32 long
#define UINT8 unsigned char
#define UINT16 unsigned short
#define UINT32 unsigned long
#define INT int
#define UINT unsigned int
#define FLOAT32 float
#define FLOAT64 double
#define sys_gpio0 0xA0000000
#define sys_gpio1 0xA0000004
#define sys_led_port sys_gpio0
#define sys_usb_ctrl sys_gpio1
#define sys_timer_usec 0xA0000008
#define sys_timer_sec 0xA000000C
#define sys_uart_data 0xA0010000
#define sys_uart_stat 0xA0010004
#define sys_uart_baud 0xA0010008
#define sys_usb_data 0xA0020000
#define sys_usb_mbx 0xA0020004
#define sys_usb_addr 0xA0020008
#define sys_usb_status 0xA002000C
#define sys_flash_io 0xA4000000
// MIPS specific
UINT32 CP0_SR_read(void);
void CP0_SR_write(UINT32 val);
UINT32 CP0_CR_read(void);
void CP0_CR_write(UINT32 val);
UINT32 CP0_PRID_read(void);
// General
char readchar(void);
void writechar(char c);
int write(int file, char *ptr, int len);
int sputs(char *pStr);
void print_byte(char byte);
void print_word(int word);
#endif // LIBSYS_H