gpio.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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) 2020 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. /* USER CODE END Private defines */
  43. void MX_GPIO_Init(void);
  44. /* USER CODE BEGIN Prototypes */
  45. extern void Relay_Action_Set(uint8_t action);
  46. extern uint8_t Relay1_Action_Get(void);
  47. extern uint8_t Relay2_Action_Get(void);
  48. extern void getGridTypeSwitchSetting(void) ;
  49. extern uint8_t is_Relay1_First;
  50. /* USER CODE END Prototypes */
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54. #endif /*__ pinoutConfig_H */
  55. /**
  56. * @}
  57. */
  58. /**
  59. * @}
  60. */
  61. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/