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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef SOFTPWM_LED_H
  2. #define SOFTPWM_LED_H
  3. #include "stdint.h"
  4. #include "led.h"
  5. typedef led_pack_t led_state_t;
  6. #ifdef SOFTPWM_LED_ENABLE
  7. void softpwm_init(void);
  8. void softpwm_led_init(void);
  9. void softpwm_led_enable(void);
  10. void softpwm_led_disable(void);
  11. void softpwm_led_toggle(void);
  12. void softpwm_led_set(uint8_t index, uint8_t val);
  13. void softpwm_led_set_all(uint8_t val);
  14. void softpwm_led_on(uint8_t index);
  15. void softpwm_led_off(uint8_t index);
  16. uint8_t softpwm_led_get_state(void);
  17. void softpwm_led_state_change(uint8_t state);
  18. #ifdef BREATHING_LED_ENABLE
  19. #define breathing_led_init()
  20. void breathing_led_enable(uint8_t index);
  21. void breathing_led_enable_all(void);
  22. void breathing_led_disable(uint8_t index);
  23. void breathing_led_disable_all(void);
  24. void breathing_led_toggle(uint8_t index);
  25. void breathing_led_toggle_all(void);
  26. void breathing_led_set_duration(uint8_t index, uint8_t dur);
  27. void breathing_led_set_duration_all(uint8_t dur);
  28. #else
  29. #define breathing_led_init()
  30. #define breathing_led_enable()
  31. #define breathing_led_enable_all()
  32. #define breathing_led_disable()
  33. #define breathing_led_disable_all()
  34. #define breathing_led_toggle()
  35. #define breathing_led_toggle_all()
  36. #define breathing_led_set_duration()
  37. #define breathing_led_set_duration_all()
  38. #endif
  39. #else
  40. #define softpwm_init()
  41. #define softpwm_led_init()
  42. #define softpwm_led_enable()
  43. #define softpwm_led_disable()
  44. #define softpwm_led_toggle()
  45. #define softpwm_led_set()
  46. #define softpwm_led_set_all()
  47. #define softpwm_led_on()
  48. #define softpwm_led_off()
  49. #define softpwm_led_get_state()
  50. #define softpwm_led_state_change()
  51. #endif
  52. #endif