- 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
+15 -15
View File
@@ -8,9 +8,9 @@
// ---------------------------------------------------------------------------------
// MIPS specific
UINT32 CP0_SR_read(void)
uint32_t CP0_SR_read(void)
{
UINT32 result;
uint32_t result;
__asm
(
@@ -21,7 +21,7 @@ UINT32 CP0_SR_read(void)
return result;
}
void CP0_SR_write(UINT32 val)
void CP0_SR_write(uint32_t val)
{
__asm
(
@@ -31,9 +31,9 @@ void CP0_SR_write(UINT32 val)
);
}
UINT32 CP0_CR_read(void)
uint32_t CP0_CR_read(void)
{
UINT32 result;
uint32_t result;
__asm
(
@@ -44,7 +44,7 @@ UINT32 CP0_CR_read(void)
return result;
}
void CP0_CR_write(UINT32 val)
void CP0_CR_write(uint32_t val)
{
__asm
(
@@ -54,9 +54,9 @@ void CP0_CR_write(UINT32 val)
);
}
UINT32 CP0_PRID_read(void)
uint32_t CP0_PRID_read(void)
{
UINT32 result;
uint32_t result;
__asm
(
@@ -70,8 +70,8 @@ UINT32 CP0_PRID_read(void)
// ---------------------------------------------------------------------------------
char readchar(void)
{
volatile UINT32 *pUART_stat = (UINT32*)SYS_UART_STAT;
volatile UINT32 *pUART_data = (UINT32*)SYS_UART_DATA;
volatile uint32_t *pUART_stat = (uint32_t*)SYS_UART_STAT;
volatile uint32_t *pUART_data = (uint32_t*)SYS_UART_DATA;
while(!(0x10 & *pUART_stat));
@@ -80,12 +80,12 @@ char readchar(void)
void writechar(char c)
{
volatile UINT32 *pUART_stat = (UINT32*)SYS_UART_STAT;
volatile UINT32 *pUART_data = (UINT32*)SYS_UART_DATA;
volatile uint32_t *pUART_stat = (uint32_t*)SYS_UART_STAT;
volatile uint32_t *pUART_data = (uint32_t*)SYS_UART_DATA;
while((0x02 & *pUART_stat) != 0);
*pUART_data = (UINT32)c;
*pUART_data = (uint32_t)c;
}
void _putchar(char c)
@@ -151,12 +151,12 @@ void print_word(int word)
// _Return: none
//
// ---------------------------------------------------------------------------
void PrintBuffer8(UINT8 *pBuf, int nbpr, int len)
void PrintBuffer8(uint8_t *pBuf, int nbpr, int len)
{
memdump(pBuf, 1, nbpr, len);
}
void memdump(UINT8 *pBuf, int print_offset_only, int num_bytes_per_row, int len)
void memdump(uint8_t *pBuf, int print_offset_only, int num_bytes_per_row, int len)
{
int i, j, cnt_hex, cnt_asc, base;
unsigned char c;