source: svn/trunk/zasc/app_c/DST_Main.c @ 48

Last change on this file since 48 was 48, checked in by jglee, 11 years ago

1.0.0

File size: 2.9 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_HostInterface.h"
24#include "DST_ChannelTune.h"
25#include "DST_SignalMonitor.h"
26#include "DST_WinManagerTask.h"
27#include "DST_WinManager.h"
28#include "DST_UserInterface.h"
29#include "DST_DB.h"
30#include "DST_DB_Engine.h"
31
32void DST_CCManagerInit(void);
33void DST_LoadFlash(DS_U8 Version);
34void DST_SimpleTask(void);
35
36// new delete overloading
37//void* operator new (size_t size) { return DST_OS_Malloc(size); }
38//void* operator new[ ] (size_t size) { return DST_OS_Malloc(size); }
39//void operator delete (void* p) { DST_OS_Free(&p); }
40//void operator delete[ ] (void* p) {   DST_OS_Free(&p); }
41
42const char *DST_GetVendorInfo(void)
43{
44        return "DST";
45}
46
47const char *DST_GetModelName(void)
48{
49        return _MODEL_NAME_;
50}
51
52static char strVersionText[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
53char* DST_GetAppShortVersion()
54{
55        if (strlen(strVersionText) == 0)
56        {
57                sprintf(strVersionText, "%d.%d.%d", _SW_VERSION_/1000, (_SW_VERSION_%1000)/100, (_SW_VERSION_%1000)%100);
58        }
59        return strVersionText;
60}
61
62int DST_GetAppShortVersionNumber()
63{
64        return _SW_VERSION_;
65}
66
67/*extern "C" */void Print_All_MemUnit(void);
68void CT_ChMapUpdate(void);
69
70/*extern "C" */void ram_start()
71{
72#ifndef DSTAR
73        m_report();
74#endif
75        DHL_SYS_Initialize(); // Flash ¸Þ¸ð¸® Á¢±ÙÀ» À§ÇØ DST_DB_Open ÀÌÀü¿¡ È£ÃâÇØ¾ß ÇÔ
76        DST_Printf("\n");
77        DST_Printf("--------------------------------------------------\n");
78        DST_Printf("           Model : %s\n", DST_GetModelName());
79        DST_Printf("           SW Version : %s \n", DST_GetAppShortVersion());
80        DST_Printf("           Compile Time : %s %s\n", __DATE__, __TIME__);
81        DST_Printf("           Vendor Info: %s \n", DST_GetVendorInfo());
82#if DESIGN_TYPE == 1
83        DST_Printf("           DESIGN_TYPE : BLACK\n");
84#else
85        DST_Printf("           DESIGN_TYPE : BLUE\n");
86#endif
87        DST_Printf("--------------------------------------------------\n");
88        DST_Printf("\n");
89        DST_DB_Open();
90        if (DST_EEPROM_GetNeedReset() == 1) 
91        {
92                DST_Factory_Reset();
93        }
94        CT_ChMapUpdate();
95        DHL_INFO_SetLastPowerState(true);
96        DST_UI_SetCh34(DST_UI_GetCh34()); // TV/CVBS Ãâ·Â °áÁ¤
97        DST_WinManagerInit(); // À©µµ¿ì ¸Þ´ÏÀú ÃʱâÈ­
98        DST_DB_TuneFirstChannel();
99        DST_SimpleTask();
100        DST_CCManagerInit();
101        DST_UI_SetVolume(DST_EEPROM_GetVolume());
102        while (1)
103        {
104                DST_OS_Delay(5000);
105                DS_U32 hour = 0, min = 0, sec = 0;
106                DST_OS_GetRunTime(&hour, &min, &sec);
107                DST_Printf("Current Time = %02d:%02d:%02d\n", (int)hour, (int)min, (int)sec);
108//              DST_OS_PrintMemUnit();
109#ifndef DSTAR
110                // m_report();
111#endif
112        }
113}
114
115#ifdef DSTAR
116int main()
117{
118        ram_start();
119        return 0;
120}
121#endif
122
123#endif // _GET_SW_VERSION_
Note: See TracBrowser for help on using the repository browser.