Skip to content

Commit af10a0e

Browse files
committed
Remove variant.h header dependencies
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent fd6c14a commit af10a0e

File tree

110 files changed

+67
-354
lines changed

Some content is hidden

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

110 files changed

+67
-354
lines changed

cores/arduino/pins_arduino.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
*/
1818
#ifndef _PINS_ARDUINO_H_
1919
#define _PINS_ARDUINO_H_
20+
#include <stdlib.h> /* Required for static_assert */
2021
// Include board variant
2122
#include "variant.h"
23+
#include "PinNames.h"
24+
2225

2326
// Avoid PortName issue
2427
_Static_assert(LastPort <= 0x0F, "PortName must be less than 16");
@@ -201,6 +204,7 @@ static const uint8_t SCL = PIN_WIRE_SCL;
201204
#ifdef __cplusplus
202205
extern "C" {
203206
#endif
207+
extern const PinName digitalPin[];
204208

205209
#define NOT_AN_INTERRUPT NC // -1
206210

cores/arduino/stm32/interrupt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#define __INTERRUPT_H
4141

4242
/* Includes ------------------------------------------------------------------*/
43+
#include "stm32_def.h"
4344
#include "variant.h"
4445

4546
#if defined(STM32F3xx)

cores/arduino/stm32/rtc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
#define __RTC_H
4141

4242
/* Includes ------------------------------------------------------------------*/
43+
#include <stdbool.h>
44+
#include "stm32_def.h"
4345
#include "variant.h"
4446
#include "backup.h"
4547
#include "clock.h"

cores/arduino/stm32/stm32_eeprom.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#define __STM32_EEPROM_H
3838

3939
/* Includes ------------------------------------------------------------------*/
40+
#include "stm32_def.h"
4041
#include "variant.h"
4142

4243
#ifdef __cplusplus

cores/arduino/stm32/timer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
#define __TIMER_H
4141

4242
/* Includes ------------------------------------------------------------------*/
43+
#include "stm32_def.h"
4344
#include "variant.h"
45+
#include "PinNames.h"
4446

4547
#ifdef __cplusplus
4648
extern "C" {

cores/arduino/stm32/twi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
#define __TWI_H__
4242

4343
/* Includes ------------------------------------------------------------------*/
44+
#include "stm32_def.h"
4445
#include "variant.h"
46+
#include "PeripheralPins.h"
4547

4648
#ifdef __cplusplus
4749
extern "C" {

cores/arduino/stm32/uart.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
#define __UART_H
3939

4040
/* Includes ------------------------------------------------------------------*/
41+
#include "stm32_def.h"
4142
#include "variant.h"
43+
#include "PinNames.h"
4244

4345
#ifdef __cplusplus
4446
extern "C" {

cores/arduino/stm32/usb/cdc/cdc_queue.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#define __CDC_QUEUE_H
4242

4343
/* Includes ------------------------------------------------------------------*/
44+
#include <stdbool.h>
4445
#include "usbd_def.h"
4546

4647
#ifdef __cplusplus

cores/arduino/stm32/usb/hid/usbd_hid_composite_if.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535
#ifdef USBCON
3636
#ifdef USBD_USE_HID_COMPOSITE
37-
37+
#include <stdbool.h>
3838
#include "usbd_desc.h"
3939
#include "usbd_hid_composite_if.h"
4040
#include "usbd_hid_composite.h"

cores/arduino/stm32/usb/usbd_conf.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ extern "C" {
2727

2828
#ifdef USBCON
2929
/* Includes ------------------------------------------------------------------*/
30+
#include "stm32_def.h"
3031
#include "variant.h"
3132

3233
#if !defined(USB_BASE) && !defined(USB_OTG_DEVICE_BASE)

variants/ARMED_V1/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
1818

19-
#include "variant.h"
19+
#include "pins_arduino.h"
2020

2121
#ifdef __cplusplus
2222
extern "C" {

variants/ARMED_V1/variant.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,13 @@
1919
#ifndef _VARIANT_ARDUINO_STM32_
2020
#define _VARIANT_ARDUINO_STM32_
2121

22-
/*----------------------------------------------------------------------------
23-
* Headers
24-
*----------------------------------------------------------------------------*/
25-
#include "PeripheralPins.h"
26-
2722
#ifdef __cplusplus
2823
extern "C" {
2924
#endif // __cplusplus
3025

3126
/*----------------------------------------------------------------------------
3227
* Pins
3328
*----------------------------------------------------------------------------*/
34-
extern const PinName digitalPin[];
3529

3630
#define PA0 0 //D0
3731
#define PA1 1 //D1

variants/BLACK_F407XX/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*******************************************************************************
2929
*/
3030

31-
#include "variant.h"
31+
#include "pins_arduino.h"
3232

3333
#ifdef __cplusplus
3434
extern "C" {

variants/BLACK_F407XX/variant.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,13 @@
3131
#ifndef _VARIANT_ARDUINO_STM32_
3232
#define _VARIANT_ARDUINO_STM32_
3333

34-
/*----------------------------------------------------------------------------
35-
* Headers
36-
*----------------------------------------------------------------------------*/
37-
#include "PeripheralPins.h"
38-
3934
#ifdef __cplusplus
4035
extern "C" {
4136
#endif // __cplusplus
4237

4338
/*----------------------------------------------------------------------------
4439
* Pins
4540
*----------------------------------------------------------------------------*/
46-
extern const PinName digitalPin[];
4741
#if defined(ARDUINO_BLACK_F407VE) || defined(ARDUINO_BLACK_F407VG)
4842
// Right Side
4943
#define PE1 0

variants/BLUEPILL_F103XX/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
*******************************************************************************
2929
*/
30-
#include "variant.h"
30+
#include "pins_arduino.h"
3131

3232
#ifdef __cplusplus
3333
extern "C" {

variants/BLUEPILL_F103XX/variant.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,13 @@
3030
#ifndef _VARIANT_ARDUINO_STM32_
3131
#define _VARIANT_ARDUINO_STM32_
3232

33-
/*----------------------------------------------------------------------------
34-
* Headers
35-
*----------------------------------------------------------------------------*/
36-
#include "PeripheralPins.h"
37-
3833
#ifdef __cplusplus
3934
extern "C" {
4035
#endif // __cplusplus
4136

4237
/*----------------------------------------------------------------------------
4338
* Pins
4439
*----------------------------------------------------------------------------*/
45-
extern const PinName digitalPin[];
4640

4741
// Bluepill USB connector on the top, MCU side - Blackpill USB connector on bottom, MCU Side (pins are reversed vertically for Arduino Ananlog pin correct sequence.
4842
// Left Side

variants/BLUE_F407VE_Mini/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*******************************************************************************
2929
*/
3030

31-
#include "variant.h"
31+
#include "pins_arduino.h"
3232

3333
#ifdef __cplusplus
3434
extern "C" {

variants/BLUE_F407VE_Mini/variant.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,13 @@
3131
#ifndef _VARIANT_ARDUINO_STM32_
3232
#define _VARIANT_ARDUINO_STM32_
3333

34-
/*----------------------------------------------------------------------------
35-
* Headers
36-
*----------------------------------------------------------------------------*/
37-
#include "PeripheralPins.h"
38-
3934
#ifdef __cplusplus
4035
extern "C" {
4136
#endif // __cplusplus
4237

4338
/*----------------------------------------------------------------------------
4439
* Pins
4540
*----------------------------------------------------------------------------*/
46-
extern const PinName digitalPin[];
4741
// External (left to right)
4842
// GND
4943
// VBAT

variants/DEMO_F030F4/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*******************************************************************************
2929
*/
3030

31-
#include "variant.h"
31+
#include "pins_arduino.h"
3232

3333
#ifdef __cplusplus
3434
extern "C" {

variants/DEMO_F030F4/variant.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,13 @@
3030
#ifndef _VARIANT_ARDUINO_STM32_
3131
#define _VARIANT_ARDUINO_STM32_
3232

33-
/*----------------------------------------------------------------------------
34-
* Headers
35-
*----------------------------------------------------------------------------*/
36-
#include "PeripheralPins.h"
37-
3833
#ifdef __cplusplus
3934
extern "C" {
4035
#endif // __cplusplus
4136

4237
/*----------------------------------------------------------------------------
4338
* Pins
4439
*----------------------------------------------------------------------------*/
45-
extern const PinName digitalPin[];
4640

4741
// USB connector on the top, MCU side
4842
// Left Side

variants/DISCO_F030R8/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*******************************************************************************
2929
*/
3030

31-
#include "variant.h"
31+
#include "pins_arduino.h"
3232

3333
#ifdef __cplusplus
3434
extern "C" {

variants/DISCO_F030R8/variant.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,13 @@
3131
#ifndef _VARIANT_ARDUINO_STM32_
3232
#define _VARIANT_ARDUINO_STM32_
3333

34-
/*----------------------------------------------------------------------------
35-
* Headers
36-
*----------------------------------------------------------------------------*/
37-
38-
#include "PeripheralPins.h"
39-
4034
#ifdef __cplusplus
4135
extern "C" {
4236
#endif // __cplusplus
4337

4438
/*----------------------------------------------------------------------------
4539
* Pins
4640
*----------------------------------------------------------------------------*/
47-
extern const PinName digitalPin[];
4841

4942
// P1 connector Right side (bottom view)
5043
#define PC13 0

variants/DISCO_F072RB/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*******************************************************************************
2929
*/
3030

31-
#include "variant.h"
31+
#include "pins_arduino.h"
3232

3333
#ifdef __cplusplus
3434
extern "C" {

variants/DISCO_F072RB/variant.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,13 @@
3131
#ifndef _VARIANT_ARDUINO_STM32_
3232
#define _VARIANT_ARDUINO_STM32_
3333

34-
/*----------------------------------------------------------------------------
35-
* Headers
36-
*----------------------------------------------------------------------------*/
37-
38-
#include "PeripheralPins.h"
39-
4034
#ifdef __cplusplus
4135
extern "C" {
4236
#endif // __cplusplus
4337

4438
/*----------------------------------------------------------------------------
4539
* Pins
4640
*----------------------------------------------------------------------------*/
47-
extern const PinName digitalPin[];
4841

4942
// USB USER CN2
5043
// By default, SB20,23 (USB-USER) are OFF.

variants/DISCO_F100RB/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
1818

19-
#include "variant.h"
19+
#include "pins_arduino.h"
2020

2121
#ifdef __cplusplus
2222
extern "C" {

variants/DISCO_F100RB/variant.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,13 @@
1919
#ifndef _VARIANT_ARDUINO_STM32_
2020
#define _VARIANT_ARDUINO_STM32_
2121

22-
/*----------------------------------------------------------------------------
23-
* Headers
24-
*----------------------------------------------------------------------------*/
25-
#include "PeripheralPins.h"
26-
2722
#ifdef __cplusplus
2823
extern "C" {
2924
#endif // __cplusplus
3025

3126
/*----------------------------------------------------------------------------
3227
* Pins
3328
*----------------------------------------------------------------------------*/
34-
extern const PinName digitalPin[];
3529

3630
// P1 connector
3731
#define PC13 0

variants/DISCO_F407VG/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
1818

19-
#include "variant.h"
19+
#include "pins_arduino.h"
2020

2121
#ifdef __cplusplus
2222
extern "C" {

variants/DISCO_F407VG/variant.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,13 @@
1919
#ifndef _VARIANT_ARDUINO_STM32_
2020
#define _VARIANT_ARDUINO_STM32_
2121

22-
/*----------------------------------------------------------------------------
23-
* Headers
24-
*----------------------------------------------------------------------------*/
25-
#include "PeripheralPins.h"
26-
2722
#ifdef __cplusplus
2823
extern "C" {
2924
#endif // __cplusplus
3025

3126
/*----------------------------------------------------------------------------
3227
* Pins
3328
*----------------------------------------------------------------------------*/
34-
extern const PinName digitalPin[];
3529

3630
//P1 connector Right side
3731
#define PC0 0

variants/DISCO_F746NG/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
1818

19-
#include "variant.h"
19+
#include "pins_arduino.h"
2020

2121
#ifdef __cplusplus
2222
extern "C" {

variants/DISCO_F746NG/variant.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,13 @@
1919
#ifndef _VARIANT_ARDUINO_STM32_
2020
#define _VARIANT_ARDUINO_STM32_
2121

22-
/*----------------------------------------------------------------------------
23-
* Headers
24-
*----------------------------------------------------------------------------*/
25-
#include "PeripheralPins.h"
26-
2722
#ifdef __cplusplus
2823
extern "C" {
2924
#endif // __cplusplus
3025

3126
/*----------------------------------------------------------------------------
3227
* Pins
3328
*----------------------------------------------------------------------------*/
34-
extern const PinName digitalPin[];
3529

3630
#define PC7 0
3731
#define PC6 1

0 commit comments

Comments
 (0)