- fixed data types

git-svn-id: http://moon:8086/svn/mips@12 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2015-05-15 14:08:12 +00:00
parent 520e122253
commit 784dd70472
13 changed files with 6651 additions and 6512 deletions
+11 -19
View File
@@ -1,21 +1,13 @@
#ifndef LIBSYS_H
#define LIBSYS_H
#include <stdint.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 IS_ERROR(e) ((e & 0x80000000) == 0x80000000)
#define LSYS_ERR_BASE 0x80000000
#define IS_ERROR(e) ((e & LSYS_ERR_BASE) == LSYS_ERR_BASE)
#ifndef SYS_IO_BASE
#define SYS_IO_BASE 0xA0000000
@@ -62,11 +54,11 @@
#define SYS_FLASH_MEM 0x00000000
// 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);
uint32_t CP0_SR_read(void);
void CP0_SR_write(uint32_t val);
uint32_t CP0_CR_read(void);
void CP0_CR_write(uint32_t val);
uint32_t CP0_PRID_read(void);
// General
char readchar(void);
@@ -75,8 +67,8 @@ int write(int file, char *ptr, int len);
int sputs(char *pStr);
void print_byte(char byte);
void print_word(int word);
void PrintBuffer8(UINT8 *pBuf, int nbpr, int len);
void memdump(UINT8 *pBuf, int print_offset_only, int num_bytes_per_row, int len);
void PrintBuffer8(uint8_t *pBuf, int nbpr, int len);
void memdump(uint8_t *pBuf, int print_offset_only, int num_bytes_per_row, int len);
#endif // LIBSYS_H