gpio.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /**
  2. ******************************************************************************
  3. * File Name : gpio.h
  4. * Description : This file contains all the functions prototypes for
  5. * the gpio
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2023 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under Ultimate Liberty license
  13. * SLA0044, the "License"; You may not use this file except in compliance with
  14. * the License. You may obtain a copy of the License at:
  15. * www.st.com/SLA0044
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef __gpio_H
  21. #define __gpio_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "main.h"
  27. /* USER CODE BEGIN Includes */
  28. /* USER CODE END Includes */
  29. /* USER CODE BEGIN Private defines */
  30. #define GPIO_RELAY_ACTION_OFF 0
  31. #define GPIO_RELAY_ACTION_ON 1
  32. #define GPIO_RELAY_ACTION_HOLD 2
  33. #define GPIO_RELAY_ACTION_UNKNOW 3
  34. #define GPIO_RELAY1_ACTION_OFF 0
  35. #define GPIO_RELAY1_ACTION_ON 1
  36. #define GPIO_RELAY1_ACTION_HOLD 2
  37. #define GPIO_RELAY1_ACTION_UNKNOW 3
  38. #define GPIO_RELAY2_ACTION_OFF 4
  39. #define GPIO_RELAY2_ACTION_ON 5
  40. #define GPIO_RELAY2_ACTION_HOLD 6
  41. #define GPIO_RELAY2_ACTION_UNKNOW 7
  42. //-------------------------------------
  43. #ifdef FUNC_OUTP_TYPE_E
  44. #define GPIO_SE_RELAY_ACTION_OFF 0
  45. #define GPIO_SE_RELAY_ACTION_ON 1
  46. #define GPIO_SE_RELAY_ACTION_HOLD 2
  47. #define GPIO_SE_RELAY_ACTION_UNKNOW 3
  48. #define GPIO_SE_RELAY1_ACTION_OFF 0
  49. #define GPIO_SE_RELAY1_ACTION_ON 1
  50. #define GPIO_SE_RELAY1_ACTION_HOLD 2
  51. #define GPIO_SE_RELAY1_ACTION_UNKNOW 3
  52. #endif //FUNC_OUTP_TYPE_E
  53. /* USER CODE END Private defines */
  54. void MX_GPIO_Init(void);
  55. /* USER CODE BEGIN Prototypes */
  56. extern void Relay_Action_Set(uint8_t action);
  57. extern uint8_t Relay1_Action_Get(void);
  58. extern uint8_t Relay2_Action_Get(void);
  59. extern void getGridTypeSwitchSetting(void) ;
  60. #ifdef FUNC_OUTP_TYPE_E
  61. extern void SE_Relay_Action_Set(uint8_t action);
  62. extern uint8_t SE_Relay1_Action_Get(void);
  63. #endif //FUNC_OUTP_TYPE_E
  64. //extern uint8_t is_Relay1_First; //no used
  65. /* USER CODE END Prototypes */
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69. #endif /*__ pinoutConfig_H */
  70. /**
  71. * @}
  72. */
  73. /**
  74. * @}
  75. */
  76. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/