led_vu.h 995 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Control of LED strip within squeezelite-esp32
  3. *
  4. * (c) Wizmo 2021
  5. *
  6. * This software is released under the MIT License.
  7. * https://opensource.org/licenses/MIT
  8. *
  9. */
  10. #include <ctype.h>
  11. #define LED_VU_MAX 255U
  12. #define LED_VU_BRIGHT 20U
  13. #define led_vu_color_red(B) led_vu_color_all(B, 0, 0)
  14. #define led_vu_color_green(B) led_vu_color_all(0, B, 0)
  15. #define led_vu_color_blue(B) led_vu_color_all(0, 0, B)
  16. #define led_vu_color_yellow(B) led_vu_color_all(B/2, B/2, 0)
  17. extern struct led_strip_t* led_display;
  18. uint16_t led_vu_string_length();
  19. uint16_t led_vu_scale();
  20. void led_vu_progress_bar(int pct, int bright);
  21. void led_vu_display(int vu_l, int vu_r, int bright, bool comet);
  22. void led_vu_spin_dial(int gain, int rate, int speed, bool comet);
  23. void led_vu_spectrum(uint8_t* data, int bright, int length, int style);
  24. void led_vu_color_all(uint8_t r, uint8_t g, uint8_t b);
  25. void led_vu_data(uint8_t* data, uint16_t offset, uint16_t length);
  26. void led_vu_clear();