led.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (C) 2023 Daniele Lacamera <root@danielinux.net>
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU Lesser General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef INCLUDE_LED_H
  18. #define INCLUDE_LED_H
  19. #include <stdint.h>
  20. /* A15, G7, B4, G6, C6, C7 */
  21. #define LD0 ((uint32_t)(1 << 15))
  22. #define LD1 ((uint32_t)(1 << 7))
  23. #define LD2 ((uint32_t)(1 << 4))
  24. #define LD3 ((uint32_t)(1 << 6))
  25. #define LD4 ((uint32_t)(1 << 6))
  26. #define LD5 ((uint32_t)(1 << 7))
  27. void led_init(void);
  28. void uled_on(int led);
  29. void uled_off(int led);
  30. void uled_bincount(uint8_t x);
  31. #endif