34 lines
736 B
C
34 lines
736 B
C
#include "common.h"
|
|
|
|
#include "nu/nusys.h"
|
|
|
|
extern u8 obStackMain[];
|
|
extern OSThread nuThreadIdle;
|
|
|
|
void nuIdle(void* arg);
|
|
|
|
void nuBoot(void) {
|
|
osInitialize();
|
|
osCreateThread(&nuThreadIdle, 1, nuIdle, NULL, obStackIdle, 0xA);
|
|
osStartThread(&nuThreadIdle);
|
|
}
|
|
|
|
void nuIdle(void* arg) {
|
|
nuIdleFunc = NULL;
|
|
|
|
nuPiInit();
|
|
nuScCreateScheduler(OS_VI_NTSC_LAN1, 1);
|
|
|
|
osViSetSpecialFeatures(OS_VI_DIVOT_ON | OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF | OS_VI_GAMMA_DITHER_OFF);
|
|
|
|
osCreateThread(&obThreadMain, 3, obMain, NULL, obStackMain, 0xA);
|
|
osStartThread(&obThreadMain);
|
|
|
|
osSetThreadPri(&nuThreadIdle, OS_PRIORITY_IDLE);
|
|
|
|
while(1) {
|
|
if (nuIdleFunc != NULL)
|
|
nuIdleFunc();
|
|
}
|
|
}
|