/platform/board/board_legacy/developerkit-mk/Inc/main.h

https://github.com/alibaba/AliOS-Things · C Header · 140 lines · 75 code · 13 blank · 52 comment · 0 complexity · 8f4511dc9ded5e8036f32942569f4daf MD5 · raw file

  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
  14. *
  15. * Redistribution and use in source and binary forms, with or without modification,
  16. * are permitted provided that the following conditions are met:
  17. * 1. Redistributions of source code must retain the above copyright notice,
  18. * this list of conditions and the following disclaimer.
  19. * 2. Redistributions in binary form must reproduce the above copyright notice,
  20. * this list of conditions and the following disclaimer in the documentation
  21. * and/or other materials provided with the distribution.
  22. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  23. * may be used to endorse or promote products derived from this software
  24. * without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  27. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  29. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  30. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  31. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  32. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  33. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  34. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  35. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  36. *
  37. ******************************************************************************
  38. */
  39. /* Define to prevent recursive inclusion -------------------------------------*/
  40. #ifndef __MAIN_H__
  41. #define __MAIN_H__
  42. /* Includes ------------------------------------------------------------------*/
  43. #include "stm32l4xx_hal.h"
  44. /* USER CODE BEGIN Includes */
  45. /* USER CODE END Includes */
  46. /* Private define ------------------------------------------------------------*/
  47. #define SIM_DET_Pin GPIO_PIN_2
  48. #define SIM_DET_GPIO_Port GPIOE
  49. #define GS_LED_Pin GPIO_PIN_3
  50. #define GS_LED_GPIO_Port GPIOE
  51. #define PCIE_RST_Pin GPIO_PIN_13
  52. #define PCIE_RST_GPIO_Port GPIOC
  53. #define SECURE_IO_Pin GPIO_PIN_0
  54. #define SECURE_IO_GPIO_Port GPIOA
  55. #define SECURE_RST_Pin GPIO_PIN_1
  56. #define SECURE_RST_GPIO_Port GPIOA
  57. #define LCD_DCX_Pin GPIO_PIN_6
  58. #define LCD_DCX_GPIO_Port GPIOA
  59. #define WIFI_RST_Pin GPIO_PIN_0
  60. #define WIFI_RST_GPIO_Port GPIOB
  61. #define WIFI_WU_Pin GPIO_PIN_1
  62. #define WIFI_WU_GPIO_Port GPIOB
  63. #define LCD_RST_Pin GPIO_PIN_2
  64. #define LCD_RST_GPIO_Port GPIOB
  65. #define LCD_PWR_Pin GPIO_PIN_7
  66. #define LCD_PWR_GPIO_Port GPIOE
  67. #define ZIGBEE_INT_Pin GPIO_PIN_8
  68. #define ZIGBEE_INT_GPIO_Port GPIOE
  69. #define ZIGBEE_INT_EXTI_IRQn EXTI9_5_IRQn
  70. #define IR_IN_Pin GPIO_PIN_9
  71. #define IR_IN_GPIO_Port GPIOE
  72. #define KEY_3_Pin GPIO_PIN_10
  73. #define KEY_3_GPIO_Port GPIOE
  74. #define KEY_3_EXTI_IRQn EXTI15_10_IRQn
  75. #define KEY_1_Pin GPIO_PIN_11
  76. #define KEY_1_GPIO_Port GPIOE
  77. #define KEY_1_EXTI_IRQn EXTI15_10_IRQn
  78. #define CAM_PD_Pin GPIO_PIN_13
  79. #define CAM_PD_GPIO_Port GPIOE
  80. #define KEY_2_Pin GPIO_PIN_14
  81. #define KEY_2_GPIO_Port GPIOE
  82. #define KEY_2_EXTI_IRQn EXTI15_10_IRQn
  83. #define SECURE_CLK_Pin GPIO_PIN_15
  84. #define SECURE_CLK_GPIO_Port GPIOE
  85. #define HTS_LED_Pin GPIO_PIN_11
  86. #define HTS_LED_GPIO_Port GPIOD
  87. #define PS_LED_Pin GPIO_PIN_14
  88. #define PS_LED_GPIO_Port GPIOD
  89. #define COMPASS_LED_Pin GPIO_PIN_15
  90. #define COMPASS_LED_GPIO_Port GPIOD
  91. #define CAM_MCLK_Pin GPIO_PIN_8
  92. #define CAM_MCLK_GPIO_Port GPIOA
  93. #define ALS_INT_Pin GPIO_PIN_15
  94. #define ALS_INT_GPIO_Port GPIOA
  95. #define ALS_INT_EXTI_IRQn EXTI15_10_IRQn
  96. #define AUDIO_WU_Pin GPIO_PIN_4
  97. #define AUDIO_WU_GPIO_Port GPIOD
  98. #define AUDIO_CTL_Pin GPIO_PIN_5
  99. #define AUDIO_CTL_GPIO_Port GPIOD
  100. #define AUDIO_RST_Pin GPIO_PIN_6
  101. #define AUDIO_RST_GPIO_Port GPIOD
  102. #define ZIGBEE_RST_Pin GPIO_PIN_7
  103. #define ZIGBEE_RST_GPIO_Port GPIOD
  104. #define USB_PCIE_SW_Pin GPIO_PIN_5
  105. #define USB_PCIE_SW_GPIO_Port GPIOB
  106. #define ALS_LED_Pin GPIO_PIN_6
  107. #define ALS_LED_GPIO_Port GPIOB
  108. #define CAM_RST_Pin GPIO_PIN_8
  109. #define CAM_RST_GPIO_Port GPIOB
  110. /* ########################## Assert Selection ############################## */
  111. /**
  112. * @brief Uncomment the line below to expanse the "assert_param" macro in the
  113. * HAL drivers code
  114. */
  115. /* #define USE_FULL_ASSERT 1U */
  116. /* USER CODE BEGIN Private defines */
  117. /* USER CODE END Private defines */
  118. #ifdef __cplusplus
  119. extern "C" {
  120. #endif
  121. void _Error_Handler(char *, int);
  122. #define Error_Handler() _Error_Handler(__FILE__, __LINE__)
  123. #ifdef __cplusplus
  124. }
  125. #endif
  126. #endif /* __MAIN_H__ */
  127. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/