source: svn/newcon3bcm2_21bu/nexus/modules/pwm/7552/include/nexus_pwm.h

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

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

  • Property svn:executable set to *
File size: 8.7 KB
Line 
1/***************************************************************************
2 *     (c)2007-2010 Broadcom Corporation
3 *
4 *  This program is the proprietary software of Broadcom Corporation and/or its licensors,
5 *  and may only be used, duplicated, modified or distributed pursuant to the terms and
6 *  conditions of a separate, written license agreement executed between you and Broadcom
7 *  (an "Authorized License").  Except as set forth in an Authorized License, Broadcom grants
8 *  no license (express or implied), right to use, or waiver of any kind with respect to the
9 *  Software, and Broadcom expressly reserves all rights in and to the Software and all
10 *  intellectual property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU
11 *  HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY
12 *  NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
13 *
14 *  Except as expressly set forth in the Authorized License,
15 *
16 *  1.     This program, including its structure, sequence and organization, constitutes the valuable trade
17 *  secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof,
18 *  and to use this information only in connection with your use of Broadcom integrated circuit products.
19 *
20 *  2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
21 *  AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
22 *  WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
23 *  THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES
24 *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE,
25 *  LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION
26 *  OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF
27 *  USE OR PERFORMANCE OF THE SOFTWARE.
28 *
29 *  3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS
30 *  LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR
31 *  EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR
32 *  USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF
33 *  THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT
34 *  ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
35 *  LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF
36 *  ANY LIMITED REMEDY.
37 *
38 * $brcm_Workfile: nexus_pwm.h $
39 * $brcm_Revision: 9 $
40 * $brcm_Date: 10/22/10 11:21a $
41 *
42 * Module Description:
43 *
44 * Revision History:
45 *
46 * $brcm_Log: /nexus/modules/pwm/7400/include/nexus_pwm.h $
47 *
48 * 9   10/22/10 11:21a erickson
49 * SW7420-1148: fix NEXUS_Pwm_OpenChannel's destructor attribute
50 *
51 * 8   6/16/10 1:26p erickson
52 * SW7405-4444: refactor NEXUS_Pwm_OpenChannel for kernel mode support
53 *
54 * 7   8/4/09 1:28p erickson
55 * PR57259: add NEXUS_Pwm_RampOnInterval
56 *
57 * 6   4/2/09 1:50p erickson
58 * PR53817: nexus_base.h should not be included in any public api
59 *
60 * 5   1/27/09 10:53a erickson
61 * PR35457: docjet comment style
62 *
63 * 4   2/7/08 11:18p vsilyaev
64 * PR 38682: Fixed _Close function to follow Nexus guidelines
65 *
66 * 3   1/23/08 8:37p vobadm
67 * PR35457: update docs
68 *
69 * 2   1/23/08 5:16p erickson
70 * PR35457: update docs
71 *
72 * 1   1/18/08 2:20p jgarrett
73 * PR 38808: Merging to main branch
74 *
75 * Nexus_Devel/3   11/30/07 11:12a erickson
76 * PR35457: api update
77 *
78 * Nexus_Devel/2   11/15/07 1:57p erickson
79 * PR37136: move PWM from display to its own module
80 *
81 **************************************************************************/
82#ifndef NEXUS_PWM_H__
83#define NEXUS_PWM_H__
84
85#include "nexus_types.h"
86
87#ifdef __cplusplus
88extern "C" {
89#endif
90
91/**
92Summary:
93**/
94typedef enum NEXUS_PwmFreqModeType
95{
96    NEXUS_PwmFreqModeType_eVariable = 0,
97    NEXUS_PwmFreqModeType_eConstant
98} NEXUS_PwmFreqModeType;
99
100/**
101Summary:
102**/
103typedef struct NEXUS_PwmChannelSettings
104{
105    bool openDrain; /* if true, enable open drain */
106    NEXUS_PwmFreqModeType  eFreqMode; /* this can also be changed with NEXUS_Pwm_SetFreqMode */
107} NEXUS_PwmChannelSettings;
108
109/**
110Summary:
111PWM channel handle
112**/
113typedef struct NEXUS_Pwm_P_ChannelContext *NEXUS_PwmChannelHandle;
114
115/***************************************************************************
116Summary:
117Get default settings for call to NEXUS_Pwm_OpenChannel
118****************************************************************************/
119void NEXUS_Pwm_GetDefaultChannelSettings(
120    NEXUS_PwmChannelSettings *pSettings /* [out] */
121    );
122
123/***************************************************************************
124Summary:
125Open PWM channel
126****************************************************************************/
127NEXUS_PwmChannelHandle NEXUS_Pwm_OpenChannel( /* attr{destructor=NEXUS_Pwm_CloseChannel}  */
128    unsigned index, /* PWM channel index */
129    const NEXUS_PwmChannelSettings *pSettings
130    );
131
132/***************************************************************************
133Summary:
134Close PWM channel
135****************************************************************************/
136void NEXUS_Pwm_CloseChannel(
137    NEXUS_PwmChannelHandle channel
138    );
139
140/***************************************************************************
141Summary:
142****************************************************************************/
143NEXUS_Error NEXUS_Pwm_SetControlWord(
144    NEXUS_PwmChannelHandle channel,
145    uint16_t word
146    );
147
148/***************************************************************************
149Summary:
150****************************************************************************/
151NEXUS_Error NEXUS_Pwm_GetControlWord(
152    NEXUS_PwmChannelHandle channel,
153    uint16_t *pWord /* [out] */
154    );
155
156/***************************************************************************
157Summary:
158***************************************************************************/
159NEXUS_Error NEXUS_Pwm_SetFreqMode(
160    NEXUS_PwmChannelHandle channel,
161    NEXUS_PwmFreqModeType frequencyMode
162    );
163
164/***************************************************************************
165Summary:
166***************************************************************************/
167NEXUS_Error NEXUS_Pwm_GetFreqMode(
168    NEXUS_PwmChannelHandle channel,
169    NEXUS_PwmFreqModeType *pFrequencyMode /* [out] */
170    );
171
172/***************************************************************************
173Summary:
174****************************************************************************/
175NEXUS_Error NEXUS_Pwm_SetOnInterval(
176    NEXUS_PwmChannelHandle channel,
177    uint16_t onInterval
178    );
179
180/***************************************************************************
181Summary:
182****************************************************************************/
183NEXUS_Error NEXUS_Pwm_GetOnInterval(
184    NEXUS_PwmChannelHandle channel,
185    uint16_t *pOnInterval /* [out] */
186    );
187
188/***************************************************************************
189Summary:
190****************************************************************************/
191NEXUS_Error NEXUS_Pwm_RampOnInterval(
192    NEXUS_PwmChannelHandle channel,
193    uint16_t onInterval
194    );
195
196/***************************************************************************
197Summary:
198****************************************************************************/
199NEXUS_Error NEXUS_Pwm_SetPeriodInterval(
200    NEXUS_PwmChannelHandle channel,
201    uint16_t periodInterval
202    );
203
204/***************************************************************************
205Summary:
206****************************************************************************/
207NEXUS_Error NEXUS_Pwm_GetPeriodInterval(
208    NEXUS_PwmChannelHandle channel,
209    uint16_t *pPeriodInterval /* [out] */
210    );
211
212/***************************************************************************
213Summary:
214****************************************************************************/
215NEXUS_Error NEXUS_Pwm_SetOnAndPeriodInterval(
216    NEXUS_PwmChannelHandle channel,
217    uint16_t OnInterval,
218    uint16_t periodInterval
219    );
220
221/***************************************************************************
222Summary:
223****************************************************************************/
224NEXUS_Error NEXUS_Pwm_GetOnAndPeriodInterval(
225    NEXUS_PwmChannelHandle channel,
226    uint16_t *pOnInterval, /* [out] */
227    uint16_t *pPeriodInterval /* [out] */
228    );
229
230/***************************************************************************
231Summary:
232****************************************************************************/
233NEXUS_Error NEXUS_Pwm_Start(
234    NEXUS_PwmChannelHandle channel
235    );
236
237/***************************************************************************
238Summary:
239****************************************************************************/
240NEXUS_Error NEXUS_Pwm_Stop(
241    NEXUS_PwmChannelHandle channel
242    );
243
244#ifdef __cplusplus
245}
246#endif
247
248#endif /* NEXUS_PWM_H__ */
249
Note: See TracBrowser for help on using the repository browser.