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