YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
DS_ARM7/source/main.cpp
浏览该文件的文档.
1 /*
2  Copyright by FrankHB 2009 - 2013.
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 #if 0
34 void
35 VcountHandler()
36 {
37  inputGetAndSend();
38 }
39 
40 void
41 VblankHandler(void)
42 {
43  //Wifi_Update();
44 }
45 #endif
46 
47 
48 int
50 {
51  ::irqInit();
52  ::fifoInit();
53 
54  //从固件中读取用户设置。
55  ::readUserSettings();
56 
57  // 开始使用 RTC 跟踪 IRQ 。
58  ::initClockIRQ();
59 
60  ::SetYtrigger(80);
61 
62  //installWifiFIFO();
63  ::installSoundFIFO();
64 
65  //::mmInstall(FIFO_MAXMOD);
66 
67  ::installSystemFIFO();
68 
69  ::irqSet(IRQ_VCOUNT, ::inputGetAndSend);
70 // ::irqSet(IRQ_VCOUNT, VcountHandler);
71 // ::irqSet(IRQ_VBLANK, VblankHandler);
72 
73  ::irqEnable(IRQ_VBLANK | IRQ_VCOUNT | IRQ_NETWORK);
74 
75  //保持 ARM7 空闲状态。
76  while(true)
77  ::swiWaitForVBlank();
78 }
79 
int main()