- use build in data types

git-svn-id: http://moon:8086/svn/mips@35 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2015-05-28 19:19:01 +00:00
parent 3263f9d79c
commit a655e1c5d9
54 changed files with 1551 additions and 1583 deletions
+27 -27
View File
@@ -14,13 +14,13 @@
char buffer[16384];
char * volatile pPtr_r;
char * volatile pPtr_w;
static volatile INT32 mouse_x;
static volatile INT32 mouse_y;
static volatile int32_t mouse_x;
static volatile int32_t mouse_y;
static box_t box;
static gfx_t gfx;
static volatile int _g_posx, _g_posy;
static volatile g_btn_l, g_btn_r;
static volatile UINT32 g_color;
static volatile uint32_t g_color;
// -------------------------------------------------------------
void handler0(void)
@@ -42,10 +42,10 @@ void handler2(void)
void handler3(void)
{
volatile UINT32 *pUART0_stat = (UINT32*)SYS_UART0_STAT;
volatile UINT32 *pUART0_data = (UINT32*)SYS_UART0_DATA;
volatile UINT32 *pUART1_stat = (UINT32*)SYS_UART1_STAT;
volatile UINT32 *pUART1_data = (UINT32*)SYS_UART1_DATA;
volatile uint32_t *pUART0_stat = (uint32_t*)SYS_UART0_STAT;
volatile uint32_t *pUART0_data = (uint32_t*)SYS_UART0_DATA;
volatile uint32_t *pUART1_stat = (uint32_t*)SYS_UART1_STAT;
volatile uint32_t *pUART1_data = (uint32_t*)SYS_UART1_DATA;
while(0x200 & *pUART0_stat)
{
@@ -72,7 +72,7 @@ void handler4(void)
void handler5(void)
{
UINT32 volatile *pVGA_ctrl = (UINT32*)SYS_VGA_CTRL;
uint32_t volatile *pVGA_ctrl = (uint32_t*)SYS_VGA_CTRL;
// Ack
*pVGA_ctrl |= SYS_VGA_BIT_BUFCHG_FLAG;
@@ -83,10 +83,10 @@ void handler6(void)
{
int p, i;
ps2_if_t *pIF;
UINT8 mouse_rsp[3];
UINT32 timeout_count, key;
uint8_t mouse_rsp[3];
uint32_t timeout_count, key;
INT32 dx, dy;
int32_t dx, dy;
for (p=0; p < PS2_get_num_if(); p++)
{
@@ -123,7 +123,7 @@ void handler6(void)
{
break;
}
mouse_rsp[i] = (UINT8)*pIF->pDATA;
mouse_rsp[i] = (uint8_t)*pIF->pDATA;
}
if (!timeout_count)
{
@@ -148,7 +148,7 @@ void handler6(void)
{
if (g_btn_r == 0)
{
g_color = (UINT32)rand();
g_color = (uint32_t)rand();
}
g_btn_r = 1;
}
@@ -183,17 +183,17 @@ int main(void)
{
int i;
volatile UINT32 *pUART0_stat = (UINT32*)SYS_UART0_STAT;
volatile UINT32 *pUART1_stat = (UINT32*)SYS_UART1_STAT;
volatile UINT32 *pUART0_baud = (UINT32*)SYS_UART0_BAUD;
volatile UINT32 *pUART1_baud = (UINT32*)SYS_UART1_BAUD;
UINT32 volatile *pVGA_ctrl = (UINT32*)SYS_VGA_CTRL;
UINT32 volatile *pVGA_moffs_0 = (UINT32*)SYS_VGA_FB_FRONT;
UINT32 volatile *pVGA_moffs_1 = (UINT32*)SYS_VGA_FB_BACK;
UINT32 volatile *pVGA_cgcol = (UINT32*)SYS_VGA_CGCOL;
UINT32 volatile *pFlashPicture = (UINT32*)(SYS_FLASH_MEM + 0x00600000);
UINT32 framecount;
UINT32 start, end;
volatile uint32_t *pUART0_stat = (uint32_t*)SYS_UART0_STAT;
volatile uint32_t *pUART1_stat = (uint32_t*)SYS_UART1_STAT;
volatile uint32_t *pUART0_baud = (uint32_t*)SYS_UART0_BAUD;
volatile uint32_t *pUART1_baud = (uint32_t*)SYS_UART1_BAUD;
uint32_t volatile *pVGA_ctrl = (uint32_t*)SYS_VGA_CTRL;
uint32_t volatile *pVGA_moffs_0 = (uint32_t*)SYS_VGA_FB_FRONT;
uint32_t volatile *pVGA_moffs_1 = (uint32_t*)SYS_VGA_FB_BACK;
uint32_t volatile *pVGA_cgcol = (uint32_t*)SYS_VGA_CGCOL;
uint32_t volatile *pFlashPicture = (uint32_t*)(SYS_FLASH_MEM + 0x00600000);
uint32_t framecount;
uint32_t start, end;
char string[65];
interrupt_register(0, (void*)handler0);
@@ -300,13 +300,13 @@ int main(void)
GFX_frame(&gfx, GFX_FRAME_SYNC);
framecount--;
while ((_g_posx != (UINT32)mouse_x) || (_g_posy != (UINT32)mouse_y) || g_btn_r || g_btn_l)
while ((_g_posx != (uint32_t)mouse_x) || (_g_posy != (uint32_t)mouse_y) || g_btn_r || g_btn_l)
{
GFX_restore(&gfx, &box, _g_posx, _g_posy);
_g_posx = (UINT32)mouse_x;
_g_posy = (UINT32)mouse_y;
_g_posx = (uint32_t)mouse_x;
_g_posy = (uint32_t)mouse_y;
if (g_btn_l && !g_btn_r)
{