Module for generating a changing pulse-width modulated output signal that is used to smoothly blink LEDs. More...
Data Structures |
|
| struct | led_sb_init_params_t |
|
Structure holding the initialization parameters.
More...
|
|
Macros |
|
| #define | LED_SB_INIT_DEFAULT_PARAMS (mask) |
|
LED softblink default configuration.
More...
|
|
Functions |
|
| ret_code_t | led_softblink_init ( led_sb_init_params_t *p_init_params) |
|
Function for initializing LED softblink.
More...
|
|
| ret_code_t | led_softblink_start (uint32_t leds_pin_bit_mask) |
|
Function for starting to blink LEDs.
More...
|
|
| ret_code_t | led_softblink_stop (void) |
|
Function for stopping to blink LEDs.
More...
|
|
| void | led_softblink_off_time_set (uint32_t off_time_ticks) |
|
Function for setting the off time.
More...
|
|
| void | led_softblink_on_time_set (uint32_t on_time_ticks) |
|
Function for setting the on time.
More...
|
|
| ret_code_t | led_softblink_uninit (void) |
|
Function for uninitializing LED softblink.
More...
|
|
Detailed Description
Module for generating a changing pulse-width modulated output signal that is used to smoothly blink LEDs.
This module provides an LED softblink implementation using timers and GPIO.
LED softblink needs one timer. It can use any number of output channels that are available.
Only one instance of LED softblink can run at a time.
Macro Definition Documentation
| #define LED_SB_INIT_DEFAULT_PARAMS | ( | mask | ) |
LED softblink default configuration.
Function Documentation
| ret_code_t led_softblink_init | ( | led_sb_init_params_t * | p_init_params | ) |
Function for initializing LED softblink.
- Parameters
-
[in] p_init_params Pointer to the initialization structure.
- Returns
- Values returned by app_timer_create .
| void led_softblink_off_time_set | ( | uint32_t | off_time_ticks | ) |
Function for setting the off time.
This function configures the time that the LEDs will be off between each blink.
- Parameters
-
[in] off_time_ticks Off time in ticks.
| void led_softblink_on_time_set | ( | uint32_t | on_time_ticks | ) |
Function for setting the on time.
This function configures the time that the LEDs will be on between each blink.
- Parameters
-
[in] on_time_ticks On time in ticks.
| ret_code_t led_softblink_start | ( | uint32_t | leds_pin_bit_mask | ) |
Function for starting to blink LEDs.
- Parameters
-
[in] leds_pin_bit_mask Bit mask containing the pins for the LEDs to be blinked.
- Returns
- Values returned by app_timer_start .
| ret_code_t led_softblink_stop | ( | void | ) |
Function for stopping to blink LEDs.
- Returns
- Values returned by app_timer_stop .
| ret_code_t led_softblink_uninit | ( | void | ) |
Function for uninitializing LED softblink.
- Return values
-
NRF_SUCCESS If LED softblink was uninitialized successfully.