Mercurial > public > ostc4
annotate Discovery/Inc/ostc.h @ 1056:b241efe09963 Icon_Integration tip
Icon upload: added icon size check:
The size of the icon is limited to 128k. To avoid overwritten data (font would no longer be shown correct) in case a larger icon is send, a size check has been added before floshing the icon.
| author | Ideenmodellierer |
|---|---|
| date | Sat, 03 Jan 2026 20:42:09 +0100 |
| parents | 36fa1c44e597 |
| 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 | |
| 1053 | 45 #define ICON_HEADER_ADDR (0x8100000) |
| 46 | |
| 38 | 47 #define SDRAM_TIMEOUT ((uint32_t)0xFFFF) |
| 48 #define SDRAM_MEMORY_WIDTH FMC_SDRAM_MEM_BUS_WIDTH_16 | |
| 49 #define SDCLOCK_PERIOD FMC_SDRAM_CLOCK_PERIOD_3 | |
| 50 #define SDRAM_MODEREG_BURST_LENGTH_1 ((uint16_t)0x0000) | |
| 51 #define SDRAM_MODEREG_BURST_LENGTH_2 ((uint16_t)0x0001) | |
| 52 #define SDRAM_MODEREG_BURST_LENGTH_4 ((uint16_t)0x0002) | |
| 53 #define SDRAM_MODEREG_BURST_LENGTH_8 ((uint16_t)0x0004) | |
| 54 #define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL ((uint16_t)0x0000) | |
| 55 #define SDRAM_MODEREG_BURST_TYPE_INTERLEAVED ((uint16_t)0x0008) | |
| 56 #define SDRAM_MODEREG_CAS_LATENCY_2 ((uint16_t)0x0020) | |
| 57 #define SDRAM_MODEREG_CAS_LATENCY_3 ((uint16_t)0x0030) | |
| 58 #define SDRAM_MODEREG_OPERATING_MODE_STANDARD ((uint16_t)0x0000) | |
| 59 #define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000) | |
| 60 #define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200) | |
| 61 | |
|
885
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
62 #define DISPLAY_VERSION_LCD (0u) |
|
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
63 #define DISPLAY_VERSION_NEW (1u) |
|
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
64 |
|
1033
5f66e44d69f0
Added functionality needed for subscription of standard Bluetooth pulse service notifications
Ideenmodellierer
parents:
1032
diff
changeset
|
65 #define CHUNK_SIZE (160u) /* the DMA will handle chunk size transfers */ |
| 1032 | 66 #define CHUNKS_PER_BUFFER (3u) |
| 67 | |
| 68 | |
| 38 | 69 /* Exported variables --------------------------------------------------------*/ |
| 70 | |
| 71 extern SPI_HandleTypeDef hspiDisplay; | |
| 72 extern SPI_HandleTypeDef cpu2DmaSpi; | |
| 73 | |
| 74 extern UART_HandleTypeDef UartHandle; | |
| 75 extern __IO ITStatus UartReady; | |
| 76 | |
| 77 | |
| 78 #ifdef USART_IR_HUD | |
| 79 extern UART_HandleTypeDef UartIR_HUD_Handle; | |
| 80 #endif | |
| 81 | |
| 82 #ifdef USART_PIEZO | |
| 83 extern UART_HandleTypeDef UartPiezoTxHandle; | |
| 84 #endif | |
| 85 | |
| 86 /* Exported functions --------------------------------------------------------*/ | |
| 87 | |
| 88 void MX_SPI_Init(void); | |
| 89 void MX_GPIO_Init(void); | |
| 90 void MX_UART_Init(void); | |
| 1032 | 91 void MX_UART_BT_Init_DMA(); |
| 38 | 92 uint8_t MX_UART_ButtonAdjust(uint8_t *array); |
| 93 | |
| 94 void MX_SmallCPU_Reset_To_Boot(void); | |
| 95 void MX_SmallCPU_Reset_To_Standard(void); | |
| 96 void MX_SmallCPU_NO_Reset_Helper(void); | |
| 97 | |
| 98 void MX_tell_reset_logik_alles_ok(void); | |
| 99 | |
| 100 void MX_Bluetooth_PowerOn(void); | |
| 101 void MX_Bluetooth_PowerOff(void); | |
| 102 | |
| 103 void MX_GPIO_Backlight_max_static_only_Init(void); | |
| 104 | |
| 105 void MX_GPIO_One_Button_only_Init(void); | |
| 106 GPIO_PinState MX_GPIO_Read_The_One_Button(void); | |
| 107 | |
| 108 void MX_TestPin_High(void); | |
| 109 void MX_TestPin_Low(void); | |
| 110 | |
|
885
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
111 void SetDisplayVersion(uint8_t version); |
|
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
112 uint8_t isNewDisplay(void); |
|
8d3f3a635397
Replaced global hardwareDisplay with unit access:
Ideenmodellierer
parents:
871
diff
changeset
|
113 |
| 1032 | 114 uint8_t UART_getChar(); |
| 1036 | 115 |
| 116 #ifdef ENABLE_PULSE_SENSOR_BT | |
| 1032 | 117 void UART_StartDMARx(); |
| 1036 | 118 #endif |
| 119 #ifdef ENABLE_USART_RADIO | |
| 120 void MX_UART_RADIO_Init_DMA(); | |
| 121 void UART_StartDMARxRadio(); | |
| 122 #endif | |
| 1032 | 123 |
| 38 | 124 |
| 125 #endif // OSTC_H |
