main.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file : main.h
  5. * @brief : Header for main.c file.
  6. * This file contains the common defines of the application.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
  11. * All rights reserved.</center></h2>
  12. *
  13. * This software component is licensed by ST under BSD 3-Clause license,
  14. * the "License"; You may not use this file except in compliance with the
  15. * License. You may obtain a copy of the License at:
  16. * opensource.org/licenses/BSD-3-Clause
  17. *
  18. ******************************************************************************
  19. */
  20. /* USER CODE END Header */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __MAIN_H
  23. #define __MAIN_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Includes ------------------------------------------------------------------*/
  28. #include "stm32f4xx_hal.h"
  29. /* Private includes ----------------------------------------------------------*/
  30. /* USER CODE BEGIN Includes */
  31. #include "st7735.h"
  32. /* USER CODE END Includes */
  33. /* Exported types ------------------------------------------------------------*/
  34. /* USER CODE BEGIN ET */
  35. /* USER CODE END ET */
  36. /* Exported constants --------------------------------------------------------*/
  37. /* USER CODE BEGIN EC */
  38. /* USER CODE END EC */
  39. /* Exported macro ------------------------------------------------------------*/
  40. /* USER CODE BEGIN EM */
  41. /* USER CODE END EM */
  42. /* Exported functions prototypes ---------------------------------------------*/
  43. void Error_Handler(void);
  44. /* USER CODE BEGIN EFP */
  45. void LED_TurnOn(uint8_t);
  46. void LED_TurnOff(uint8_t);
  47. void LED_Toggle(uint8_t);
  48. /* USER CODE END EFP */
  49. /* Private defines -----------------------------------------------------------*/
  50. /* USER CODE BEGIN Private defines */
  51. enum LED_Colors { LED_BLUE=0, LED_GREEN, LED_YELLOW };
  52. enum BTN_Positions { BTN_LEFT, BTN_RIGHT, BTN_UP, BTN_DOWN, BTN_CENTER };
  53. #define LM73_I2C_ADDR 0x92
  54. #define SIPM_VBR 24650
  55. #define SIPM_OVER_MIN 1000
  56. #define SIPM_OVER_MAX 5000
  57. /* USER CODE END Private defines */
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif /* __MAIN_H */
  62. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/