Mercurial > public > ostc4
comparison Discovery/Inc/ostc.h @ 38:5f11787b4f42
include in ostc4 repository
| author | heinrichsweikamp |
|---|---|
| date | Sat, 28 Apr 2018 11:52:34 +0200 |
| parents | |
| children | 37ee61f93124 |
comparison
equal
deleted
inserted
replaced
| 37:ccc45c0e1ea2 | 38:5f11787b4f42 |
|---|---|
| 1 /////////////////////////////////////////////////////////////////////////////// | |
| 2 /// -*- coding: UTF-8 -*- | |
| 3 /// | |
| 4 /// \file Discovery/Inc/ostc.h | |
| 5 /// \brief Hardware specific configuration | |
| 6 /// \author heinrichs weikamp gmbh | |
| 7 /// \date 05-Dec-2014 | |
| 8 /// | |
| 9 /// $Id$ | |
| 10 /////////////////////////////////////////////////////////////////////////////// | |
| 11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh | |
| 12 /// | |
| 13 /// This program is free software: you can redistribute it and/or modify | |
| 14 /// it under the terms of the GNU General Public License as published by | |
| 15 /// the Free Software Foundation, either version 3 of the License, or | |
| 16 /// (at your option) any later version. | |
| 17 /// | |
| 18 /// This program is distributed in the hope that it will be useful, | |
| 19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 21 /// GNU General Public License for more details. | |
| 22 /// | |
| 23 /// You should have received a copy of the GNU General Public License | |
| 24 /// along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 25 ////////////////////////////////////////////////////////////////////////////// | |
| 26 | |
| 27 /* Define to prevent recursive inclusion -------------------------------------*/ | |
| 28 #ifndef OSTC_H | |
| 29 #define OSTC_H | |
| 30 | |
| 31 //#define OSTC_ON_DISCOVERY_HARDWARE | |
| 32 | |
| 33 /* Includes ------------------------------------------------------------------*/ | |
| 34 //#include "stm32f4xx_hal_conf.h" | |
| 35 #include "stm32f4xx_hal.h" | |
| 36 #include "stm32f4xx_hal_spi.h" | |
| 37 | |
| 38 #ifdef OSTC_ON_DISCOVERY_HARDWARE | |
| 39 #include "ostc_discovery.h" | |
| 40 #else | |
| 41 #include "ostc_hw2.h" | |
| 42 // #include "ostc_hw1.h" | |
| 43 #endif | |
| 44 | |
| 45 #define SDRAM_TIMEOUT ((uint32_t)0xFFFF) | |
| 46 #define SDRAM_MEMORY_WIDTH FMC_SDRAM_MEM_BUS_WIDTH_16 | |
| 47 #define SDCLOCK_PERIOD FMC_SDRAM_CLOCK_PERIOD_3 | |
| 48 #define SDRAM_MODEREG_BURST_LENGTH_1 ((uint16_t)0x0000) | |
| 49 #define SDRAM_MODEREG_BURST_LENGTH_2 ((uint16_t)0x0001) | |
| 50 #define SDRAM_MODEREG_BURST_LENGTH_4 ((uint16_t)0x0002) | |
| 51 #define SDRAM_MODEREG_BURST_LENGTH_8 ((uint16_t)0x0004) | |
| 52 #define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL ((uint16_t)0x0000) | |
| 53 #define SDRAM_MODEREG_BURST_TYPE_INTERLEAVED ((uint16_t)0x0008) | |
| 54 #define SDRAM_MODEREG_CAS_LATENCY_2 ((uint16_t)0x0020) | |
| 55 #define SDRAM_MODEREG_CAS_LATENCY_3 ((uint16_t)0x0030) | |
| 56 #define SDRAM_MODEREG_OPERATING_MODE_STANDARD ((uint16_t)0x0000) | |
| 57 #define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000) | |
| 58 #define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200) | |
| 59 | |
| 60 /* Exported variables --------------------------------------------------------*/ | |
| 61 | |
| 62 extern SPI_HandleTypeDef hspiDisplay; | |
| 63 extern SPI_HandleTypeDef cpu2DmaSpi; | |
| 64 | |
| 65 extern UART_HandleTypeDef UartHandle; | |
| 66 extern __IO ITStatus UartReady; | |
| 67 | |
| 68 | |
| 69 #ifdef USART_IR_HUD | |
| 70 extern UART_HandleTypeDef UartIR_HUD_Handle; | |
| 71 #endif | |
| 72 extern __IO ITStatus UartReadyHUD; | |
| 73 | |
| 74 #ifdef USART_PIEZO | |
| 75 extern UART_HandleTypeDef UartPiezoTxHandle; | |
| 76 #endif | |
| 77 | |
| 78 /* Exported functions --------------------------------------------------------*/ | |
| 79 | |
| 80 void MX_SPI_Init(void); | |
| 81 void MX_GPIO_Init(void); | |
| 82 void MX_UART_Init(void); | |
| 83 uint8_t MX_UART_ButtonAdjust(uint8_t *array); | |
| 84 | |
| 85 void MX_SmallCPU_Reset_To_Boot(void); | |
| 86 void MX_SmallCPU_Reset_To_Standard(void); | |
| 87 void MX_SmallCPU_NO_Reset_Helper(void); | |
| 88 | |
| 89 void MX_tell_reset_logik_alles_ok(void); | |
| 90 | |
| 91 void MX_Bluetooth_PowerOn(void); | |
| 92 void MX_Bluetooth_PowerOff(void); | |
| 93 | |
| 94 void MX_GPIO_Backlight_max_static_only_Init(void); | |
| 95 | |
| 96 void MX_GPIO_One_Button_only_Init(void); | |
| 97 GPIO_PinState MX_GPIO_Read_The_One_Button(void); | |
| 98 | |
| 99 void MX_TestPin_High(void); | |
| 100 void MX_TestPin_Low(void); | |
| 101 | |
| 102 | |
| 103 #endif // OSTC_H |
