source: svn/newcon3bcm2_21bu/dst/dmw/src/System/DMW_Main.c @ 22

Last change on this file since 22 was 22, checked in by phkim, 11 years ago
  1. phkim
  2. newcon3sk 를 kctv 로 브랜치 함
  • Property svn:executable set to *
File size: 2.5 KB
Line 
1/*
2        DMW_Main.c
3
4
5
6*/
7
8#define __DEFINE_ERR_STRING__
9
10
11#include "DMW_Platform.h"
12
13        #include "DMW_Main.h"
14        #include "DHL_OSAL.h"
15        #include "DHL_DBG.h"
16        #include "DHL_SYS.h"
17        #include "DHL_FE.h"
18        #include "DHL_NVM.h"
19        #include "DHL_AVCAP.h"
20        #include "DHL_Demux.h"
21        #include "DHL_PSI.h"
22        #include "DLIB_PSI_Monitor.h"
23        #include "DLIB_PSIP_Monitor.h"
24        #include "DLIB_PSI_Parser.h"
25        #include "DLIB_PSIP_Parser.h"
26        #include "DHL_Timer.h"
27//      #include "DHL_IO.h"
28        #include "DHL_UIO.h"
29
30#include "DMW_Channel.h"
31
32
33static BOOL dmc_platformInitialized = FALSE;
34        // Mocha platform ÃʱâÈ­ ¿©ºÎ.
35        //
36
37
38#define dprint DHL_OS_Printf
39
40
41
42
43//-----------------------------------------------------------
44//  Dmc_Init
45//    ½Ã½ºÅÛÀ» ÃʱâÈ­ Çϰí, ºñµð¿À Å×½ºÅ©¸¦ »ý¼ºÇÑ´Ù.
46//    ÀÌ ÇÔ¼ö´Â ÀÓÀÇÀÇ Å½ºÅ©¿¡¼­ ºÒ¸°´Ù.
47//
48STATUS Dmc_Init(void)
49{
50        DHL_RESULT dhlResult;
51        STATUS status;
52
53        dprint("%s()\n", __FUNCTION__);
54
55        //--------- DHL ÃʱâÈ­ ------------
56       
57        if (dmc_platformInitialized == 0) 
58        {
59#if 1
60        // caller°¡ ÀûÀýÇÑ DHL ÃʱâÈ­ ÇÔ¼ö¸¦ È£ÃâÇÏ´Â °ÍÀ¸·Î ÇÔ.
61#else
62        // DHL init
63        DHL_SYS_Init();
64        DHL_OS_Init();
65        DHL_DBG_Init();
66//      DHL_SYS_Initiate();
67        DHL_SYS_TimerInit();
68        DHL_NVM_Init();
69        DHL_FE_Init();
70        DHL_FE_Open(0);
71        DHL_AV_Init();
72        DHL_DMX_Init();
73        DHL_PSI_Init();
74//      DHL_UART_Init();       
75        DHL_UIO_Init();
76#endif
77       
78                dmc_platformInitialized = TRUE;
79        }
80        else
81                dprint("!! system already inited. skip..\n");
82       
83        //--------- DMC component ÃʱâÈ­ ------------
84
85
86        status = Dmc_InitChannelTask();
87        if (status) {
88                dprint("!! ChannelTask init err %d\n", status);
89                return status; 
90        }
91
92
93
94        // driver ÃʱâÈ­°¡ ´Ù ³¡³ª¸é task¸¦ ¸¸µé±â Àü¿¡ DbgPrintf Task¸¦ ±âµ¿ÇÑ´Ù.
95        // --> LG driver print¿Í ¼¯ÀÌ´Â ¹®Á¦ ¶§¹®¿¡ °ï¶õ..
96        //OS_UsePrintfSemaphore(TRUE);
97       
98        // ±âŸ ³ª¸ÓÁö debug symbol µî·ÏÀº app_debug¿¡¼­ Çʿ信 µû¶ó ¼öÇà.
99               
100        return statusOK;
101}
102
103//-----------------------------------------------------------
104// Dmc_Terminate
105//        Call this function to undo everything we did above
106//    »ç½Ç ÀÌ ÇÔ¼ö¸¦ ºÎ¸¦ ÀÏÀº °ÅÀÇ ¾ø´Ù.
107//
108void Dmc_Terminate(void)
109{
110        dprint("%s()\n", __FUNCTION__);
111       
112/*  not yet..
113        Dmc_EndChannelTask();
114       
115        // °¢ ¸ðµâº°·Î ¸ðµç resource¸¦ releaseÇÑ´Ù.
116        //DMW_CDB_TerminateChannelLib();
117
118*/
119
120        DHL_AV_Terminate();
121
122        dmc_platformInitialized = FALSE;
123}
124
125
126
127#if 0//BKTEST
128
129void ram_start()
130{
131        printf(">> BKTEST ram_start\n");
132        DHL_SYS_PlatformInit();
133        Dmc_Init();
134        DMW_SYS_TimerInit();
135
136        while(1)
137        {
138                DHL_OS_Delay(100);
139        }
140}
141#endif
142
143
144
Note: See TracBrowser for help on using the repository browser.