38
|
1 /**
|
|
2 ******************************************************************************
|
|
3 * @file GPIO/GPIO_IOToggle/Inc/main.h
|
|
4 * @author MCD Application Team
|
|
5 * @version V1.1.0
|
|
6 * @date 26-June-2014
|
|
7 * @brief Header for main.c module
|
|
8 ******************************************************************************
|
|
9 * @attention
|
|
10 *
|
|
11 * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
|
|
12 *
|
|
13 * Redistribution and use in source and binary forms, with or without modification,
|
|
14 * are permitted provided that the following conditions are met:
|
|
15 * 1. Redistributions of source code must retain the above copyright notice,
|
|
16 * this list of conditions and the following disclaimer.
|
|
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
18 * this list of conditions and the following disclaimer in the documentation
|
|
19 * and/or other materials provided with the distribution.
|
|
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
|
|
21 * may be used to endorse or promote products derived from this software
|
|
22 * without specific prior written permission.
|
|
23 *
|
|
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34 *
|
|
35 ******************************************************************************
|
|
36 */
|
|
37
|
|
38 /* Define to prevent recursive inclusion -------------------------------------*/
|
|
39 #ifndef BASE_CPU2_H
|
|
40 #define BASE_CPU2_H
|
|
41
|
|
42 /* Includes ------------------------------------------------------------------*/
|
|
43 #include "stm32f4xx_hal.h"
|
|
44 #include "settings.h"
|
|
45
|
|
46 /* Exported types ------------------------------------------------------------*/
|
|
47 /* Exported constants --------------------------------------------------------*/
|
|
48
|
|
49 //new
|
|
50 uint8_t firmwareVersionHigh(void);
|
|
51 uint8_t firmwareVersionLow(void);
|
|
52
|
|
53 /* Definition for I2Cx clock resources */
|
|
54 #define I2Cx I2C1
|
|
55 #define I2Cx_CLK_ENABLE() __I2C1_CLK_ENABLE()
|
|
56 #define I2Cx_SDA_GPIO_CLK_ENABLE() __GPIOB_CLK_ENABLE()
|
|
57 #define I2Cx_SCL_GPIO_CLK_ENABLE() __GPIOB_CLK_ENABLE()
|
|
58
|
|
59 #define I2Cx_FORCE_RESET() __I2C1_FORCE_RESET()
|
|
60 #define I2Cx_RELEASE_RESET() __I2C1_RELEASE_RESET()
|
|
61
|
|
62 /* Definition for I2Cx Pins */
|
|
63 #define I2Cx_SCL_PIN GPIO_PIN_8
|
|
64 #define I2Cx_SCL_GPIO_PORT GPIOB
|
|
65 #define I2Cx_SCL_AF GPIO_AF4_I2C1
|
|
66 #define I2Cx_SDA_PIN GPIO_PIN_9
|
|
67 #define I2Cx_SDA_GPIO_PORT GPIOB
|
|
68 #define I2Cx_SDA_AF GPIO_AF4_I2C1
|
|
69
|
|
70 /* Definition for I2Cx's NVIC */
|
|
71 #define I2Cx_EV_IRQn I2C1_EV_IRQn
|
|
72 #define I2Cx_EV_IRQHandler I2C1_EV_IRQHandler
|
|
73 #define I2Cx_ER_IRQn I2C1_ER_IRQn
|
|
74 #define I2Cx_ER_IRQHandler I2C1_ER_IRQHandler
|
|
75
|
|
76 /* Size of Transmission buffer */
|
|
77 //#define TXBUFFERSIZE (COUNTOF(aTxBuffer) - 1)
|
|
78 /* Size of Reception buffer */
|
|
79 //#define RXBUFFERSIZE TXBUFFERSIZE
|
|
80
|
|
81 /* Exported macro ------------------------------------------------------------*/
|
|
82 //#define COUNTOF(__BUFFER__) (sizeof(__BUFFER__) / sizeof(*(__BUFFER__)))
|
|
83
|
|
84 /* Exported functions ------------------------------------------------------- */
|
|
85 void SYSCLKConfig_STOP(void);
|
|
86 //void SystemClock_Config(void); in baseCPU2.c only
|
|
87
|
|
88 void HAL_I2C_ManualControl_MspInit(void);
|
|
89
|
|
90 #endif /* BASE_CPU2_H */
|
|
91
|
|
92 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|