source: svn/branches/remocon/zasc/app_c/DST_Main.c @ 64

Last change on this file since 64 was 64, checked in by megakiss, 11 years ago
File size: 2.8 KB
Line 
1#define _MODEL_NAME_ "Newcon3Kr"
2#ifdef _GET_SW_VERSION_
3// 1000ÀÇ ÀÚ¸®´Â ¸ÞÀÌÀú
4//  100ÀÇ ÀÚ¸®´Â ¸¶À̳Ê
5//    10°ú 1ÀÇ ÀÚ¸®´Â ÆÐÄ¡
6// 1.0.0 ÀÇ °æ¿ì 1000
7// 1.1.1 ÀÇ °æ¿ì 1101
8#define _SW_VERSION_ (1000)
9#include <stdio.h>
10int main(int argc, char* argv[])
11{
12        if (argc > 1)
13        {
14                printf("%s\n",  _MODEL_NAME_);
15        }
16        else
17        {
18                printf("%d\n",  _SW_VERSION_);
19        }
20        return 0;
21}
22#else // _GET_SW_VERSION_
23#include "DST_nec_ir_sender.h"
24
25void DST_CCManagerInit(void);
26void DST_LoadFlash(DS_U8 Version);
27//void DST_SimpleTask(void);
28
29// new delete overloading
30//void* operator new (size_t size) { return DST_OS_Malloc(size); }
31//void* operator new[ ] (size_t size) { return DST_OS_Malloc(size); }
32//void operator delete (void* p) { DST_OS_Free(&p); }
33//void operator delete[ ] (void* p) {   DST_OS_Free(&p); }
34
35const char *DST_GetVendorInfo(void)
36{
37        return "DST";
38}
39
40const char *DST_GetModelName(void)
41{
42        return _MODEL_NAME_;
43}
44
45static char strVersionText[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
46char* DST_GetAppShortVersion()
47{
48        if (strlen(strVersionText) == 0)
49        {
50                sprintf(strVersionText, "%d.%d.%d", _SW_VERSION_/1000, (_SW_VERSION_%1000)/100, (_SW_VERSION_%1000)%100);
51        }
52        return strVersionText;
53}
54
55int DST_GetAppShortVersionNumber()
56{
57        return _SW_VERSION_;
58}
59
60/*extern "C" */void Print_All_MemUnit(void);
61void CT_ChMapUpdate(void);
62
63/*extern "C" */void ram_start()
64{
65#ifndef DSTAR
66        m_report();
67#endif
68        DHL_SYS_Initialize(); // Flash ¸Þ¸ð¸® Á¢±ÙÀ» À§ÇØ DST_DB_Open ÀÌÀü¿¡ È£ÃâÇØ¾ß ÇÔ
69        DST_Printf("\n");
70        DST_Printf("--------------------------------------------------\n");
71        DST_Printf("           Model : %s\n", DST_GetModelName());
72        DST_Printf("           SW Version : %s \n", DST_GetAppShortVersion());
73        DST_Printf("           Compile Time : %s %s\n", __DATE__, __TIME__);
74        DST_Printf("           Vendor Info: %s \n", DST_GetVendorInfo());
75#if DESIGN_TYPE == 1
76        DST_Printf("           DESIGN_TYPE : BLACK\n");
77#else
78        DST_Printf("           DESIGN_TYPE : BLUE\n");
79#endif
80        DST_Printf("--------------------------------------------------\n");
81        DST_Printf("\n");
82//      DST_DB_Open();
83//      if (DST_EEPROM_GetNeedReset() == 1)
84//      {
85//              DST_Factory_Reset();
86//      }
87//      CT_ChMapUpdate();
88//      DHL_INFO_SetLastPowerState(true);
89//      DST_UI_SetCh34(DST_UI_GetCh34()); // TV/CVBS Ãâ·Â °áÁ¤
90//      DST_WinManagerInit(); // À©µµ¿ì ¸Þ´ÏÀú ÃʱâÈ­
91//      DST_DB_TuneFirstChannel();
92//      DST_SimpleTask();
93//      DST_CCManagerInit();
94//      DST_UI_SetVolume(DST_EEPROM_GetVolume());
95        while (1)
96        {
97                DST_OS_Delay(1000);
98                DS_U32 hour = 0, min = 0, sec = 0;
99                DST_OS_GetRunTime(&hour, &min, &sec);
100                DST_Printf("Current Time = %02d:%02d:%02d\n", (int)hour, (int)min, (int)sec);
101//              DST_OS_PrintMemUnit();
102                DST_NEC_IR_Send(0x20, 0x08, 0x03); // CMB ¸®¸ðÄÜÀÇ Mute Ű
103#ifndef DSTAR
104                // m_report();
105#endif
106        }
107}
108
109#ifdef DSTAR
110int main()
111{
112        ram_start();
113        return 0;
114}
115#endif
116
117#endif // _GET_SW_VERSION_
Note: See TracBrowser for help on using the repository browser.