LED peripheral driver.
More...
LED peripheral driver.
◆ npmx_led_mode_t
Possible LED working modes.
Enumerator |
---|
NPMX_LED_MODE_ERROR | Charging error indicator.
|
NPMX_LED_MODE_CHARGING | Charging indicator (ON during charging).
|
NPMX_LED_MODE_HOST | Driven from register LEDDRV_x_SET/CLR.
|
NPMX_LED_MODE_NOTUSED | Not used.
|
NPMX_LED_MODE_COUNT | LED working modes count.
|
NPMX_LED_MODE_INVALID | Invalid LED working mode.
|
◆ npmx_led_get()
Function for returning LED instance based on index.
- Parameters
-
[in] | p_pmic | Pointer to the PMIC instance. |
[in] | idx | Index of the LED instance. |
- Returns
- Pointer to the LED instance.
◆ npmx_led_mode_get()
Function for reading the mode of specified LED instance.
- Parameters
-
[in] | p_instance | Pointer to the LED instance. |
[in] | p_mode | Pointer to the mode of the LED. |
- Return values
-
NPMX_SUCCESS | Operation performed successfully. |
NPMX_ERROR_IO | Error using IO bus line. |
◆ npmx_led_mode_set()
Function for setting the mode of specified LED instance.
- Parameters
-
[in] | p_instance | Pointer to the LED instance. |
[in] | mode | Mode of the LED to be set. |
- Return values
-
NPMX_SUCCESS | Operation performed successfully. |
NPMX_ERROR_IO | Error using IO bus line. |
◆ npmx_led_state_set()
Function for setting the state of specified LED instance.
- Note
- This function can be called only after calling npmx_led_mode_set() with NPMX_LED_MODE_HOST.
- Parameters
-
[in] | p_instance | Pointer to the LED instance. |
[in] | state | True to enable LED current source, false to disable. |
- Return values
-
NPMX_SUCCESS | Operation performed successfully. |
NPMX_ERROR_IO | Error using IO bus line. |