- added missing declarations
- reduced compiler warnings git-svn-id: http://moon:8086/svn/mips@180 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
+13
-6
@@ -1,12 +1,17 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include <sys/times.h>
|
||||
#include <sys/time.h>
|
||||
#include <libsys.h>
|
||||
#include <mips_gfx.h>
|
||||
#include <console.h>
|
||||
|
||||
#include <gpio.h>
|
||||
#include <cop0.h>
|
||||
#include <irq.h>
|
||||
#include <mips_gfx.h>
|
||||
#include <mips_ps2.h>
|
||||
@@ -23,6 +28,7 @@
|
||||
#define PIC_NY 600
|
||||
|
||||
extern int paranoia(int argc, char **argv);
|
||||
extern int calibrate_delay(void);
|
||||
|
||||
gpio_if_t gpio_if;
|
||||
|
||||
@@ -102,7 +108,7 @@ int IsEndianBig(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void handler3(struct xcptcontext *xcp)
|
||||
void handler3(EXCEPTION_CONTEXT *xcp)
|
||||
{
|
||||
volatile uint32_t *pUART_stat = (uint32_t*)SYS_UART_STAT;
|
||||
volatile uint32_t *pUART_data = (uint32_t*)SYS_UART_DATA;
|
||||
@@ -119,7 +125,7 @@ box_t box;
|
||||
gfx_t gfx;
|
||||
int posx, posy;
|
||||
|
||||
void handler7(struct xcptcontext *xcp)
|
||||
void handler7(EXCEPTION_CONTEXT *xcp)
|
||||
{
|
||||
uint32_t volatile *pTim_stat = (uint32_t*)SYS_ITIM_STAT;
|
||||
uint32_t volatile *pTim_ctrl = (uint32_t*)SYS_ITIM_CTRL;
|
||||
@@ -1165,14 +1171,15 @@ int main (void)
|
||||
posx = posy = 0;
|
||||
GFX_show(&gfx);
|
||||
|
||||
interrupt_enable(7);
|
||||
// interrupt_enable(7);
|
||||
// *pTim_ctrl |= 3;
|
||||
interrupt_enable(3);
|
||||
*pTim_ctrl |= 3;
|
||||
*pUART_stat |= (1 << 6);
|
||||
// *pUART_stat |= (1 << 6);
|
||||
|
||||
cnt = 0;
|
||||
while (1)
|
||||
{
|
||||
#if 0
|
||||
for (i=0; i < 100000; i++)
|
||||
{
|
||||
interrupt_disable(7);
|
||||
@@ -1181,7 +1188,7 @@ int main (void)
|
||||
{
|
||||
interrupt_enable(7);
|
||||
}
|
||||
|
||||
#endif
|
||||
gpio_write(&gpio_if, GPIO_0_MASK_LED, GPIO_0_ALIGN_LED, GPIO_DATA_OFFSET, cnt);
|
||||
|
||||
printf("-------------------------------------------\n");
|
||||
|
||||
Reference in New Issue
Block a user