Mercurial > public > ostc4
annotate Discovery/Inc/ostc.h @ 923:6fc0e3d230e4 Evo_2_23
UART6 DMA handling:
Make sure that RX transmission uses DMA stream 2
author | Ideenmodellierer |
---|---|
date | Mon, 04 Nov 2024 20:21:02 +0100 |
parents | 8d3f3a635397 |
children |
rev | line source |
---|---|
38 | 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 | |
885
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
60 #define DISPLAY_VERSION_LCD (0u) |
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
61 #define DISPLAY_VERSION_NEW (1u) |
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
62 |
38 | 63 /* Exported variables --------------------------------------------------------*/ |
64 | |
65 extern SPI_HandleTypeDef hspiDisplay; | |
66 extern SPI_HandleTypeDef cpu2DmaSpi; | |
67 | |
68 extern UART_HandleTypeDef UartHandle; | |
69 extern __IO ITStatus UartReady; | |
70 | |
71 | |
72 #ifdef USART_IR_HUD | |
73 extern UART_HandleTypeDef UartIR_HUD_Handle; | |
74 #endif | |
75 | |
76 #ifdef USART_PIEZO | |
77 extern UART_HandleTypeDef UartPiezoTxHandle; | |
78 #endif | |
79 | |
80 /* Exported functions --------------------------------------------------------*/ | |
81 | |
82 void MX_SPI_Init(void); | |
83 void MX_GPIO_Init(void); | |
84 void MX_UART_Init(void); | |
85 uint8_t MX_UART_ButtonAdjust(uint8_t *array); | |
86 | |
87 void MX_SmallCPU_Reset_To_Boot(void); | |
88 void MX_SmallCPU_Reset_To_Standard(void); | |
89 void MX_SmallCPU_NO_Reset_Helper(void); | |
90 | |
91 void MX_tell_reset_logik_alles_ok(void); | |
92 | |
93 void MX_Bluetooth_PowerOn(void); | |
94 void MX_Bluetooth_PowerOff(void); | |
95 | |
96 void MX_GPIO_Backlight_max_static_only_Init(void); | |
97 | |
98 void MX_GPIO_One_Button_only_Init(void); | |
99 GPIO_PinState MX_GPIO_Read_The_One_Button(void); | |
100 | |
101 void MX_TestPin_High(void); | |
102 void MX_TestPin_Low(void); | |
103 | |
885
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
104 void SetDisplayVersion(uint8_t version); |
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
105 uint8_t isNewDisplay(void); |
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
106 |
38 | 107 |
108 #endif // OSTC_H |