api-hal-resources.h 781 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. #include "main.h"
  3. #include <furi.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /* Input Related Constants */
  8. #define INPUT_DEBOUNCE_TICKS 20
  9. /* Input Keys */
  10. typedef enum {
  11. InputKeyUp,
  12. InputKeyDown,
  13. InputKeyRight,
  14. InputKeyLeft,
  15. InputKeyOk,
  16. InputKeyBack,
  17. } InputKey;
  18. /* Light */
  19. typedef enum {
  20. LightRed,
  21. LightGreen,
  22. LightBlue,
  23. LightBacklight,
  24. } Light;
  25. typedef struct {
  26. const GPIO_TypeDef* port;
  27. const uint16_t pin;
  28. const InputKey key;
  29. const bool inverted;
  30. } InputPin;
  31. extern const InputPin input_pins[];
  32. extern const size_t input_pins_count;
  33. extern const GpioPin sd_cs_gpio;
  34. extern const GpioPin vibro_gpio;
  35. extern const GpioPin ibutton_gpio;
  36. extern const GpioPin cc1101_g0_gpio;
  37. #ifdef __cplusplus
  38. }
  39. #endif