/** ****************************************************************************** * @file : main.h * @brief : Header for main.c file. * This file contains the common defines of the application. ****************************************************************************** * This notice applies to any and all portions of this file * that are not between comment pairs USER CODE BEGIN and * USER CODE END. Other portions of this file, whether * inserted by the user or by software development tools * are owned by their respective copyright owners. * * Copyright (c) 2018 STMicroelectronics International N.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted, provided that the following conditions are met: * * 1. Redistribution of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of STMicroelectronics nor the names of other * contributors to this software may be used to endorse or promote products * derived from this software without specific written permission. * 4. This software, including modifications and/or derivative works of this * software, must execute solely and exclusively on microcontroller or * microprocessor devices manufactured by or for STMicroelectronics. * 5. Redistribution and use of this software other than as permitted under * this license is void and will automatically terminate your rights under * this license. * * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __MAIN_H__ #define __MAIN_H__ /* Includes ------------------------------------------------------------------*/ #include "stm32f7xx_hal.h" #include "stm32756g_eval_lcd.h" #include "sram.h" //#include "my.h" /* USER CODE BEGIN Includes */ #define ABS(X) ((X) > 0 ? (X) : -(X)) /* USER CODE END Includes */ /* Private define ------------------------------------------------------------*/ #define BL_ENABLE_Pin GPIO_PIN_2 #define BL_ENABLE_GPIO_Port GPIOA #define U1_Pin GPIO_PIN_3 #define U1_GPIO_Port GPIOE #define U2_Pin GPIO_PIN_4 #define U2_GPIO_Port GPIOE #define U3_Pin GPIO_PIN_5 #define U3_GPIO_Port GPIOE #define K1_Pin GPIO_PIN_9 #define K1_GPIO_Port GPIOA #define ON_Pin GPIO_PIN_8 #define ON_GPIO_Port GPIOF #define ON1_Pin GPIO_PIN_5 #define ON1_GPIO_Port GPIOF #define RE_Pin GPIO_PIN_9 #define RE_GPIO_Port GPIOF #define OFF_Pin GPIO_PIN_0 #define OFF_GPIO_Port GPIOA #define RESET_Pin GPIO_PIN_6 #define RESET_GPIO_Port GPIOD #define DISP_ON_Pin GPIO_PIN_8 #define DISP_ON_GPIO_Port GPIOA /* ########################## Assert Selection ############################## */ /** * @brief Uncomment the line below to expanse the "assert_param" macro in the * HAL drivers code */ #define USE_FULL_ASSERT 1U /* USER CODE BEGIN Private defines */ #define GPIO_A GPIOA #define GPIO_B GPIOB #define GPIO_C GPIOC #define GPIO_D GPIOD #define GPIO_E GPIOE #define GPIO_F GPIOF #define GPIO_G GPIOG ///////////////// Pins PortA ////////////////// //#define OFF_Pin GPIO_PIN_0 //#define OFF GPIOA, OFF_Pin #define SC_Pin GPIO_PIN_5 #define SC GPIO_A, SC_Pin #define AMP6_Pin GPIO_PIN_7 #define AMP6 GPIO_A, AMP6_Pin #define DISP_ON GPIO_A, DISP_ON_Pin #define K1 GPIO_A, K1_Pin #define K2 GPIO_A, K2_Pin //--------------------------------------------// ///////////////// Pins Port B ////////////////// #define AMP0_Pin GPIO_PIN_2 #define AMP0 GPIOB, A0_Pin #define AMP1_Pin GPIO_PIN_3 #define AMP1 GPIOB, A1_Pin #define SD_Pin GPIO_PIN_4 #define SD GPIOB, SD_Pin #define AMP8_Pin GPIO_PIN_6 #define AMP8 GPIOB, A8_Pin #define AMP7_Pin GPIO_PIN_7 #define AMP7 GPIOB, A7_Pin #define SD_DETECT GPIOB, SD_DETECT_Pin #define VBUS_Pin GPIO_PIN_13 #define VBUS GPIOB, VBUS_Pin //--------------------------------------------// ///////////////// Pins Port C ////////////////// #define CS_DISP_Pin GPIO_PIN_0 #define CS_DISP GPIOC, CS_DISP_Pin #define AMP2_Pin GPIO_PIN_1 #define AMP2 GPIOC, AMP2_Pin #define AMP3_Pin GPIO_PIN_2 #define AMP3 GPIOC, AMP3_Pin #define AMP4_Pin GPIO_PIN_3 #define AMP4 GPIOC, AMP4_Pin #define AMP5_Pin GPIO_PIN_4 #define AMP5 GPIOC, AMP5_Pin #define LASER_Pin GPIO_PIN_13 #define LASER GPIOC, LASER_Pin //--------------------------------------------// ///////////////// Pins Port D ////////////////// #define RES_Pin GPIO_PIN_6 #define RES GPIOD, RES_Pin //--------------------------------------------// ///////////////// Pins Port E ////////////////// #define U2_Pin GPIO_PIN_4 #define U2 GPIOE, U2_Pin #define U3_Pin GPIO_PIN_5 #define U3 GPIOE, U3_Pin //--------------------------------------------// ///////////////// Pins Port F ////////////////// #define RX_Pin GPIO_PIN_6 #define RX GPIOF, RX_Pin #define TX_Pin GPIO_PIN_7 #define TX GPIOF, TX_Pin /*#define ON_Pin GPIO_PIN_8 #define ON GPIOF, ON_Pin*/ #define DISPON_Pin GPIO_PIN_10 #define DISPON GPIOF, DISPON_Pin //--------------------------------------------// ///////////////// Pins PORT G ////////////////// #define ZAR GPIOG, ZAR_Pin /* USER CODE END Private defines */ #ifdef __cplusplus extern "C" { #endif //void _Error_Handler(char *, int); void Error_Handler(void); //#define Error_Handler() _Error_Handler(__FILE__, __LINE__) #ifdef __cplusplus } #endif #endif /* __MAIN_H__ */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/