main.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. * Copyright (c) 2023 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 __MAIN_H
  22. #define __MAIN_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. /* Includes ------------------------------------------------------------------*/
  27. #include "stm32l0xx_hal.h"
  28. /* Private includes ----------------------------------------------------------*/
  29. /* USER CODE BEGIN Includes */
  30. /* USER CODE END Includes */
  31. /* Exported types ------------------------------------------------------------*/
  32. /* USER CODE BEGIN ET */
  33. /* USER CODE END ET */
  34. /* Exported constants --------------------------------------------------------*/
  35. /* USER CODE BEGIN EC */
  36. /* USER CODE END EC */
  37. /* Exported macro ------------------------------------------------------------*/
  38. /* USER CODE BEGIN EM */
  39. /* USER CODE END EM */
  40. /* Exported functions prototypes ---------------------------------------------*/
  41. void Error_Handler(void);
  42. /* USER CODE BEGIN EFP */
  43. /* USER CODE END EFP */
  44. /* Private defines -----------------------------------------------------------*/
  45. #define LD3_Pin GPIO_PIN_1
  46. #define LD3_GPIO_Port GPIOB
  47. #define SPI_SS_Pin GPIO_PIN_8
  48. #define SPI_SS_GPIO_Port GPIOA
  49. #define VCP_TX_Pin GPIO_PIN_9
  50. #define VCP_TX_GPIO_Port GPIOA
  51. #define VCP_RX_Pin GPIO_PIN_10
  52. #define VCP_RX_GPIO_Port GPIOA
  53. #define TMS_Pin GPIO_PIN_13
  54. #define TMS_GPIO_Port GPIOA
  55. #define TCK_Pin GPIO_PIN_14
  56. #define TCK_GPIO_Port GPIOA
  57. #define SPI_INT_Pin GPIO_PIN_15
  58. #define SPI_INT_GPIO_Port GPIOA
  59. #define SPI_INT_EXTI_IRQn EXTI4_15_IRQn
  60. #define ONE_WIRE_Pin GPIO_PIN_4
  61. #define ONE_WIRE_GPIO_Port GPIOB
  62. /* USER CODE BEGIN Private defines */
  63. /* USER CODE END Private defines */
  64. #ifdef __cplusplus
  65. }
  66. #endif
  67. #endif /* __MAIN_H */