MT2523 API Reference  LinkIt SDK v4
ISINK

This section introduces the ISINK APIs including terms and acronyms, supported features, software architecture, how to use this module, ISINK function groups, enums, structures and functions. More...

Overview

This section introduces the ISINK APIs including terms and acronyms, supported features, software architecture, how to use this module, ISINK function groups, enums, structures and functions.

Users can use this API to adjust differnt current output settings through ISINK registers. For example, to adjust the backlight brightness.

Terms and acronyms

Terms Details
ISINK Current Sink that provides different current outputs depending on the PMIC setting.
PMIC Power Management Integrated Chip. For an introduction to the Power Management Integrated Chip, please refer to Power management integrated circuit Wikipedia

How to use this module

Functions

hal_isink_status_t hal_isink_init (hal_isink_channel_t channel)
 This function initializes the ISINK hardware. More...
 
hal_isink_status_t hal_isink_deinit (hal_isink_channel_t channel)
 This function deinitializes the ISINK hardware. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Modules

 Enum
 
 Struct
 

Function Documentation

hal_isink_status_t hal_isink_deinit ( hal_isink_channel_t  channel)

This function deinitializes the ISINK hardware.

Parameters
[in]channelis the ISINK channel number. For more details about the parameter, please refer to hal_isink_channel_t.
Returns
Indicates whether this function call is successful or not. If the return value is HAL_ISINK_STATUS_OK, the operation completed successfully. If the return value is HAL_ISINK_STATUS_ERROR_INVALID_PARAMETER, a wrong parameter is given. The parameter needs to be verified.
See also
hal_isink_init()
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.

Parameters
[in]channelis the ISINK channel number. For more details about the parameter, please refer to hal_isink_channel_t.
[in]breath_modeis the ISINK breath mode setting. For more details about the parameter, please refer to hal_isink_breath_mode_t.
Returns
Indicates whether this function call is successful or not. If the return value is HAL_ISINK_STATUS_OK, the operation completed successfully. If the return value is HAL_ISINK_STATUS_ERROR_INVALID_PARAMETER, a wrong parameter is given. The parameter needs to be verified.
See also
hal_isink_set_mode()
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.

Parameters
[in]channelis the ISINK channel number. For more details about the parameter, please refer to hal_isink_channel_t.
[out]running_statusis the ISINK busy or idle status. For more details about this parameter, please refer to hal_isink_running_status_t .
Returns
Indicates whether this function call is successful or not. If the return value is HAL_ISINK_STATUS_OK, the operation completed successfully. If the return value is HAL_ISINK_STATUS_ERROR_INVALID_PARAMETER, a wrong parameter is given. The parameter needs to be verified.
hal_isink_status_t hal_isink_init ( hal_isink_channel_t  channel)

This function initializes the ISINK hardware.

Parameters
[in]channelis the ISINK channel number. For more details about the parameter, please refer to hal_isink_channel_t.
Returns
Indicates whether this function call is successful or not. If the return value is HAL_ISINK_STATUS_OK, the operation completed successfully. If the return value is HAL_ISINK_STATUS_ERROR_INVALID_PARAMETER, a wrong parameter is given. The parameter needs to be verified.
See also
hal_isink_deinit()
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.

Parameters
[in]channelis the ISINK channel number. For more details about the parameter, please refer to hal_isink_channel_t.
[in]source_clockis the ISINK clock source setting. For more details about the parameter, please refer to hal_isink_clock_source_t.
Returns
Indicates whether this function call is successful or not. If the return value is HAL_ISINK_STATUS_OK, the operation completed successfully. If the return value is HAL_ISINK_STATUS_ERROR_INVALID_PARAMETER, a wrong parameter is given. The parameter needs to be verified.
See also
hal_isink_set_mode()
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.

Parameters
[in]channelis the ISINK channel number. For more details about the parameter, please refer to hal_isink_channel_t.
[in]currentis the current ISINK setting. For more details about the parameter, please refer to hal_isink_current_t.
Returns
Indicates whether this function call is successful or not. If the return value is HAL_ISINK_STATUS_OK, the operation completed successfully. If the return value is HAL_ISINK_STATUS_ERROR_INVALID_PARAMETER, a wrong parameter is given. The parameter needs to be verified.
See also
hal_isink_set_step_current()
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.

Parameters
[in]channelis the ISINK channel number. For more details about the parameter, please refer to hal_isink_channel_t.
[in]modeis the ISINK working mode setting. For more details about the parameter, please refer to hal_isink_mode_t.
Returns
Indicates whether this function call is successful or not. If the return value is HAL_ISINK_STATUS_OK, the operation completed successfully. If the return value is HAL_ISINK_STATUS_ERROR_INVALID_PARAMETER, a wrong parameter is given. The parameter needs to be verified.
See also
hal_isink_set_clock_source()
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.

Parameters
[in]channelis the ISINK channel number. For more details about the parameter, please refer to hal_isink_channel_t.
[in]currentis ISINK current setting. For more details about the parameter, please refer to hal_isink_current_t.
Returns
Indicates whether this function call is successful or not. If the return value is HAL_ISINK_STATUS_OK, the operation completed successfully. If the return value is HAL_ISINK_STATUS_ERROR_INVALID_PARAMETER, a wrong parameter is given. The parameter needs to be verified.
See also
hal_isink_set_doule_current()