api-hal-resources.c 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. #include <api-hal-resources.h>
  2. #include "main.h"
  3. #include <furi.h>
  4. const InputPin input_pins[] = {
  5. {.port = BUTTON_UP_GPIO_Port, .pin = BUTTON_UP_Pin, .key = InputKeyUp, .inverted = true},
  6. {.port = BUTTON_DOWN_GPIO_Port,
  7. .pin = BUTTON_DOWN_Pin,
  8. .key = InputKeyDown,
  9. .inverted = true},
  10. {.port = BUTTON_RIGHT_GPIO_Port,
  11. .pin = BUTTON_RIGHT_Pin,
  12. .key = InputKeyRight,
  13. .inverted = true},
  14. {.port = BUTTON_LEFT_GPIO_Port,
  15. .pin = BUTTON_LEFT_Pin,
  16. .key = InputKeyLeft,
  17. .inverted = true},
  18. {.port = BUTTON_OK_GPIO_Port, .pin = BUTTON_OK_Pin, .key = InputKeyOk, .inverted = false},
  19. {.port = BUTTON_BACK_GPIO_Port,
  20. .pin = BUTTON_BACK_Pin,
  21. .key = InputKeyBack,
  22. .inverted = true},
  23. };
  24. const size_t input_pins_count = sizeof(input_pins) / sizeof(InputPin);
  25. const GpioPin sd_cs_gpio = {SD_CS_GPIO_Port, SD_CS_Pin};
  26. const GpioPin vibro_gpio = {VIBRO_GPIO_Port, VIBRO_Pin};
  27. const GpioPin ibutton_gpio = {iBTN_GPIO_Port, iBTN_Pin};
  28. const GpioPin cc1101_g0_gpio = {CC1101_G0_GPIO_Port, CC1101_G0_Pin};