summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2007-01-11 23:49:35 +0000
committerIan C <ianc@noddybox.co.uk>2007-01-11 23:49:35 +0000
commit50d960d99f0783799f81236d9225a6940606fe38 (patch)
treeb188895d78ae31680e49b876a44a2de131b23da9 /source
parent5912faf7d30784945acd8a8e07027a633ce3094b (diff)
*** empty log message ***
Diffstat (limited to 'source')
-rw-r--r--source/main.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/source/main.c b/source/main.c
index 0f996bb..d0d0434 100644
--- a/source/main.c
+++ b/source/main.c
@@ -83,14 +83,11 @@ static void Timer(void)
{
static int c=0;
char s[32];
- sprintf(s,"%d",(c++)/50);
+ sprintf(s,"C:%d H:%d",(c++)/50,IPC->heartbeat);
FB_Print(s,0,184-10,FB_RGB(31,31,31),FB_RGB(10,10,10));
}
- if (wifi_enabled)
- {
- Wifi_Timer(50);
- }
+ Wifi_Timer(50);
}
static void ARM9_SyncToARM7(void)
@@ -193,7 +190,7 @@ static void Splash(void)
y += 8;
#ifndef DS81_DISABLE_FAT
- res = fatInitialise(32,true);
+ res = fatInitDefault();
#endif
if (res)
@@ -353,7 +350,6 @@ static void ConfigNetwork(void)
REG_IPC_FIFO_TX = wifi_pass;
Wifi_SetSyncHandler(ARM9_SyncToARM7);
- wifi_enabled = TRUE;
FB_Centre("Waiting for WIFI...",10,FB_RGB(31,31,31),-1);
@@ -369,9 +365,23 @@ static void ConfigNetwork(void)
FB_Centre("Waiting for WIFI...",10,FB_RGB(31,31,31),-1);
+ wifi_enabled = TRUE;
+
FB_Centre("Using WFC settings...",20,FB_RGB(31,31,31),-1);
Wifi_AutoConnect();
+ /*
+ {
+ static Wifi_AccessPoint p;
+ static unsigned char key[32];
+
+ strcpy(p.ssid,"NODDYBOX_WAP");
+ p.ssid_len=strlen(p.ssid);
+ p.channel=11;
+ Wifi_ConnectAP(&p,0,0,key);
+ }
+ */
+
FB_Centre("Waiting for association...",30,FB_RGB(31,31,31),-1);
exit_loop = FALSE;
@@ -411,7 +421,7 @@ int main(int argc, char *argv[])
powerON(POWER_ALL_2D);
- /* Set up main text screen and grab the ROM character data
+ /* Set up main text screen and load the ROM character data
*/
videoSetMode(MODE_0_2D | DISPLAY_BG0_ACTIVE);
@@ -457,6 +467,7 @@ int main(int argc, char *argv[])
irqSet(IRQ_TIMER3,Timer);
TIMER3_DATA = TIMER_FREQ_256(20);
TIMER3_CR = TIMER_ENABLE | TIMER_IRQ_REQ | TIMER_DIV_256;
+ irqEnable(IRQ_TIMER3);
irqSet(IRQ_FIFO_NOT_EMPTY,ARM9_Fifo);
irqEnable(IRQ_FIFO_NOT_EMPTY);