furi_hal_light.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. * @file furi_hal_light.h
  3. * Light control HAL API
  4. */
  5. #pragma once
  6. #include <stdbool.h>
  7. #include <stdint.h>
  8. #include <furi_hal_resources.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. /** Init light driver
  13. */
  14. void furi_hal_light_init();
  15. /** Set light value
  16. *
  17. * @param light Light
  18. * @param value light brightness [0-255]
  19. */
  20. void furi_hal_light_set(Light light, uint8_t value);
  21. /** Start hardware LED blinking mode
  22. *
  23. * @param light Light
  24. * @param brightness light brightness [0-255]
  25. * @param on_time LED on time in ms
  26. * @param period LED blink period in ms
  27. */
  28. void furi_hal_light_blink_start(Light light, uint8_t brightness, uint16_t on_time, uint16_t period);
  29. /** Stop hardware LED blinking mode
  30. */
  31. void furi_hal_light_blink_stop();
  32. /** Set color in hardware LED blinking mode
  33. *
  34. * @param light Light
  35. */
  36. void furi_hal_light_blink_set_color(Light light);
  37. /** Execute sequence
  38. *
  39. * @param sequence Sequence to execute
  40. */
  41. void furi_hal_light_sequence(const char* sequence);
  42. #ifdef __cplusplus
  43. }
  44. #endif