source: svn/newcon3bcm2_21bu/dst/dhl/src/DHL_UIO.c @ 45

Last change on this file since 45 was 45, checked in by megakiss, 11 years ago
  • Property svn:executable set to *
File size: 1.6 KB
Line 
1/*
2        DHL_UIO.c
3       
4        BU2 HAL library
5
6        User I/O module API
7
8        Copyright 2006~2010 Digital STREAM Technology, Inc.
9        All Rights Reserved
10*/
11
12
13#include "DHL_OSAL.h"
14#include "DHL_DBG.h"
15
16#include "DHL_UIO.h"
17#include "DHL_UIO_Priv.h"
18
19#include "UioFilter.h"
20
21
22
23
24//DHL_MODULE("*UIO", 0);
25
26
27
28#if COMMENT
29____Config____(){}
30#endif
31
32/*
33        ÀÌ ¸ðµâ ³»ºÎ¿¡¼­ »ç¿ëµÇ´Â °¢Á¾ configuration Á¤ÀÇ.
34*/
35
36
37#if COMMENT
38____Types____(){}
39#endif
40
41/*
42        ÀÌ ¸ðµâ ³»ºÎ¿¡¼­ »ç¿ëµÇ´Â structure ¹× enumerations.
43*/
44
45
46
47#if COMMENT
48____Variables____(){}
49#endif
50
51/*
52        global·Î Àû¿ëµÇ´Â variable Á¤ÀÇ.
53        °¢ function º°·Î Ư¼öÇÑ ¿ëµµÀÇ variableÀº °¢ functionX block ¿¡¼­ Á¤ÀÇ °¡´É.
54*/
55
56static BOOL is_inited=FALSE;
57
58
59#if COMMENT
60____API____(){}
61#endif
62
63
64void DHL_UIO_Init(void)
65{
66
67        if(is_inited) return;   
68
69        dhl_uio_init();
70
71        UioFilter_Init();
72
73        is_inited=TRUE;
74
75}
76
77
78void DHL_UIO_Config(tDHL_UIO_ConfigType type, void *param)
79{
80
81        if (type == eDHL_UIO_Cfg_PassThrough ||
82                type == eDHL_UIO_Cfg_UseReleaseEvent ||
83                type == eDHL_UIO_Cfg_RepeatSetting ||
84                type == eDHL_UIO_Cfg_CheckRepeatCb ||
85                type == eDHL_UIO_Cfg_InputDataFilter)
86        {
87                UioFilter_Config(type, param);
88        }
89        else
90        {
91                dhl_uio_config(type, param);
92        }
93
94
95}
96
97
98void DHL_UIO_RegisterCallback(tDHL_UIO_InputCb cb)
99{
100        UioFilter_RegisterCallback(cb);
101}
102
103
104DHL_RESULT DHL_UIO_Control(tDHL_UIO_ControlType type, UINT32 id, UINT32 param)
105{
106        DHL_RESULT result = DHL_OK;
107
108        result = dhl_uio_control(type, id, param);
109
110        return result;
111}
112
113
114void DHL_UIO_Uninit(void)
115{
116
117        if(!is_inited) return; 
118
119        UioFilter_Uninit();
120
121        dhl_uio_uninit();
122
123        is_inited = FALSE;
124}
125
126
Note: See TracBrowser for help on using the repository browser.