api-hal-resources.h 758 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #include <stm32wbxx.h>
  3. #include <stm32wbxx_ll_gpio.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #define POWER_I2C_SCL_Pin LL_GPIO_PIN_9
  8. #define POWER_I2C_SCL_GPIO_Port GPIOA
  9. #define POWER_I2C_SDA_Pin LL_GPIO_PIN_10
  10. #define POWER_I2C_SDA_GPIO_Port GPIOA
  11. #define POWER_I2C I2C1
  12. /* Timing register value is computed with the STM32CubeMX Tool,
  13. * Fast Mode @100kHz with I2CCLK = 64 MHz,
  14. * rise time = 0ns, fall time = 0ns
  15. */
  16. #define POWER_I2C_TIMINGS 0x10707DBC
  17. /* Input Keys */
  18. typedef enum {
  19. InputKeyUp,
  20. InputKeyDown,
  21. InputKeyRight,
  22. InputKeyLeft,
  23. InputKeyOk,
  24. InputKeyBack,
  25. } InputKey;
  26. /* Light */
  27. typedef enum {
  28. LightRed,
  29. LightGreen,
  30. LightBlue,
  31. LightBacklight,
  32. } Light;
  33. #ifdef __cplusplus
  34. }
  35. #endif