gpio.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file gpio.h
  5. * @brief This file contains all the function prototypes for
  6. * the gpio.c file
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2025 STMicroelectronics.
  11. * All rights reserved.
  12. *
  13. * This software is licensed under terms that can be found in the LICENSE file
  14. * in the root directory of this software component.
  15. * If no LICENSE file comes with this software, it is provided AS-IS.
  16. *
  17. ******************************************************************************
  18. */
  19. /* USER CODE END Header */
  20. /* Define to prevent recursive inclusion -------------------------------------*/
  21. #ifndef __GPIO_H__
  22. #define __GPIO_H__
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. /* Includes ------------------------------------------------------------------*/
  27. #include "main.h"
  28. /* USER CODE BEGIN Includes */
  29. /* USER CODE END Includes */
  30. /* USER CODE BEGIN Private defines */
  31. /* USER CODE END Private defines */
  32. void MX_GPIO_Init(void);
  33. /* USER CODE BEGIN Prototypes */
  34. #define BRAKE_R_SET_0 HAL_GPIO_WritePin(GPIOB,GPIO_PIN_3,GPIO_PIN_RESET);
  35. #define BRAKE_L_SET_0 HAL_GPIO_WritePin(GPIOC,GPIO_PIN_4,GPIO_PIN_RESET);
  36. #define BRAKE_R_SET_1 HAL_GPIO_WritePin(GPIOB,GPIO_PIN_3,GPIO_PIN_SET);
  37. #define BRAKE_L_SET_1 HAL_GPIO_WritePin(GPIOC,GPIO_PIN_4,GPIO_PIN_SET);
  38. #define BRAKE_R HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_2)
  39. #define BRAKE_L HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_3)
  40. /* USER CODE END Prototypes */
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif /*__ GPIO_H__ */