YSTest  PreAlpha_b400_20130424
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
YSTest_ARM7/source/main.cpp
浏览该文件的文档.
1 /*
2  Copyright (C) by Franksoft 2009 - 2012.
3 
4  This file is part of the YSLib project, and may only be used,
5  modified, and distributed under the terms of the YSLib project
6  license, LICENSE.TXT. By continuing to use, modify, or distribute
7  this file you indicate that you have read the license and
8  understand and accept it fully.
9 */
10 
28 #include <nds.h>
29 //#include <dswifi7.h>
30 //#include <maxmod7.h>
31 
32 
33 /*
34 void VcountHandler()
35 {
36  inputGetAndSend();
37 }
38 void VblankHandler(void)
39 {
40  //Wifi_Update();
41 }
42 */
43 
44 
45 int main()
46 {
47  ::irqInit();
48  ::fifoInit();
49 
50  //从固件中读取用户设置。
51  ::readUserSettings();
52 
53  // 开始使用 RTC 跟踪 IRQ 。
54  ::initClockIRQ();
55 
56  ::SetYtrigger(80);
57 
58  //installWifiFIFO();
59  ::installSoundFIFO();
60 
61  //::mmInstall(FIFO_MAXMOD);
62 
63  ::installSystemFIFO();
64 
65  ::irqSet(IRQ_VCOUNT, ::inputGetAndSend);
66 // ::irqSet(IRQ_VCOUNT, VcountHandler);
67 // ::irqSet(IRQ_VBLANK, VblankHandler);
68 
69  ::irqEnable(IRQ_VBLANK | IRQ_VCOUNT | IRQ_NETWORK);
70 
71  //保持 ARM7 空闲状态。
72  while(true)
73  ::swiWaitForVBlank();
74 }
75