LED Controller Peripheral¶
This peripheral is applicable to IS31Fl3216 chip that is a light LED controller with an audio modulation mode. It can store data of 8 Frames with internal RAM to play small animations automatically.
You can also use it to control a number of LEDs connected to GPIOs. If you want to use the IS31Fl3216, see functions periph_is31fl3216_init(), periph_is31fl3216_set_blink_pattern(), periph_is31fl3216_set_duty(), periph_is31fl3216_set_state().
Application Examples¶
Implementation of this API is demonstrated in checks/check_msc_leds example.
API Reference¶
Header File¶
Functions¶
-
esp_periph_handle_t
periph_is31fl3216_init(periph_is31fl3216_cfg_t *is31fl3216_config)¶ Initializate the is31fl3216.
- Return
- ESP_OK Success
- ESP_FAIL Fail
- Parameters
is31fl3216_config:
-
esp_err_t
periph_is31fl3216_set_blink_pattern(esp_periph_handle_t periph, uint16_t blink_pattern)¶ Set the current enable channels.
- Return
- ESP_OK Success
- ESP_FAIL Fail
- Parameters
periph: The is31fl3216 handleblink_pattern: The bit pattern of enabled channels
-
esp_err_t
periph_is31fl3216_set_duty(esp_periph_handle_t periph, uint8_t index, uint8_t value)¶ Set the duty of the channel.
- Return
- ESP_OK Success
- ESP_FAIL Fail
- Parameters
periph: The is31fl3216 handleindex: The channel numbervalue: The value of the channel’s duty to be set
-
esp_err_t
periph_is31fl3216_set_state(esp_periph_handle_t periph, periph_is31fl3216_state_t state)¶ Set the state of all the channels.
- Return
- ESP_OK Success
- ESP_FAIL Fail
- Parameters
periph: The is31fl3216 handlestate: The state of all channels