STM32Cube BSP FW for STM32F769I-Discovery
Dependents: mbed-os-example-blinky-5 DISCO-F769NI_TOUCHSCREEN_demo_custom_1 Datarecorder2 DISCO-F769NI_TOUCHSCREEN_demo ... more
Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery.h@6:05b81d60cdae, 2019-11-12 (annotated)
- Committer:
- Jerome Coutant
- Date:
- Tue Nov 12 11:24:02 2019 +0100
- Revision:
- 6:05b81d60cdae
- Parent:
- 1:3e58f8a39705
STM32Cube_FW_F7_V1.15.0 BSP_DISCO_F769NI
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jerome Coutant
0:c0f3bbab73d2
|
1
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
2
|
******************************************************************************
|
|
Jerome Coutant
0:c0f3bbab73d2
|
3
|
* @file stm32f769i_discovery.h
|
|
Jerome Coutant
0:c0f3bbab73d2
|
4
|
* @author MCD Application Team
|
|
Jerome Coutant
0:c0f3bbab73d2
|
5
|
* @brief This file contains definitions for STM32F769I-Discovery LEDs,
|
|
Jerome Coutant
0:c0f3bbab73d2
|
6
|
* push-buttons hardware resources.
|
|
Jerome Coutant
0:c0f3bbab73d2
|
7
|
******************************************************************************
|
|
Jerome Coutant
0:c0f3bbab73d2
|
8
|
* @attention
|
|
Jerome Coutant
0:c0f3bbab73d2
|
9
|
*
|
|
Jerome Coutant
0:c0f3bbab73d2
|
10
|
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
|
Jerome Coutant
0:c0f3bbab73d2
|
11
|
*
|
|
Jerome Coutant
0:c0f3bbab73d2
|
12
|
* Redistribution and use in source and binary forms, with or without modification,
|
|
Jerome Coutant
0:c0f3bbab73d2
|
13
|
* are permitted provided that the following conditions are met:
|
|
Jerome Coutant
0:c0f3bbab73d2
|
14
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
Jerome Coutant
0:c0f3bbab73d2
|
15
|
* this list of conditions and the following disclaimer.
|
|
Jerome Coutant
0:c0f3bbab73d2
|
16
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
Jerome Coutant
0:c0f3bbab73d2
|
17
|
* this list of conditions and the following disclaimer in the documentation
|
|
Jerome Coutant
0:c0f3bbab73d2
|
18
|
* and/or other materials provided with the distribution.
|
|
Jerome Coutant
0:c0f3bbab73d2
|
19
|
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
|
Jerome Coutant
0:c0f3bbab73d2
|
20
|
* may be used to endorse or promote products derived from this software
|
|
Jerome Coutant
0:c0f3bbab73d2
|
21
|
* without specific prior written permission.
|
|
Jerome Coutant
0:c0f3bbab73d2
|
22
|
*
|
|
Jerome Coutant
0:c0f3bbab73d2
|
23
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Jerome Coutant
0:c0f3bbab73d2
|
24
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Jerome Coutant
0:c0f3bbab73d2
|
25
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
Jerome Coutant
0:c0f3bbab73d2
|
26
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
Jerome Coutant
0:c0f3bbab73d2
|
27
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Jerome Coutant
0:c0f3bbab73d2
|
28
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
Jerome Coutant
0:c0f3bbab73d2
|
29
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
Jerome Coutant
0:c0f3bbab73d2
|
30
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Jerome Coutant
0:c0f3bbab73d2
|
31
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Jerome Coutant
0:c0f3bbab73d2
|
32
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Jerome Coutant
0:c0f3bbab73d2
|
33
|
*
|
|
Jerome Coutant
0:c0f3bbab73d2
|
34
|
******************************************************************************
|
|
Jerome Coutant
0:c0f3bbab73d2
|
35
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
36
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
37
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
38
|
#ifndef __STM32F769I_DISCOVERY_H
|
|
Jerome Coutant
0:c0f3bbab73d2
|
39
|
#define __STM32F769I_DISCOVERY_H
|
|
Jerome Coutant
0:c0f3bbab73d2
|
40
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
41
|
#ifdef __cplusplus
|
|
Jerome Coutant
0:c0f3bbab73d2
|
42
|
extern "C" {
|
|
Jerome Coutant
0:c0f3bbab73d2
|
43
|
#endif
|
|
Jerome Coutant
0:c0f3bbab73d2
|
44
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
45
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
46
|
/* Includes ------------------------------------------------------------------*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
47
|
#include "stm32f7xx_hal.h"
|
|
Jerome Coutant
0:c0f3bbab73d2
|
48
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
49
|
/** @addtogroup BSP
|
|
Jerome Coutant
0:c0f3bbab73d2
|
50
|
* @{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
51
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
52
|
|
|
Jerome Coutant
1:3e58f8a39705
|
53
|
/** @addtogroup STM32F769I_DISCOVERY
|
|
Jerome Coutant
0:c0f3bbab73d2
|
54
|
* @{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
55
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
56
|
|
|
Jerome Coutant
1:3e58f8a39705
|
57
|
/** @defgroup STM32F769I_DISCOVERY_LOW_LEVEL STM32F769I-Discovery LOW LEVEL
|
|
Jerome Coutant
0:c0f3bbab73d2
|
58
|
* @{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
59
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
60
|
|
|
Jerome Coutant
1:3e58f8a39705
|
61
|
/** @defgroup STM32F769I_DISCOVERY_LOW_LEVEL_Exported_Types STM32F769I Discovery Low Level Exported Types
|
|
Jerome Coutant
0:c0f3bbab73d2
|
62
|
* @{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
63
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
64
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
65
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
66
|
* @brief Define for STM32F769I_DISCOVERY board
|
|
Jerome Coutant
0:c0f3bbab73d2
|
67
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
68
|
#if !defined (USE_STM32F769I_DISCO)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
69
|
#define USE_STM32F769I_DISCO
|
|
Jerome Coutant
0:c0f3bbab73d2
|
70
|
#endif
|
|
Jerome Coutant
0:c0f3bbab73d2
|
71
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
72
|
/** @brief Led_TypeDef
|
|
Jerome Coutant
1:3e58f8a39705
|
73
|
* STM32F769I_DISCOVERY board leds definitions.
|
|
Jerome Coutant
0:c0f3bbab73d2
|
74
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
75
|
typedef enum
|
|
Jerome Coutant
0:c0f3bbab73d2
|
76
|
{
|
|
Jerome Coutant
6:05b81d60cdae
|
77
|
LED1 = 0,
|
|
Jerome Coutant
6:05b81d60cdae
|
78
|
LED_RED = LED1,
|
|
Jerome Coutant
6:05b81d60cdae
|
79
|
LED2 = 1,
|
|
Jerome Coutant
6:05b81d60cdae
|
80
|
LED_GREEN = LED2
|
|
Jerome Coutant
0:c0f3bbab73d2
|
81
|
} Led_TypeDef;
|
|
Jerome Coutant
0:c0f3bbab73d2
|
82
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
83
|
/** @brief Button_TypeDef
|
|
Jerome Coutant
1:3e58f8a39705
|
84
|
* STM32F769I_DISCOVERY board Buttons definitions.
|
|
Jerome Coutant
0:c0f3bbab73d2
|
85
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
86
|
typedef enum
|
|
Jerome Coutant
0:c0f3bbab73d2
|
87
|
{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
88
|
BUTTON_WAKEUP = 0,
|
|
Jerome Coutant
0:c0f3bbab73d2
|
89
|
} Button_TypeDef;
|
|
Jerome Coutant
0:c0f3bbab73d2
|
90
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
91
|
#define BUTTON_USER BUTTON_WAKEUP
|
|
Jerome Coutant
0:c0f3bbab73d2
|
92
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
93
|
/** @brief ButtonMode_TypeDef
|
|
Jerome Coutant
1:3e58f8a39705
|
94
|
* STM32F769I_DISCOVERY board Buttons Modes definitions.
|
|
Jerome Coutant
0:c0f3bbab73d2
|
95
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
96
|
typedef enum
|
|
Jerome Coutant
0:c0f3bbab73d2
|
97
|
{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
98
|
BUTTON_MODE_GPIO = 0,
|
|
Jerome Coutant
0:c0f3bbab73d2
|
99
|
BUTTON_MODE_EXTI = 1
|
|
Jerome Coutant
0:c0f3bbab73d2
|
100
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
101
|
} ButtonMode_TypeDef;
|
|
Jerome Coutant
0:c0f3bbab73d2
|
102
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
103
|
/** @addtogroup Exported_types
|
|
Jerome Coutant
0:c0f3bbab73d2
|
104
|
* @{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
105
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
106
|
typedef enum
|
|
Jerome Coutant
0:c0f3bbab73d2
|
107
|
{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
108
|
PB_SET = 0,
|
|
Jerome Coutant
0:c0f3bbab73d2
|
109
|
PB_RESET = !PB_SET
|
|
Jerome Coutant
0:c0f3bbab73d2
|
110
|
} ButtonValue_TypeDef;
|
|
Jerome Coutant
0:c0f3bbab73d2
|
111
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
112
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
113
|
/** @brief DISCO_Status_TypeDef
|
|
Jerome Coutant
0:c0f3bbab73d2
|
114
|
* STM32F769I_DISCO board Status return possible values.
|
|
Jerome Coutant
0:c0f3bbab73d2
|
115
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
116
|
typedef enum
|
|
Jerome Coutant
0:c0f3bbab73d2
|
117
|
{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
118
|
DISCO_OK = 0,
|
|
Jerome Coutant
0:c0f3bbab73d2
|
119
|
DISCO_ERROR = 1
|
|
Jerome Coutant
0:c0f3bbab73d2
|
120
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
121
|
} DISCO_Status_TypeDef;
|
|
Jerome Coutant
0:c0f3bbab73d2
|
122
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
123
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
124
|
* @}
|
|
Jerome Coutant
0:c0f3bbab73d2
|
125
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
126
|
|
|
Jerome Coutant
1:3e58f8a39705
|
127
|
/** @defgroup STM32F769I_DISCOVERY_LOW_LEVEL_Exported_Constants STM32F769I Discovery Low Level Exported Constants
|
|
Jerome Coutant
0:c0f3bbab73d2
|
128
|
* @{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
129
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
130
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
131
|
|
|
Jerome Coutant
1:3e58f8a39705
|
132
|
/** @addtogroup STM32F769I_DISCOVERY_LOW_LEVEL_LED STM32F769I Discovery Low Level Led
|
|
Jerome Coutant
0:c0f3bbab73d2
|
133
|
* @{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
134
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
135
|
/* Always four leds for all revisions of Discovery boards */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
136
|
#define LEDn ((uint8_t)2)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
137
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
138
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
139
|
/* 2 Leds are connected to MCU directly on PJ13 and PJ5 */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
140
|
#define LED1_GPIO_PORT ((GPIO_TypeDef*)GPIOJ)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
141
|
#define LED2_GPIO_PORT ((GPIO_TypeDef*)GPIOJ)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
142
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
143
|
#define LEDx_GPIO_CLK_ENABLE() __HAL_RCC_GPIOJ_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
144
|
#define LEDx_GPIO_CLK_DISABLE() __HAL_RCC_GPIOJ_CLK_DISABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
145
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
146
|
#define LED1_PIN ((uint32_t)GPIO_PIN_13)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
147
|
#define LED2_PIN ((uint32_t)GPIO_PIN_5)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
148
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
149
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
150
|
* @}
|
|
Jerome Coutant
0:c0f3bbab73d2
|
151
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
152
|
|
|
Jerome Coutant
1:3e58f8a39705
|
153
|
/** @addtogroup STM32F769I_DISCOVERY_LOW_LEVEL_BUTTON STM32F769I Discovery Low Level Button
|
|
Jerome Coutant
0:c0f3bbab73d2
|
154
|
* @{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
155
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
156
|
/* Only one User/Wakeup button */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
157
|
#define BUTTONn ((uint8_t)1)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
158
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
159
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
160
|
* @brief Wakeup push-button
|
|
Jerome Coutant
0:c0f3bbab73d2
|
161
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
162
|
#define WAKEUP_BUTTON_PIN GPIO_PIN_0
|
|
Jerome Coutant
0:c0f3bbab73d2
|
163
|
#define WAKEUP_BUTTON_GPIO_PORT GPIOA
|
|
Jerome Coutant
0:c0f3bbab73d2
|
164
|
#define WAKEUP_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
165
|
#define WAKEUP_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
166
|
#define WAKEUP_BUTTON_EXTI_IRQn EXTI0_IRQn
|
|
Jerome Coutant
0:c0f3bbab73d2
|
167
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
168
|
/* Define the USER button as an alias of the Wakeup button */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
169
|
#define USER_BUTTON_PIN WAKEUP_BUTTON_PIN
|
|
Jerome Coutant
0:c0f3bbab73d2
|
170
|
#define USER_BUTTON_GPIO_PORT WAKEUP_BUTTON_GPIO_PORT
|
|
Jerome Coutant
0:c0f3bbab73d2
|
171
|
#define USER_BUTTON_GPIO_CLK_ENABLE() WAKEUP_BUTTON_GPIO_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
172
|
#define USER_BUTTON_GPIO_CLK_DISABLE() WAKEUP_BUTTON_GPIO_CLK_DISABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
173
|
#define USER_BUTTON_EXTI_IRQn WAKEUP_BUTTON_EXTI_IRQn
|
|
Jerome Coutant
0:c0f3bbab73d2
|
174
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
175
|
#define BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
176
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
177
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
178
|
* @}
|
|
Jerome Coutant
0:c0f3bbab73d2
|
179
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
180
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
181
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
182
|
* @brief USB OTG HS Over Current signal
|
|
Jerome Coutant
0:c0f3bbab73d2
|
183
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
184
|
#define OTG_HS_OVER_CURRENT_PIN GPIO_PIN_4
|
|
Jerome Coutant
0:c0f3bbab73d2
|
185
|
#define OTG_HS_OVER_CURRENT_PORT GPIOD
|
|
Jerome Coutant
0:c0f3bbab73d2
|
186
|
#define OTG_HS_OVER_CURRENT_PORT_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
187
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
188
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
189
|
* @brief SD-detect signal
|
|
Jerome Coutant
0:c0f3bbab73d2
|
190
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
191
|
#define SD_DETECT_PIN ((uint32_t)GPIO_PIN_15)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
192
|
#define SD_DETECT_GPIO_PORT ((GPIO_TypeDef*)GPIOI)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
193
|
#define SD_DETECT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOI_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
194
|
#define SD_DETECT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOI_CLK_DISABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
195
|
#define SD_DETECT_EXTI_IRQn EXTI15_10_IRQn
|
|
Jerome Coutant
0:c0f3bbab73d2
|
196
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
197
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
198
|
* @brief Touch screen interrupt signal
|
|
Jerome Coutant
0:c0f3bbab73d2
|
199
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
200
|
#define TS_INT_PIN ((uint32_t)GPIO_PIN_13)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
201
|
#define TS_INT_GPIO_PORT ((GPIO_TypeDef*)GPIOI)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
202
|
#define TS_INT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOI_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
203
|
#define TS_INT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOI_CLK_DISABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
204
|
#define TS_INT_EXTI_IRQn EXTI15_10_IRQn
|
|
Jerome Coutant
0:c0f3bbab73d2
|
205
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
206
|
/**
|
|
Jerome Coutant
1:3e58f8a39705
|
207
|
* @brief TouchScreen FT6206 Slave I2C address 1
|
|
Jerome Coutant
0:c0f3bbab73d2
|
208
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
209
|
#define TS_I2C_ADDRESS ((uint16_t)0x54)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
210
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
211
|
/**
|
|
Jerome Coutant
1:3e58f8a39705
|
212
|
* @brief TouchScreen FT6336G Slave I2C address 2
|
|
Jerome Coutant
1:3e58f8a39705
|
213
|
*/
|
|
Jerome Coutant
1:3e58f8a39705
|
214
|
#define TS_I2C_ADDRESS_A02 ((uint16_t)0x70)
|
|
Jerome Coutant
1:3e58f8a39705
|
215
|
|
|
Jerome Coutant
1:3e58f8a39705
|
216
|
/**
|
|
Jerome Coutant
6:05b81d60cdae
|
217
|
* @brief LCD DSI Slave I2C address 1
|
|
Jerome Coutant
6:05b81d60cdae
|
218
|
*/
|
|
Jerome Coutant
6:05b81d60cdae
|
219
|
#define LCD_DSI_ADDRESS TS_I2C_ADDRESS
|
|
Jerome Coutant
6:05b81d60cdae
|
220
|
|
|
Jerome Coutant
6:05b81d60cdae
|
221
|
/**
|
|
Jerome Coutant
6:05b81d60cdae
|
222
|
* @brief LCD DSI Slave I2C address 2
|
|
Jerome Coutant
6:05b81d60cdae
|
223
|
*/
|
|
Jerome Coutant
6:05b81d60cdae
|
224
|
#define LCD_DSI_ADDRESS_A02 TS_I2C_ADDRESS_A02
|
|
Jerome Coutant
6:05b81d60cdae
|
225
|
|
|
Jerome Coutant
6:05b81d60cdae
|
226
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
227
|
* @brief Audio I2C Slave address
|
|
Jerome Coutant
0:c0f3bbab73d2
|
228
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
229
|
#define AUDIO_I2C_ADDRESS ((uint16_t)0x34)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
230
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
231
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
232
|
* @brief EEPROM I2C Slave address 1
|
|
Jerome Coutant
0:c0f3bbab73d2
|
233
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
234
|
#define EEPROM_I2C_ADDRESS_A01 ((uint16_t)0xA0)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
235
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
236
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
237
|
* @brief EEPROM I2C Slave address 2
|
|
Jerome Coutant
0:c0f3bbab73d2
|
238
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
239
|
#define EEPROM_I2C_ADDRESS_A02 ((uint16_t)0xA6)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
240
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
241
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
242
|
* @brief User can use this section to tailor I2C4/I2C4 instance used and associated
|
|
Jerome Coutant
0:c0f3bbab73d2
|
243
|
* resources (audio codec).
|
|
Jerome Coutant
0:c0f3bbab73d2
|
244
|
* Definition for I2C4 clock resources
|
|
Jerome Coutant
0:c0f3bbab73d2
|
245
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
246
|
#define DISCOVERY_AUDIO_I2Cx I2C4
|
|
Jerome Coutant
0:c0f3bbab73d2
|
247
|
#define DISCOVERY_AUDIO_I2Cx_CLK_ENABLE() __HAL_RCC_I2C4_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
248
|
#define DISCOVERY_AUDIO_I2Cx_SCL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
249
|
#define DISCOVERY_AUDIO_I2Cx_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
250
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
251
|
#define DISCOVERY_AUDIO_I2Cx_FORCE_RESET() __HAL_RCC_I2C4_FORCE_RESET()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
252
|
#define DISCOVERY_AUDIO_I2Cx_RELEASE_RESET() __HAL_RCC_I2C4_RELEASE_RESET()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
253
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
254
|
/** @brief Definition for I2C4 Pins
|
|
Jerome Coutant
0:c0f3bbab73d2
|
255
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
256
|
#define DISCOVERY_AUDIO_I2Cx_SCL_PIN GPIO_PIN_12 /*!< PD12 */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
257
|
#define DISCOVERY_AUDIO_I2Cx_SCL_AF GPIO_AF4_I2C4
|
|
Jerome Coutant
0:c0f3bbab73d2
|
258
|
#define DISCOVERY_AUDIO_I2Cx_SCL_GPIO_PORT GPIOD
|
|
Jerome Coutant
0:c0f3bbab73d2
|
259
|
#define DISCOVERY_AUDIO_I2Cx_SDA_PIN GPIO_PIN_7 /*!< PB7 */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
260
|
#define DISCOVERY_AUDIO_I2Cx_SDA_AF GPIO_AF11_I2C4
|
|
Jerome Coutant
0:c0f3bbab73d2
|
261
|
#define DISCOVERY_AUDIO_I2Cx_SDA_GPIO_PORT GPIOB
|
|
Jerome Coutant
0:c0f3bbab73d2
|
262
|
/** @brief Definition of I2C4 interrupt requests
|
|
Jerome Coutant
0:c0f3bbab73d2
|
263
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
264
|
#define DISCOVERY_AUDIO_I2Cx_EV_IRQn I2C4_EV_IRQn
|
|
Jerome Coutant
0:c0f3bbab73d2
|
265
|
#define DISCOVERY_AUDIO_I2Cx_ER_IRQn I2C4_ER_IRQn
|
|
Jerome Coutant
0:c0f3bbab73d2
|
266
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
267
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
268
|
* @brief User can use this section to tailor I2C1/I2C1 instance used and associated
|
|
Jerome Coutant
0:c0f3bbab73d2
|
269
|
* resources.
|
|
Jerome Coutant
0:c0f3bbab73d2
|
270
|
* Definition for I2C1 clock resources
|
|
Jerome Coutant
0:c0f3bbab73d2
|
271
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
272
|
#define DISCOVERY_EXT_I2Cx I2C1
|
|
Jerome Coutant
0:c0f3bbab73d2
|
273
|
#define DISCOVERY_EXT_I2Cx_CLK_ENABLE() __HAL_RCC_I2C1_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
274
|
#define DISCOVERY_DMAx_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
275
|
#define DISCOVERY_EXT_I2Cx_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
276
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
277
|
#define DISCOVERY_EXT_I2Cx_FORCE_RESET() __HAL_RCC_I2C1_FORCE_RESET()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
278
|
#define DISCOVERY_EXT_I2Cx_RELEASE_RESET() __HAL_RCC_I2C1_RELEASE_RESET()
|
|
Jerome Coutant
0:c0f3bbab73d2
|
279
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
280
|
/** @brief Definition for I2C1 Pins
|
|
Jerome Coutant
0:c0f3bbab73d2
|
281
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
282
|
#define DISCOVERY_EXT_I2Cx_SCL_PIN GPIO_PIN_8 /*!< PB8 */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
283
|
#define DISCOVERY_EXT_I2Cx_SCL_SDA_GPIO_PORT GPIOB
|
|
Jerome Coutant
0:c0f3bbab73d2
|
284
|
#define DISCOVERY_EXT_I2Cx_SCL_SDA_AF GPIO_AF4_I2C1
|
|
Jerome Coutant
0:c0f3bbab73d2
|
285
|
#define DISCOVERY_EXT_I2Cx_SDA_PIN GPIO_PIN_9 /*!< PB9 */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
286
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
287
|
/** @brief Definition of I2C interrupt requests
|
|
Jerome Coutant
0:c0f3bbab73d2
|
288
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
289
|
#define DISCOVERY_EXT_I2Cx_EV_IRQn I2C1_EV_IRQn
|
|
Jerome Coutant
0:c0f3bbab73d2
|
290
|
#define DISCOVERY_EXT_I2Cx_ER_IRQn I2C1_ER_IRQn
|
|
Jerome Coutant
0:c0f3bbab73d2
|
291
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
292
|
/* I2C TIMING Register define when I2C clock source is SYSCLK */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
293
|
/* I2C TIMING is calculated from APB1 source clock = 50 MHz */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
294
|
/* Due to the big MOFSET capacity for adapting the camera level the rising time is very large (>1us) */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
295
|
/* 0x40912732 takes in account the big rising and aims a clock of 100khz */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
296
|
#ifndef DISCOVERY_I2Cx_TIMING
|
|
Jerome Coutant
0:c0f3bbab73d2
|
297
|
#define DISCOVERY_I2Cx_TIMING ((uint32_t)0x40912732)
|
|
Jerome Coutant
0:c0f3bbab73d2
|
298
|
#endif /* DISCOVERY_I2Cx_TIMING */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
299
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
300
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
301
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
302
|
* @}
|
|
Jerome Coutant
0:c0f3bbab73d2
|
303
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
304
|
|
|
Jerome Coutant
1:3e58f8a39705
|
305
|
/** @defgroup STM32F769I_DISCOVERY_LOW_LEVEL_Exported_Macros STM32F769I Discovery Low Level Exported Macros
|
|
Jerome Coutant
0:c0f3bbab73d2
|
306
|
* @{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
307
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
308
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
309
|
* @}
|
|
Jerome Coutant
0:c0f3bbab73d2
|
310
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
311
|
|
|
Jerome Coutant
1:3e58f8a39705
|
312
|
/** @defgroup STM32F769I_DISCOVERY_LOW_LEVEL_Exported_Functions STM32F769I Discovery Low Level Exported Functions
|
|
Jerome Coutant
0:c0f3bbab73d2
|
313
|
* @{
|
|
Jerome Coutant
0:c0f3bbab73d2
|
314
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
315
|
uint32_t BSP_GetVersion(void);
|
|
Jerome Coutant
0:c0f3bbab73d2
|
316
|
void BSP_LED_Init(Led_TypeDef Led);
|
|
Jerome Coutant
0:c0f3bbab73d2
|
317
|
void BSP_LED_DeInit(Led_TypeDef Led);
|
|
Jerome Coutant
0:c0f3bbab73d2
|
318
|
void BSP_LED_On(Led_TypeDef Led);
|
|
Jerome Coutant
0:c0f3bbab73d2
|
319
|
void BSP_LED_Off(Led_TypeDef Led);
|
|
Jerome Coutant
0:c0f3bbab73d2
|
320
|
void BSP_LED_Toggle(Led_TypeDef Led);
|
|
Jerome Coutant
0:c0f3bbab73d2
|
321
|
void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode);
|
|
Jerome Coutant
0:c0f3bbab73d2
|
322
|
void BSP_PB_DeInit(Button_TypeDef Button);
|
|
Jerome Coutant
0:c0f3bbab73d2
|
323
|
uint32_t BSP_PB_GetState(Button_TypeDef Button);
|
|
Jerome Coutant
0:c0f3bbab73d2
|
324
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
325
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
326
|
* @}
|
|
Jerome Coutant
0:c0f3bbab73d2
|
327
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
328
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
329
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
330
|
* @}
|
|
Jerome Coutant
0:c0f3bbab73d2
|
331
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
332
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
333
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
334
|
* @}
|
|
Jerome Coutant
0:c0f3bbab73d2
|
335
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
336
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
337
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
338
|
* @}
|
|
Jerome Coutant
0:c0f3bbab73d2
|
339
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
340
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
341
|
/**
|
|
Jerome Coutant
0:c0f3bbab73d2
|
342
|
* @}
|
|
Jerome Coutant
0:c0f3bbab73d2
|
343
|
*/
|
|
Jerome Coutant
0:c0f3bbab73d2
|
344
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
345
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
346
|
#ifdef __cplusplus
|
|
Jerome Coutant
0:c0f3bbab73d2
|
347
|
}
|
|
Jerome Coutant
0:c0f3bbab73d2
|
348
|
#endif
|
|
Jerome Coutant
0:c0f3bbab73d2
|
349
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
350
|
#endif /* __STM32F769I_DISCOVERY_H */
|
|
Jerome Coutant
0:c0f3bbab73d2
|
351
|
|
|
Jerome Coutant
0:c0f3bbab73d2
|
352
|
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|