- fixed putchar to wrong fd

git-svn-id: http://moon:8086/svn/mips@191 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2021-11-22 21:11:32 +00:00
parent f34d7dcac7
commit 3f459e693d
+10 -12
View File
@@ -9,6 +9,7 @@
#include <libsys.h>
#include <mips_gfx.h>
#include <console.h>
#include <assert.h>
#include <gpio.h>
#include <cop0.h>
@@ -31,7 +32,10 @@ extern int paranoia(int argc, char **argv);
extern int calibrate_delay(void);
gpio_if_t gpio_if;
int g_cnt;
box_t box;
gfx_t gfx;
int posx, posy;
uint32_t* pf(void)
{
@@ -115,16 +119,11 @@ void handler3(EXCEPTION_CONTEXT *xcp)
if((0x10 & *pUART_stat))
{
_putchar(0, (char)*pUART_data);
_putchar(1, (char)*pUART_data);
}
}
int g_cnt;
box_t box;
gfx_t gfx;
int posx, posy;
void handler7(EXCEPTION_CONTEXT *xcp)
{
uint32_t volatile *pTim_stat = (uint32_t*)SYS_ITIM_STAT;
@@ -1171,15 +1170,14 @@ int main (void)
posx = posy = 0;
GFX_show(&gfx);
// interrupt_enable(7);
// *pTim_ctrl |= 3;
interrupt_enable(7);
*pTim_ctrl |= 3;
interrupt_enable(3);
// *pUART_stat |= (1 << 6);
*pUART_stat |= (1 << 6);
cnt = 0;
while (1)
{
#if 0
for (i=0; i < 100000; i++)
{
interrupt_disable(7);
@@ -1188,7 +1186,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");