38
|
1 ///////////////////////////////////////////////////////////////////////////////
|
|
2 /// -*- coding: UTF-8 -*-
|
|
3 ///
|
|
4 /// \file Discovery/Inc/ostc_hw1.h
|
|
5 /// \brief
|
|
6 /// \author Heinrichs Weikamp
|
|
7 /// \date 2018
|
|
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_HW1_H
|
|
29 #define OSTC_HW1_H
|
|
30
|
|
31 /*
|
|
32 #define DISPLAY_BACKLIGHT_PIN GPIO_PIN_7
|
|
33 #define DISPLAY_BACKLIGHT_GPIO_PORT GPIOC
|
|
34 #define DISPLAY_BACKLIGHT_GPIO_ENABLE() __GPIOC_CLK_ENABLE()
|
|
35 */
|
|
36
|
|
37 #define DISPLAY_RESETB_PIN GPIO_PIN_13
|
|
38 #define DISPLAY_RESETB_GPIO_PORT GPIOC
|
|
39 #define DISPLAY_RESETB_GPIO_ENABLE() __GPIOC_CLK_ENABLE()
|
|
40
|
|
41 #define DISPLAY_CSB_PIN GPIO_PIN_8
|
|
42 #define DISPLAY_CSB_GPIO_PORT GPIOI
|
|
43 #define DISPLAY_CSB_GPIO_ENABLE() __GPIOI_CLK_ENABLE()
|
|
44
|
|
45 #define VSYNC_IRQ_PIN GPIO_PIN_3
|
|
46 #define VSYNC_IRQ_GPIO_PORT GPIOE
|
|
47 #define VSYNC_IRQ_GPIO_ENABLE() __GPIOE_CLK_ENABLE()
|
|
48 #define VSYNC_IRQ_EXTI_IRQn EXTI3_IRQn
|
|
49
|
|
50 #define BUTTON_ENTER_PIN GPIO_PIN_4
|
|
51 #define BUTTON_ENTER_GPIO_PORT GPIOH
|
|
52 #define BUTTON_ENTER_GPIO_ENABLE() __GPIOH_CLK_ENABLE()
|
|
53 #define BUTTON_ENTER_EXTI_IRQn EXTI4_IRQn
|
|
54
|
|
55 #define BUTTON_DOWN_PIN GPIO_PIN_1
|
|
56 #define BUTTON_DOWN_GPIO_PORT GPIOA
|
|
57 #define BUTTON_DOWN_GPIO_ENABLE() __GPIOA_CLK_ENABLE()
|
|
58 #define BUTTON_DOWN_EXTI_IRQn EXTI1_IRQn
|
|
59
|
|
60 #define BUTTON_NEXT_PIN GPIO_PIN_2
|
|
61 #define BUTTON_NEXT_GPIO_PORT GPIOA
|
|
62 #define BUTTON_NEXT_GPIO_ENABLE() __GPIOA_CLK_ENABLE()
|
|
63 #define BUTTON_NEXT_EXTI_IRQn EXTI2_IRQn
|
|
64
|
|
65 #define BUTTON_BACK_PIN GPIO_PIN_0
|
|
66 #define BUTTON_BACK_GPIO_PORT GPIOB
|
|
67 #define BUTTON_BACK_GPIO_ENABLE() __GPIOB_CLK_ENABLE()
|
|
68 #define BUTTON_BACK_EXTI_IRQn EXTI0_IRQn
|
|
69
|
|
70 #define EXTFLASH_CSB_PIN GPIO_PIN_6
|
|
71 #define EXTFLASH_CSB_GPIO_PORT GPIOF
|
|
72 #define EXTFLASH_CSB_GPIO_ENABLE() __GPIOF_CLK_ENABLE()
|
|
73
|
|
74 #define OSCILLOSCOPE_PIN GPIO_PIN_3
|
|
75 #define OSCILLOSCOPE_GPIO_PORT GPIOA
|
|
76 #define OSCILLOSCOPE_GPIO_ENABLE() __GPIOA_CLK_ENABLE()
|
|
77
|
|
78 #define OSCILLOSCOPE2_PIN GPIO_PIN_11
|
|
79 #define OSCILLOSCOPE2_GPIO_PORT GPIOB
|
|
80 #define OSCILLOSCOPE2_GPIO_ENABLE() __GPIOB_CLK_ENABLE()
|
|
81
|
|
82 #define IR_HUD_ENABLE_PIN GPIO_PIN_7
|
|
83 #define IR_HUD_ENABLE_GPIO_PORT GPIOD
|
|
84 #define IR_HUD_ENABLE_GPIO_ENABLE() __GPIOD_CLK_ENABLE()
|
|
85
|
|
86 #define USARTx USART1
|
|
87 #define USARTx_CLK_ENABLE() __USART1_CLK_ENABLE();
|
|
88 #define USARTx_FORCE_RESET() __USART1_FORCE_RESET()
|
|
89 #define USARTx_RELEASE_RESET() __USART1_RELEASE_RESET()
|
|
90
|
|
91 #define USARTx_RX_AF GPIO_AF7_USART1
|
|
92 #define USARTx_RX_PIN GPIO_PIN_10
|
|
93 #define USARTx_RX_GPIO_PORT GPIOA
|
|
94 #define USARTx_RX_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE()
|
|
95
|
|
96 #define USARTx_TX_AF GPIO_AF7_USART1
|
|
97 #define USARTx_TX_PIN GPIO_PIN_9
|
|
98 #define USARTx_TX_GPIO_PORT GPIOA
|
|
99 #define USARTx_TX_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE()
|
|
100 #define USARTx_IRQn USART1_IRQn
|
|
101 #define USARTx_IRQHandler USART1_IRQHandler
|
|
102
|
|
103 #define USART_PIEZO USART3
|
|
104 #define USART_PIEZO_TX_AF GPIO_AF7_USART3
|
|
105 #define USART_PIEZO_TX_PIN GPIO_PIN_10
|
|
106 #define USART_PIEZO_TX_GPIO_PORT GPIOC
|
|
107 #define USART_PIEZO_TX_GPIO_CLK_ENABLE() __GPIOC_CLK_ENABLE()
|
|
108
|
|
109 #define USART_PIEZO_RX_AF GPIO_AF7_USART3
|
|
110 #define USART_PIEZO_RX_PIN GPIO_PIN_11
|
|
111 #define USART_PIEZO_RX_GPIO_PORT GPIOC
|
|
112 #define USART_PIEZO_RX_GPIO_CLK_ENABLE() __GPIOC_CLK_ENABLE()
|
|
113
|
|
114 #define USART_IR_HUD USART2
|
|
115 #define USART_IR_HUD_CLK_ENABLE() __USART2_CLK_ENABLE();
|
|
116 #define USART_IR_HUD_FORCE_RESET() __USART2_FORCE_RESET()
|
|
117 #define USART_IR_HUD_RELEASE_RESET() __USART2_RELEASE_RESET()
|
|
118 #define USART_IR_HUD_TX_AF GPIO_AF7_USART2
|
|
119 #define USART_IR_HUD_TX_PIN GPIO_PIN_5
|
|
120 #define USART_IR_HUD_TX_GPIO_PORT GPIOD
|
|
121 #define USART_IR_HUD_TX_GPIO_CLK_ENABLE() __GPIOD_CLK_ENABLE()
|
|
122
|
|
123 #define USART_IR_HUD_RX_AF GPIO_AF7_USART2
|
|
124 #define USART_IR_HUD_RX_PIN GPIO_PIN_6
|
|
125 #define USART_IR_HUD_RX_GPIO_PORT GPIOD
|
|
126 #define USART_IR_HUD_RX_GPIO_CLK_ENABLE() __GPIOD_CLK_ENABLE()
|
|
127 #define USART_IR_HUD_IRQn USART2_IRQn
|
|
128 #define USART_IR_HUD_IRQHandler USART2_IRQHandler
|
|
129
|
|
130 #define TIMx TIM4
|
|
131 #define TIMx_CLK_ENABLE __TIM4_CLK_ENABLE
|
|
132 #define TIMx_IRQn TIM4_IRQn
|
|
133 #define TIMx_IRQHandler TIM4_IRQHandler
|
|
134
|
|
135 #define TIM_BACKLIGHT TIM3
|
|
136 #define TIM_BACKLIGHT_CLK_ENABLE __TIM3_CLK_ENABLE
|
|
137 #define TIM_BACKLIGHT_IRQn TIM3_IRQn
|
|
138 #define TIM_BACKLIGHT_IRQHandler TIM3_IRQHandler
|
|
139 #define TIM_BACKLIGHT_CHANNEL TIM_CHANNEL_2
|
|
140 #define TIM_BACKLIGHT_PIN GPIO_PIN_7
|
|
141 #define TIM_BACKLIGHT_GPIO_PORT GPIOC
|
|
142 #define TIM_BACKLIGHT_GPIO_ENABLE() __GPIOC_CLK_ENABLE()
|
|
143
|
|
144 #define SMALLCPU_CSB_PIN GPIO_PIN_5
|
|
145 #define SMALLCPU_CSB_GPIO_PORT GPIOC
|
|
146 #define SMALLCPU_CSB_GPIO_ENABLE() __GPIOC_CLK_ENABLE()
|
|
147
|
|
148 #define SMALLCPU_BOOT0_PIN GPIO_PIN_9
|
|
149 #define SMALLCPU_BOOT0_GPIO_PORT GPIOC
|
|
150 #define SMALLCPU_BOOT0_GPIO_ENABLE() __GPIOC_CLK_ENABLE()
|
|
151
|
|
152 #define SMALLCPU_NRESET_PIN GPIO_PIN_8
|
|
153 #define SMALLCPU_NRESET_GPIO_PORT GPIOC
|
|
154 #define SMALLCPU_NRESET_GPIO_ENABLE() __GPIOC_CLK_ENABLE()
|
|
155
|
|
156 #endif OSTC_HW1_H
|