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) 2018 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 52 /* Define to prevent recursive inclusion -------------------------------------*/ 53 #ifndef __MAIN_H 54 #define __MAIN_H 55 56 #ifdef __cplusplus 57 extern "C" { 58 #endif 59 60 /* Includes ------------------------------------------------------------------*/ 61 #include "stm32f4xx_hal.h" 62 63 /* Private includes ----------------------------------------------------------*/ 64 /* USER CODE BEGIN Includes */ 65 66 /* USER CODE END Includes */ 67 68 /* Exported types ------------------------------------------------------------*/ 69 /* USER CODE BEGIN ET */ 70 71 /* USER CODE END ET */ 72 73 /* Exported constants --------------------------------------------------------*/ 74 /* USER CODE BEGIN EC */ 75 76 /* USER CODE END EC */ 77 78 /* Exported macro ------------------------------------------------------------*/ 79 /* USER CODE BEGIN EM */ 80 81 /* USER CODE END EM */ 82 83 /* Exported functions prototypes ---------------------------------------------*/ 84 void Error_Handler(void); 85 86 /* USER CODE BEGIN EFP */ 87 88 /* USER CODE END EFP */ 89 90 /* Private defines -----------------------------------------------------------*/ 91 #define PH0_OSC_IN_Pin GPIO_PIN_0 92 #define PH0_OSC_IN_GPIO_Port GPIOH 93 #define PH1_OSC_OUT_Pin GPIO_PIN_1 94 #define PH1_OSC_OUT_GPIO_Port GPIOH 95 #define SPI1_SCK_Pin GPIO_PIN_5 96 #define SPI1_SCK_GPIO_Port GPIOA 97 #define SPI1_MISO_Pin GPIO_PIN_6 98 #define SPI1_MISO_GPIO_Port GPIOA 99 #define SPI1_MOSI_Pin GPIO_PIN_7 100 #define SPI1_MOSI_GPIO_Port GPIOA 101 #define SWDIO_Pin GPIO_PIN_13 102 #define SWDIO_GPIO_Port GPIOA 103 #define SWCLK_Pin GPIO_PIN_14 104 #define SWCLK_GPIO_Port GPIOA 105 #define SWO_Pin GPIO_PIN_3 106 #define SWO_GPIO_Port GPIOB 107 /* USER CODE BEGIN Private defines */ 108 109 /* USER CODE END Private defines */ 110 111 #ifdef __cplusplus 112 } 113 #endif 114 115 #endif /* __MAIN_H */ 116 117 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 118