main.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. * This notice applies to any and all portions of this file
  9. * that are not between comment pairs USER CODE BEGIN and
  10. * USER CODE END. Other portions of this file, whether
  11. * inserted by the user or by software development tools
  12. * are owned by their respective copyright owners.
  13. *
  14. * Copyright (c) 2019 STMicroelectronics International N.V.
  15. * All rights reserved.
  16. *
  17. * Redistribution and use in source and binary forms, with or without
  18. * modification, are permitted, provided that the following conditions are met:
  19. *
  20. * 1. Redistribution of source code must retain the above copyright notice,
  21. * this list of conditions and the following disclaimer.
  22. * 2. Redistributions in binary form must reproduce the above copyright notice,
  23. * this list of conditions and the following disclaimer in the documentation
  24. * and/or other materials provided with the distribution.
  25. * 3. Neither the name of STMicroelectronics nor the names of other
  26. * contributors to this software may be used to endorse or promote products
  27. * derived from this software without specific written permission.
  28. * 4. This software, including modifications and/or derivative works of this
  29. * software, must execute solely and exclusively on microcontroller or
  30. * microprocessor devices manufactured by or for STMicroelectronics.
  31. * 5. Redistribution and use of this software other than as permitted under
  32. * this license is void and will automatically terminate your rights under
  33. * this license.
  34. *
  35. * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
  36. * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
  37. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  38. * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
  39. * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
  40. * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  41. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  42. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  43. * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  44. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  45. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  46. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  47. *
  48. ******************************************************************************
  49. */
  50. /* USER CODE END Header */
  51. /* Define to prevent recursive inclusion -------------------------------------*/
  52. #ifndef __MAIN_H
  53. #define __MAIN_H
  54. #ifdef __cplusplus
  55. extern "C" {
  56. #endif
  57. /* Includes ------------------------------------------------------------------*/
  58. #include "stm32f7xx_hal.h"
  59. #ifndef IR_ROM1
  60. #define IR_ROM1 0x8000000 //APP1
  61. //#define IR_ROM1 0x8080000 //APP2
  62. #endif
  63. extern uint32_t sd000,sd001;//浮点数转换为实时显示的参数,4字节
  64. extern uint16_t uart4RxCounter; //串口4接收数据计数器
  65. /* Private includes ----------------------------------------------------------*/
  66. /* USER CODE BEGIN Includes */
  67. #define False 0
  68. #define True !False
  69. /* USER CODE END Includes */
  70. /* Exported types ------------------------------------------------------------*/
  71. /* USER CODE BEGIN ET */
  72. /* USER CODE END ET */
  73. /* Exported constants --------------------------------------------------------*/
  74. /* USER CODE BEGIN EC */
  75. /* USER CODE END EC */
  76. /* Exported macro ------------------------------------------------------------*/
  77. /* USER CODE BEGIN EM */
  78. /* USER CODE END EM */
  79. /* Exported functions prototypes ---------------------------------------------*/
  80. void Error_Handler(void);
  81. /* USER CODE BEGIN EFP */
  82. /* USER CODE END EFP */
  83. /* Private defines -----------------------------------------------------------*/
  84. #define BEEP_Pin GPIO_PIN_4
  85. #define BEEP_GPIO_Port GPIOE
  86. #define LED1_Pin GPIO_PIN_5
  87. #define LED1_GPIO_Port GPIOE
  88. #define DWI_Pin GPIO_PIN_2
  89. #define DWI_GPIO_Port GPIOC
  90. #define EN_USART2_Pin GPIO_PIN_1
  91. #define EN_USART2_GPIO_Port GPIOA
  92. #define Collect_TX_Pin GPIO_PIN_2
  93. #define Collect_TX_GPIO_Port GPIOA
  94. #define Collect_RX_Pin GPIO_PIN_3
  95. #define Collect_RX_GPIO_Port GPIOA
  96. #define Feeler_Lever_Pin GPIO_PIN_0
  97. #define Feeler_Lever_GPIO_Port GPIOB
  98. #define Feeler_Lever_EXTI_IRQn EXTI0_IRQn
  99. #define LED2_Pin GPIO_PIN_7
  100. #define LED2_GPIO_Port GPIOE
  101. #define LED3_Pin GPIO_PIN_8
  102. #define LED3_GPIO_Port GPIOE
  103. #define LED4_Pin GPIO_PIN_9
  104. #define LED4_GPIO_Port GPIOE
  105. #define LED5_Pin GPIO_PIN_10
  106. #define LED5_GPIO_Port GPIOE
  107. #define SPI4_FM25_NSS_Pin GPIO_PIN_11
  108. #define SPI4_FM25_NSS_GPIO_Port GPIOE
  109. #define SPI4_FM25_SCK_Pin GPIO_PIN_12
  110. #define SPI4_FM25_SCK_GPIO_Port GPIOE
  111. #define SPI4_FM25_MISO_Pin GPIO_PIN_13
  112. #define SPI4_FM25_MISO_GPIO_Port GPIOE
  113. #define SPI4_FM25_MOSI_Pin GPIO_PIN_14
  114. #define SPI4_FM25_MOSI_GPIO_Port GPIOE
  115. #define EN_USART3_Pin GPIO_PIN_15
  116. #define EN_USART3_GPIO_Port GPIOE
  117. #define Screen_TX_Pin GPIO_PIN_10
  118. #define Screen_TX_GPIO_Port GPIOB
  119. #define Screen_RX_Pin GPIO_PIN_11
  120. #define Screen_RX_GPIO_Port GPIOB
  121. #define Key10_Pin GPIO_PIN_10
  122. #define Key10_GPIO_Port GPIOD
  123. #define Key10_EXTI_IRQn EXTI15_10_IRQn
  124. #define Key11_Pin GPIO_PIN_11
  125. #define Key11_GPIO_Port GPIOD
  126. #define Key11_EXTI_IRQn EXTI15_10_IRQn
  127. #define Key12_Pin GPIO_PIN_12
  128. #define Key12_GPIO_Port GPIOD
  129. #define Key12_EXTI_IRQn EXTI15_10_IRQn
  130. #define Key13_Pin GPIO_PIN_13
  131. #define Key13_GPIO_Port GPIOD
  132. #define Key13_EXTI_IRQn EXTI15_10_IRQn
  133. #define EN_USART1_Pin GPIO_PIN_8
  134. #define EN_USART1_GPIO_Port GPIOC
  135. #define Terminal_TX_Pin GPIO_PIN_9
  136. #define Terminal_TX_GPIO_Port GPIOA
  137. #define Terminal_RX_Pin GPIO_PIN_10
  138. #define Terminal_RX_GPIO_Port GPIOA
  139. #define Key_TX_Pin GPIO_PIN_10
  140. #define Key_TX_GPIO_Port GPIOC
  141. #define Key_RX_Pin GPIO_PIN_11
  142. #define Key_RX_GPIO_Port GPIOC
  143. #define EN_USART4_Pin GPIO_PIN_0
  144. #define EN_USART4_GPIO_Port GPIOD
  145. /* USER CODE BEGIN Private defines */
  146. extern uint8_t StoreNumber,all_Store;
  147. /* USER CODE END Private defines */
  148. #ifdef __cplusplus
  149. }
  150. #endif
  151. #endif /* __MAIN_H */
  152. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/