comparison Discovery/Inc/ostc_discovery.h @ 38:5f11787b4f42

include in ostc4 repository
author heinrichsweikamp
date Sat, 28 Apr 2018 11:52:34 +0200
parents
children
comparison
equal deleted inserted replaced
37:ccc45c0e1ea2 38:5f11787b4f42
1 ///////////////////////////////////////////////////////////////////////////////
2 /// -*- coding: UTF-8 -*-
3 ///
4 /// \file Discovery/Inc/ostc_discovery.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 #ifndef OSTC_DISCOVERY_H
28 #define OSTC_DISCOVERY_H
29
30 #define DISPLAY_RESETB_PIN GPIO_PIN_6
31 #define DISPLAY_RESETB_GPIO_PORT GPIOF
32 #define DISPLAY_RESETB_GPIO_ENABLE()__GPIOF_CLK_ENABLE()
33
34 #define DISPLAY_CSB_PIN GPIO_PIN_8
35 #define DISPLAY_CSB_GPIO_PORT GPIOC
36 #define DISPLAY_CSB_GPIO_ENABLE() __GPIOC_CLK_ENABLE()
37
38 #define VSYNC_IRQ_PIN GPIO_PIN_4
39 #define VSYNC_IRQ_GPIO_PORT GPIOD
40 #define VSYNC_IRQ_GPIO_ENABLE() __GPIOD_CLK_ENABLE()
41 #define VSYNC_IRQ_EXTI_IRQn EXTI4_IRQn
42
43 #define BUTTON_ENTER_PIN GPIO_PIN_0
44 #define BUTTON_ENTER_GPIO_PORT GPIOA
45 #define BUTTON_ENTER_GPIO_ENABLE() __GPIOA_CLK_ENABLE()
46 #define BUTTON_ENTER_EXTI_IRQn EXTI0_IRQn
47
48 #define BUTTON_DOWN_PIN GPIO_PIN_1
49 #define BUTTON_DOWN_GPIO_PORT GPIOA
50 #define BUTTON_DOWN_GPIO_ENABLE() __GPIOA_CLK_ENABLE()
51 #define BUTTON_DOWN_EXTI_IRQn EXTI1_IRQn
52
53 #define BUTTON_NEXT_PIN GPIO_PIN_2
54 #define BUTTON_NEXT_GPIO_PORT GPIOA
55 #define BUTTON_NEXT_GPIO_ENABLE() __GPIOA_CLK_ENABLE()
56 #define BUTTON_NEXT_EXTI_IRQn EXTI2_IRQn
57
58 #define BUTTON_BACK_PIN GPIO_PIN_3
59 #define BUTTON_BACK_GPIO_PORT GPIOC
60 #define BUTTON_BACK_GPIO_ENABLE() __GPIOC_CLK_ENABLE()
61 #define BUTTON_BACK_EXTI_IRQn EXTI3_IRQn
62
63 #define EXTFLASH_CSB_PIN GPIO_PIN_1
64 #define EXTFLASH_CSB_GPIO_PORT GPIOC
65 #define EXTFLASH_CSB_GPIO_ENABLE() __GPIOC_CLK_ENABLE()
66
67 #define OSCILLOSCOPE_PIN GPIO_PIN_14
68 #define OSCILLOSCOPE_GPIO_PORT GPIOG
69 #define OSCILLOSCOPE_GPIO_ENABLE() __GPIOG_CLK_ENABLE()
70
71 #define OSCILLOSCOPE2_PIN GPIO_PIN_13
72 #define OSCILLOSCOPE2_GPIO_PORT GPIOG
73 #define OSCILLOSCOPE2_GPIO_ENABLE() __GPIOG_CLK_ENABLE()
74
75 #define USARTx USART1
76 #define USARTx_CLK_ENABLE() __USART1_CLK_ENABLE();
77 #define USARTx_FORCE_RESET() __USART1_FORCE_RESET()
78 #define USARTx_RELEASE_RESET() __USART1_RELEASE_RESET()
79
80 #define USARTx_RX_AF GPIO_AF7_USART1
81 #define USARTx_RX_PIN GPIO_PIN_10
82 #define USARTx_RX_GPIO_PORT GPIOA
83 #define USARTx_RX_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE()
84
85 #define USARTx_TX_AF GPIO_AF7_USART1
86 #define USARTx_TX_PIN GPIO_PIN_9
87 #define USARTx_TX_GPIO_PORT GPIOA
88 #define USARTx_TX_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE()
89 #define USARTx_IRQn USART1_IRQn
90 #define USARTx_IRQHandler USART1_IRQHandler
91
92 #define TIMx TIM3
93 #define TIMx_CLK_ENABLE __TIM3_CLK_ENABLE
94 #define TIMx_IRQn TIM3_IRQn
95 #define TIMx_IRQHandler TIM3_IRQHandler
96
97 #define SMALLCPU_CSB_PIN GPIO_PIN_15
98 #define SMALLCPU_CSB_GPIO_PORT GPIOA
99 #define SMALLCPU_CSB_GPIO_ENABLE() __GPIOA_CLK_ENABLE()
100
101 #endif // OSTC_DISCOVERY_H