main.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /**
  2. ******************************************************************************
  3. * @file : main.h
  4. * @brief : Header for main.c file.
  5. * This file contains the common defines of the application.
  6. ******************************************************************************
  7. * This notice applies to any and all portions of this file
  8. * that are not between comment pairs USER CODE BEGIN and
  9. * USER CODE END. Other portions of this file, whether
  10. * inserted by the user or by software development tools
  11. * are owned by their respective copyright owners.
  12. *
  13. * Copyright (c) 2018 STMicroelectronics International N.V.
  14. * All rights reserved.
  15. *
  16. * Redistribution and use in source and binary forms, with or without
  17. * modification, are permitted, provided that the following conditions are met:
  18. *
  19. * 1. Redistribution of source code must retain the above copyright notice,
  20. * this list of conditions and the following disclaimer.
  21. * 2. Redistributions in binary form must reproduce the above copyright notice,
  22. * this list of conditions and the following disclaimer in the documentation
  23. * and/or other materials provided with the distribution.
  24. * 3. Neither the name of STMicroelectronics nor the names of other
  25. * contributors to this software may be used to endorse or promote products
  26. * derived from this software without specific written permission.
  27. * 4. This software, including modifications and/or derivative works of this
  28. * software, must execute solely and exclusively on microcontroller or
  29. * microprocessor devices manufactured by or for STMicroelectronics.
  30. * 5. Redistribution and use of this software other than as permitted under
  31. * this license is void and will automatically terminate your rights under
  32. * this license.
  33. *
  34. * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
  35. * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
  36. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  37. * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
  38. * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
  39. * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  40. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  41. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  42. * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  43. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  44. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  45. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  46. *
  47. ******************************************************************************
  48. */
  49. /* Define to prevent recursive inclusion -------------------------------------*/
  50. #ifndef __MAIN_H__
  51. #define __MAIN_H__
  52. /* Includes ------------------------------------------------------------------*/
  53. #include "stm32f4xx_hal.h"
  54. /* USER CODE BEGIN Includes */
  55. /* USER CODE END Includes */
  56. /* Private define ------------------------------------------------------------*/
  57. #define USER_Btn_Pin GPIO_PIN_13
  58. #define USER_Btn_GPIO_Port GPIOC
  59. #define MCO_Pin GPIO_PIN_0
  60. #define MCO_GPIO_Port GPIOH
  61. #define RMII_MDC_Pin GPIO_PIN_1
  62. #define RMII_MDC_GPIO_Port GPIOC
  63. #define RMII_MDIO_Pin GPIO_PIN_2
  64. #define RMII_MDIO_GPIO_Port GPIOA
  65. #define PT1000_Pin GPIO_PIN_3
  66. #define PT1000_GPIO_Port GPIOA
  67. #define RMII_RXD0_Pin GPIO_PIN_4
  68. #define RMII_RXD0_GPIO_Port GPIOC
  69. #define RMII_RXD1_Pin GPIO_PIN_5
  70. #define RMII_RXD1_GPIO_Port GPIOC
  71. #define STLK_RX_Pin GPIO_PIN_10
  72. #define STLK_RX_GPIO_Port GPIOB
  73. #define STLK_TX_Pin GPIO_PIN_11
  74. #define STLK_TX_GPIO_Port GPIOB
  75. #define RMII_TXD1_Pin GPIO_PIN_13
  76. #define RMII_TXD1_GPIO_Port GPIOB
  77. #define USB_PowerSwitchOn_Pin GPIO_PIN_6
  78. #define USB_PowerSwitchOn_GPIO_Port GPIOG
  79. #define USB_OverCurrent_Pin GPIO_PIN_7
  80. #define USB_OverCurrent_GPIO_Port GPIOG
  81. #define CS_Druck_Pin GPIO_PIN_8
  82. #define CS_Druck_GPIO_Port GPIOG
  83. #define USB_SOF_Pin GPIO_PIN_8
  84. #define USB_SOF_GPIO_Port GPIOA
  85. #define USB_VBUS_Pin GPIO_PIN_9
  86. #define USB_VBUS_GPIO_Port GPIOA
  87. #define USB_ID_Pin GPIO_PIN_10
  88. #define USB_ID_GPIO_Port GPIOA
  89. #define USB_DM_Pin GPIO_PIN_11
  90. #define USB_DM_GPIO_Port GPIOA
  91. #define TMS_Pin GPIO_PIN_13
  92. #define TMS_GPIO_Port GPIOA
  93. #define TCK_Pin GPIO_PIN_14
  94. #define TCK_GPIO_Port GPIOA
  95. #define RMII_TX_EN_Pin GPIO_PIN_11
  96. #define RMII_TX_EN_GPIO_Port GPIOG
  97. #define SD_EN_2_Pin GPIO_PIN_12
  98. #define SD_EN_2_GPIO_Port GPIOG
  99. #define RMII_TXD0_Pin GPIO_PIN_13
  100. #define RMII_TXD0_GPIO_Port GPIOG
  101. #define SD_EN_1_Pin GPIO_PIN_14
  102. #define SD_EN_1_GPIO_Port GPIOG
  103. /* ########################## Assert Selection ############################## */
  104. /**
  105. * @brief Uncomment the line below to expanse the "assert_param" macro in the
  106. * HAL drivers code
  107. */
  108. /* #define USE_FULL_ASSERT 1U */
  109. /* USER CODE BEGIN Private defines */
  110. /* USER CODE END Private defines */
  111. #ifdef __cplusplus
  112. extern "C" {
  113. #endif
  114. void _Error_Handler(char *, int);
  115. #define Error_Handler() _Error_Handler(__FILE__, __LINE__)
  116. #ifdef __cplusplus
  117. }
  118. #endif
  119. #endif /* __MAIN_H__ */
  120. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/