You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

breathing_led.h 703B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef BREATHING_LED_H
  2. #define BREATHING_LED_H
  3. #ifdef BREATHING_LED_ENABLE
  4. #include <stdint.h>
  5. #include <stdbool.h>
  6. #ifndef BREATHING_LED_LEVEL
  7. #define BREATHING_LED_LEVEL 1
  8. #endif
  9. typedef union {
  10. uint8_t raw;
  11. struct {
  12. bool enable:1;
  13. uint8_t level:7;
  14. };
  15. } breathing_led_config_t;
  16. void breathing_led_init(void);
  17. bool breathing_led_is_enabled(void);
  18. void breathing_led_enable(void);
  19. void breathing_led_disable(void);
  20. void breathing_led_toggle(void);
  21. void breathing_led_increase(void);
  22. void breathing_led_decrease(void);
  23. #else
  24. #define breathing_led_init()
  25. #define breathing_led_enable()
  26. #define breathing_led_disable()
  27. #define breathing_led_toggle()
  28. #endif
  29. #endif