source: svn/newcon3bcm2_21bu/dst/dmw/src/example/dmw_test_cc.c

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 3.1 KB
Line 
1/*
2        dmwtestmain.c
3
4*/
5
6#include "DHL_OSAL.h"
7#include "DHL_SYS.h"
8#include "DHL_DBG.h"
9#include "DHL_Graphic.h"
10
11#include "cc_def.h"
12#include "cc_api.h"
13#include "DMG_Draw.h"
14
15
16
17#if COMMENT
18__________(){}
19#endif
20
21void draw_init(void)
22{
23        static BOOL bmenu_inited=FALSE;
24       
25        if(bmenu_inited) return;
26               
27        bmenu_inited=TRUE;
28
29        DMG_DrawInit();
30//      DMG_MenuInit(p_menu_manage_proc);
31       
32        {
33                tDMG_FontAttr attr;
34                DMG_GetFontAttr(&attr);
35                attr.font_style=eDMG_FS_KOREAN;
36                DMG_SetFontAttr(&attr);
37                DMG_SetFont(eDMG_FONT_BMF);
38        }
39
40        DHL_CreatePlane(0, 720, 480, eDHL_PIXELTYPE_ARGB8888);
41        DHL_CreatePlane(1, 720, 480, eDHL_PIXELTYPE_ARGB8888);
42        DHL_CreatePlane(2, 720, 480, eDHL_PIXELTYPE_ARGB8888);
43        DHL_CreatePlane(3, 720, 480, eDHL_PIXELTYPE_ARGB8888);
44        DHL_SetDisplayPlane(0);
45        // zooyouny cc¿¡¼­´Â display plane¿¡ Á÷Á¢ write¸¦ ¼öÇà
46        DMG_SetPlane(0);
47}
48
49void cc_init(void)
50{
51        tDCC_Info info;
52        tDCC_ColorMap p_cm = {
53                eDMG_C_BLACK, eDMG_C_RED, eDMG_C_GREEN, eDMG_C_YELLOW, 
54                eDMG_C_BLUE, eDMG_C_MAGENTA, eDMG_C_CYAN, eDMG_C_WHITE,
55                eDMG_C_H_BLACK, eDMG_C_H_RED, eDMG_C_H_GREEN, eDMG_C_H_YELLOW, 
56                eDMG_C_H_BLUE, eDMG_C_H_MAGENTA, eDMG_C_H_CYAN, eDMG_C_H_WHITE, 
57                eDMG_C_TRANSPARENT, (UINT8)-1
58        };
59
60        info.config.is_cc_wide = FALSE;
61        info.config.is_src_wide = FALSE;
62        info.config.is_korean = FALSE;
63        info.config.is_unicode = FALSE;
64        info.config.resolution = eDCC_R_480;
65        info.config.color_map = &p_cm;
66       
67        info.win_posx=0;
68        info.win_posy=0;
69
70        DCC_Init(&info.config);
71
72        /* tDCC_PenUserAttr */
73        info.pen_attr.= DCC_AUTO_SET;
74        info.pen_attr.fs = DCC_AUTO_SET;
75        info.pen_attr.tt = DCC_AUTO_SET;
76        info.pen_attr.= DCC_AUTO_SET;
77        info.pen_attr.= DCC_AUTO_SET;
78        info.pen_attr.= DCC_AUTO_SET;
79        info.pen_attr.et = DCC_AUTO_SET;
80       
81        info.pen_attr.fc = DCC_AUTO_SET;
82        info.pen_attr.fo = DCC_AUTO_SET;
83        info.pen_attr.bc = DCC_AUTO_SET;
84        info.pen_attr.bo = DCC_AUTO_SET;
85        info.pen_attr.ec = DCC_AUTO_SET;
86       
87        /* tDCC_WinAttr */
88        info.win_attr.= DCC_AUTO_SET;
89        info.win_attr.pd = DCC_AUTO_SET;
90        info.win_attr.sd = DCC_AUTO_SET;
91        info.win_attr.ww = DCC_AUTO_SET;
92        info.win_attr.de = DCC_AUTO_SET;
93        info.win_attr.ed = DCC_AUTO_SET;
94        info.win_attr.es = DCC_AUTO_SET;
95        info.win_attr.fc = DCC_AUTO_SET;
96        info.win_attr.fo = DCC_AUTO_SET;
97        info.win_attr.bt = DCC_AUTO_SET;
98        info.win_attr.bc = DCC_AUTO_SET;
99
100        info.bdisplay_on = TRUE;
101        info.service     = eDCC_S_CS1;
102        info.buser_opt   = FALSE;
103        info.is_feeding_608 = FALSE;
104       
105        DCC_SetService(info.service);
106        DCC_SetOption(info.buser_opt);
107        DCC_SetKorean(info.config.is_korean);
108        DCC_SetKoreanMode(info.config.is_unicode);
109       
110        DCC_SetPenUserAttr(&info.pen_attr);
111        DCC_SetWinUserAttr(&info.win_attr);
112
113        DCC_MoveWinPosition(info.win_posx, info.win_posy);
114        DCC_SetFeeding608(info.is_feeding_608);
115       
116        DCC_Ready();
117}
118
119BOOL bStarted = FALSE;
120
121void cc_start()
122{
123        if (bStarted)
124                return;
125        bStarted = TRUE;
126        DCC_Start();
127}
128
129void cc_stop()
130{
131        if (!bStarted)
132                return;
133        bStarted = FALSE;
134        DCC_Stop();
135}
136
137void cc_svc(UINT8 svc)
138{
139        if (bStarted)
140                DCC_Stop();
141
142        DCC_SetService(svc);
143
144        if (bStarted)
145                DCC_Start();
146}
147
148
Note: See TracBrowser for help on using the repository browser.