MT2523 API Reference  LinkIt SDK v4
hal_isink.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2016 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #ifndef __HAL_ISINK_H__
36 #define __HAL_ISINK_H__
37 
38 #include "hal_platform.h"
39 #ifdef HAL_ISINK_MODULE_ENABLED
40 
89 #ifdef __cplusplus
90 extern "C" {
91 #endif
92 
98 typedef enum {
103 
104 
106 typedef enum {
110 
112 typedef enum {
117 
118 
120 typedef enum {
128 
130 typedef enum {
148 
151 typedef enum {
169 
170 
172 typedef enum {
178 
179 
181 typedef enum {
185 
196 typedef struct {
204 
205 
219 hal_isink_status_t hal_isink_init(hal_isink_channel_t channel);
220 
221 
222 
231 hal_isink_status_t hal_isink_deinit(hal_isink_channel_t channel);
232 
233 
234 
244 hal_isink_status_t hal_isink_set_clock_source(hal_isink_channel_t channel, hal_isink_clock_source_t source_clock);
245 
246 
247 
257 hal_isink_status_t hal_isink_set_mode(hal_isink_channel_t channel, hal_isink_mode_t mode);
258 
259 
260 
270 hal_isink_status_t hal_isink_set_step_current(hal_isink_channel_t channel, hal_isink_current_t current);
271 
272 
283 hal_isink_status_t hal_isink_set_double_current(hal_isink_channel_t channel, hal_isink_current_t current);
284 
285 
295 hal_isink_status_t hal_isink_enable_breath_mode(hal_isink_channel_t channel, hal_isink_breath_mode_t breath_mode);
296 
297 
298 
307 hal_isink_status_t hal_isink_get_running_status(hal_isink_channel_t channel, hal_isink_running_status_t *running_status);
308 
309 
310 
311 #ifdef __cplusplus
312 }
313 #endif
314 
315 
321 #endif /*HAL_ISINK_MODULE_ENABLED*/
322 #endif /* __HAL_ISINK_H__ */
323 
hal_isink_breath_adjust_on_t lighter_to_darker_time1
The ISINK breath mode timming adjustment setting 1 corresponding to the brightness level from lighter...
Definition: hal_isink.h:200
The ISINK breath adjustment time, 0.246s.
Definition: hal_isink.h:152
The PWM mode.
Definition: hal_isink.h:113
The ISINK breath adjustment time, 2.214s.
Definition: hal_isink.h:157
hal_isink_running_status_t
This enum defines the ISINK running status.
Definition: hal_isink.h:181
The Breath mode.
Definition: hal_isink.h:114
hal_isink_status_t hal_isink_set_double_current(hal_isink_channel_t channel, hal_isink_current_t current)
This function sets the ISINK hardware double current.
The ISINK breath adjustment time, 3.383s.
Definition: hal_isink.h:160
The ISINK channel 0.
Definition: hal_isink.h:99
The ISINK breath adjustment time, 5.720s.
Definition: hal_isink.h:166
The ISINK maximum channel (invalid).
Definition: hal_isink.h:101
The ISINK breath adjustment time, 1.046s.
Definition: hal_isink.h:154
The ISINK breath adjustment time, 1.507s.
Definition: hal_isink.h:138
hal_isink_status_t hal_isink_set_clock_source(hal_isink_channel_t channel, hal_isink_clock_source_t source_clock)
This function sets the ISINK hardware clock source.
The ISINK breath adjustment time, 2.860s.
Definition: hal_isink.h:145
hal_isink_breath_adjust_on_t
ISINK breath mode based ont the time adjustment and brightness levels.
Definition: hal_isink.h:130
The ISINK output current 24mA.
Definition: hal_isink.h:126
hal_isink_breath_adjust_off_t darkest_time
Duration of the darkest time.
Definition: hal_isink.h:202
The ISINK breath adjustment time, 1.291s.
Definition: hal_isink.h:137
The ISINK breath adjustment time, 4.183s.
Definition: hal_isink.h:162
The ISINK breath adjustment time, 2.460s.
Definition: hal_isink.h:143
The ISINK channel 1.
Definition: hal_isink.h:100
The ISINK breath adjustment time, 4.552s.
Definition: hal_isink.h:163
The ISINK output current 4 mA.
Definition: hal_isink.h:121
hal_isink_mode_t
ISINK operating mode seletion.
Definition: hal_isink.h:112
The ISINK is busy.
Definition: hal_isink.h:183
isink config
Definition: hal_isink.h:196
The ISINK breath adjustment time, 2.091s.
Definition: hal_isink.h:141
The ISINK breath adjustment time, 1.845s.
Definition: hal_isink.h:156
The ISINK breath adjustment time, 2.676s.
Definition: hal_isink.h:144
The ISINK breath adjustment time, 1.876s.
Definition: hal_isink.h:140
The ISINK operation completed successfully.
Definition: hal_isink.h:176
hal_isink_status_t hal_isink_set_step_current(hal_isink_channel_t channel, hal_isink_current_t current)
This function sets the ISINK hardware step current.
The ISINK breath adjustment time, 1.107s.
Definition: hal_isink.h:136
hal_isink_breath_adjust_on_t lightest_time
Duration of the brightest level.
Definition: hal_isink.h:199
The ISINK breath adjustment time, 0.677s.
Definition: hal_isink.h:153
hal_isink_clock_source_t
ISINK clock source seletion.
Definition: hal_isink.h:106
The ISINK output current 20mA.
Definition: hal_isink.h:125
The ISINK clock source 32kHz.
Definition: hal_isink.h:107
hal_isink_breath_adjust_off_t
ISINK breath mode off based on each time adjustment.
Definition: hal_isink.h:151
hal_isink_breath_adjust_on_t darker_to_lighter_time1
The ISINK breath mode timming adjustment setting 1 corresponding to the brightness level from darker ...
Definition: hal_isink.h:197
hal_isink_status_t hal_isink_get_running_status(hal_isink_channel_t channel, hal_isink_running_status_t *running_status)
This function gets the current status of the ISINK.
hal_isink_status_t hal_isink_init(hal_isink_channel_t channel)
This function initializes the ISINK hardware.
hal_isink_channel_t
ISINK channel.
Definition: hal_isink.h:98
The ISINK error channel.
Definition: hal_isink.h:174
hal_isink_status_t hal_isink_set_mode(hal_isink_channel_t channel, hal_isink_mode_t mode)
This function sets the ISINK hardware operation mode.
The ISINK breath adjustment time, 1.691s.
Definition: hal_isink.h:139
hal_isink_status_t hal_isink_deinit(hal_isink_channel_t channel)
This function deinitializes the ISINK hardware.
hal_isink_breath_adjust_on_t lighter_to_darker_time2
The ISINK breath mode timming adjustment setting 2 corresponding to the brightness level from lighter...
Definition: hal_isink.h:201
The ISINK breath adjustment time, 3.075s.
Definition: hal_isink.h:146
The ISINK breath adjustment time, 2.583s.
Definition: hal_isink.h:158
The ISINK breath adjustment time, 0.926s.
Definition: hal_isink.h:135
An error occurred, invalid parameter was given.
Definition: hal_isink.h:175
The ISINK output current 16 mA.
Definition: hal_isink.h:124
The ISINK breath adjustment time, 0.123s.
Definition: hal_isink.h:131
The ISINK breath adjustment time, 0.338s.
Definition: hal_isink.h:132
hal_isink_current_t
ISINK output current seletion.
Definition: hal_isink.h:120
The ISINK breath adjustment time, 6.151s.
Definition: hal_isink.h:167
The ISINK breath adjustment time, 3.014s.
Definition: hal_isink.h:159
The ISINK function error occurred.
Definition: hal_isink.h:173
The ISINK output current 12 mA.
Definition: hal_isink.h:123
hal_isink_breath_adjust_on_t darker_to_lighter_time2
The ISINK breath mode timming adjustment setting 2 corresponding to the brightness level from darker ...
Definition: hal_isink.h:198
The Register mode.
Definition: hal_isink.h:115
The ISINK breath adjustment time, 3.752s.
Definition: hal_isink.h:161
The ISINK output current 8 mA.
Definition: hal_isink.h:122
The ISINK is idle.
Definition: hal_isink.h:182
hal_isink_status_t
ISINK status.
Definition: hal_isink.h:172
The ISINK breath adjustment time, 4.921s.
Definition: hal_isink.h:164
The ISINK clock source 2MHz.
Definition: hal_isink.h:108
The ISINK breath adjustment time, 5.351s.
Definition: hal_isink.h:165
The ISINK breath adjustment time, 0.523s.
Definition: hal_isink.h:133
hal_isink_status_t hal_isink_enable_breath_mode(hal_isink_channel_t channel, hal_isink_breath_mode_t breath_mode)
This function enables the ISINK hardware breath mode.
The ISINK breath adjustment time, 2.276s.
Definition: hal_isink.h:142
The ISINK breath adjustment time, 1.417s.
Definition: hal_isink.h:155
The ISINK breath adjustment time, 0.707s.
Definition: hal_isink.h:134