Skip to content

Commit 31732e0

Browse files
committed
Import STM32Cube_FW_WB_V1.1.0 (with patch to 1.1.1) on 17-May-2019
1 parent d1dcfa8 commit 31732e0

File tree

163 files changed

+198588
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+198588
-0
lines changed

CMSIS/STM32WBxx/Include/stm32wb55xx.h

Lines changed: 13718 additions & 0 deletions
Large diffs are not rendered by default.

CMSIS/STM32WBxx/Include/stm32wbxx.h

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
/**
2+
******************************************************************************
3+
* @file stm32wbxx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS STM32WBxx Device Peripheral Access Layer Header File.
6+
*
7+
* The file is the unique include file that the application programmer
8+
* is using in the C source code, usually in main.c. This file contains:
9+
* - Configuration section that allows to select:
10+
* - The STM32WBxx device used in the target application
11+
* - To use or not the peripheral's drivers in application code(i.e.
12+
* code will be based on direct access to peripheral's registers
13+
* rather than drivers API), this option is controlled by
14+
* "#define USE_HAL_DRIVER"
15+
*
16+
******************************************************************************
17+
* @attention
18+
*
19+
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
20+
* All rights reserved.</center></h2>
21+
*
22+
* This software component is licensed by ST under BSD 3-Clause license,
23+
* the "License"; You may not use this file except in compliance with the
24+
* License. You may obtain a copy of the License at:
25+
* opensource.org/licenses/BSD-3-Clause
26+
*
27+
******************************************************************************
28+
*/
29+
30+
/** @addtogroup CMSIS
31+
* @{
32+
*/
33+
34+
/** @addtogroup stm32wbxx
35+
* @{
36+
*/
37+
38+
#ifndef __STM32WBxx_H
39+
#define __STM32WBxx_H
40+
41+
#ifdef __cplusplus
42+
extern "C" {
43+
#endif /* __cplusplus */
44+
45+
/** @addtogroup Library_configuration_section
46+
* @{
47+
*/
48+
49+
/**
50+
* @brief STM32 Family
51+
*/
52+
#if !defined (STM32WB)
53+
#define STM32WB
54+
#endif /* STM32WB */
55+
56+
/* Tip: To avoid modifying this file each time you need to switch between these
57+
devices, you can define the device in your toolchain compiler preprocessor.
58+
*/
59+
#if !defined (USE_HAL_DRIVER)
60+
/**
61+
* @brief Comment the line below if you will not use the peripherals drivers.
62+
In this case, these drivers will not be included and the application code will
63+
be based on direct access to peripherals registers
64+
*/
65+
/*#define USE_HAL_DRIVER */
66+
#endif /* USE_HAL_DRIVER */
67+
68+
/**
69+
* @brief CMSIS Device version number
70+
*/
71+
#define __STM32WBxx_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
72+
#define __STM32WBxx_CMSIS_VERSION_SUB1 (0x01U) /*!< [23:16] sub1 version */
73+
#define __STM32WBxx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
74+
#define __STM32WBxx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
75+
#define __STM32WBxx_CMSIS_DEVICE_VERSION ((__STM32WBxx_CMSIS_VERSION_MAIN << 24)\
76+
|(__STM32WBxx_CMSIS_VERSION_SUB1 << 16)\
77+
|(__STM32WBxx_CMSIS_VERSION_SUB2 << 8 )\
78+
|(__STM32WBxx_CMSIS_VERSION_RC))
79+
80+
/**
81+
* @}
82+
*/
83+
84+
/** @addtogroup Device_Included
85+
* @{
86+
*/
87+
88+
#if defined(STM32WB55xx)
89+
#include "stm32wb55xx.h"
90+
#else
91+
#error "Please select first the target STM32WBxx device used in your application, for instance xxx (in stm32wbxx.h file)"
92+
#endif
93+
94+
/**
95+
* @}
96+
*/
97+
98+
/** @addtogroup Exported_types
99+
* @{
100+
*/
101+
typedef enum
102+
{
103+
RESET = 0,
104+
SET = !RESET
105+
} FlagStatus, ITStatus;
106+
107+
typedef enum
108+
{
109+
DISABLE = 0,
110+
ENABLE = !DISABLE
111+
} FunctionalState;
112+
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
113+
114+
typedef enum
115+
{
116+
SUCCESS = 0,
117+
ERROR = !SUCCESS
118+
} ErrorStatus;
119+
120+
/**
121+
* @}
122+
*/
123+
124+
125+
/** @addtogroup Exported_macros
126+
* @{
127+
*/
128+
#define SET_BIT(REG, BIT) ((REG) |= (BIT))
129+
130+
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
131+
132+
#define READ_BIT(REG, BIT) ((REG) & (BIT))
133+
134+
#define CLEAR_REG(REG) ((REG) = (0x0))
135+
136+
#define WRITE_REG(REG, VAL) ((REG) = (VAL))
137+
138+
#define READ_REG(REG) ((REG))
139+
140+
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
141+
142+
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
143+
/**
144+
* @}
145+
*/
146+
147+
#if defined (USE_HAL_DRIVER)
148+
#include "stm32wbxx_hal.h"
149+
#endif /* USE_HAL_DRIVER */
150+
151+
#ifdef __cplusplus
152+
}
153+
#endif /* __cplusplus */
154+
155+
#endif /* __STM32WBxx_H */
156+
/**
157+
* @}
158+
*/
159+
160+
/**
161+
* @}
162+
*/
163+
164+
165+
166+
167+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/**
2+
******************************************************************************
3+
* @file system_stm32wbxx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS Cortex Device System Source File for STM32WBxx devices.
6+
******************************************************************************
7+
* @attention
8+
*
9+
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
10+
* All rights reserved.</center></h2>
11+
*
12+
* This software component is licensed by ST under BSD 3-Clause license,
13+
* the "License"; You may not use this file except in compliance with the
14+
* License. You may obtain a copy of the License at:
15+
* opensource.org/licenses/BSD-3-Clause
16+
*
17+
******************************************************************************
18+
*/
19+
20+
/** @addtogroup CMSIS
21+
* @{
22+
*/
23+
24+
/** @addtogroup stm32wbxx_system
25+
* @{
26+
*/
27+
28+
/**
29+
* @brief Define to prevent recursive inclusion
30+
*/
31+
#ifndef __SYSTEM_STM32WBXX_H
32+
#define __SYSTEM_STM32WBXX_H
33+
34+
#ifdef __cplusplus
35+
extern "C" {
36+
#endif
37+
38+
#include <stdint.h>
39+
40+
/** @addtogroup STM32WBxx_System_Includes
41+
* @{
42+
*/
43+
44+
/**
45+
* @}
46+
*/
47+
48+
49+
/** @addtogroup STM32WBxx_System_Exported_types
50+
* @{
51+
*/
52+
/* The SystemCoreClock variable is updated in three ways:
53+
1) by calling CMSIS function SystemCoreClockUpdate()
54+
2) by calling HAL API function HAL_RCC_GetSysClockFreq()
55+
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
56+
Note: If you use this function to configure the system clock; then there
57+
is no need to call the 2 first functions listed above, since SystemCoreClock
58+
variable is updated automatically.
59+
*/
60+
61+
extern uint32_t SystemCoreClock; /*!< System Clock Frequency */
62+
63+
extern const uint32_t AHBPrescTable[16]; /*!< AHB prescalers table values */
64+
extern const uint32_t APBPrescTable[8]; /*!< APB prescalers table values */
65+
extern const uint32_t MSIRangeTable[16]; /*!< MSI ranges table values */
66+
67+
extern const uint32_t SmpsPrescalerTable[4][6]; /*!< SMPS factor ranges table values */
68+
/**
69+
* @}
70+
*/
71+
72+
/** @addtogroup STM32WBxx_System_Exported_Constants
73+
* @{
74+
*/
75+
76+
/**
77+
* @}
78+
*/
79+
80+
/** @addtogroup STM32WBxx_System_Exported_Macros
81+
* @{
82+
*/
83+
84+
/**
85+
* @}
86+
*/
87+
88+
/** @addtogroup STM32WBxx_System_Exported_Functions
89+
* @{
90+
*/
91+
92+
extern void SystemInit(void);
93+
extern void SystemCoreClockUpdate(void);
94+
/**
95+
* @}
96+
*/
97+
98+
#ifdef __cplusplus
99+
}
100+
#endif
101+
102+
#endif /*__SYSTEM_STM32WBXX_H */
103+
104+
/**
105+
* @}
106+
*/
107+
108+
/**
109+
* @}
110+
*/
111+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)