Skip to content

Commit d157eb3

Browse files
committed
STM32: correct __cplusplus brackets
1 parent 14e5d30 commit d157eb3

File tree

23 files changed

+71
-20
lines changed

23 files changed

+71
-20
lines changed

targets/TARGET_STM/TARGET_STM32F0/can_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,8 @@ extern "C" {
4040

4141
#endif // DEVICE_CAN
4242

43+
#ifdef __cplusplus
44+
}
45+
#endif
46+
4347
#endif

targets/TARGET_STM/TARGET_STM32F0/i2c_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,8 @@ static inline uint32_t get_i2c_timing(int hz)
6969

7070
#endif // DEVICE_I2C
7171

72+
#ifdef __cplusplus
73+
}
74+
#endif
75+
7276
#endif

targets/TARGET_STM/TARGET_STM32F1/can_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,8 @@ extern "C" {
4141

4242
#endif // DEVICE_CAN
4343

44+
#ifdef __cplusplus
45+
}
46+
#endif
47+
4448
#endif

targets/TARGET_STM/TARGET_STM32F1/i2c_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,8 @@ extern "C" {
4545

4646
#endif // DEVICE_I2C
4747

48+
#ifdef __cplusplus
49+
}
50+
#endif
51+
4852
#endif

targets/TARGET_STM/TARGET_STM32F2/can_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,8 @@ extern "C" {
5252

5353
#endif // DEVICE_CAN
5454

55+
#ifdef __cplusplus
56+
}
57+
#endif
58+
5559
#endif

targets/TARGET_STM/TARGET_STM32F2/i2c_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,8 @@ extern "C" {
4444

4545
#endif // DEVICE_I2C
4646

47+
#ifdef __cplusplus
48+
}
49+
#endif
50+
4751
#endif

targets/TARGET_STM/TARGET_STM32F3/can_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,8 @@ extern "C" {
4141

4242
#endif // DEVICE_CAN
4343

44+
#ifdef __cplusplus
45+
}
46+
#endif
47+
4448
#endif

targets/TARGET_STM/TARGET_STM32F3/i2c_device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ static inline uint32_t get_i2c_timing(int hz)
9393
return tim;
9494
}
9595

96+
#endif // DEVICE_I2C
97+
9698
#ifdef __cplusplus
9799
}
98100
#endif
99101

100-
#endif // DEVICE_I2C
101-
102102
#endif

targets/TARGET_STM/TARGET_STM32F4/can_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,8 @@ extern "C" {
7070

7171
#endif // DEVICE_CAN
7272

73+
#ifdef __cplusplus
74+
}
75+
#endif
76+
7377
#endif

targets/TARGET_STM/TARGET_STM32F4/i2c_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@ extern "C" {
3131

3232
#endif // DEVICE_I2C
3333

34+
#ifdef __cplusplus
35+
}
36+
#endif
37+
3438
#endif

targets/TARGET_STM/TARGET_STM32F7/can_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,8 @@ extern "C" {
7171

7272
#endif // DEVICE_CAN
7373

74+
#ifdef __cplusplus
75+
}
76+
#endif
77+
7478
#endif

targets/TARGET_STM/TARGET_STM32F7/i2c_device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ static inline uint32_t get_i2c_timing(int hz)
7878
return tim;
7979
}
8080

81+
#endif // DEVICE_I2C
82+
8183
#ifdef __cplusplus
8284
}
8385
#endif
8486

85-
#endif // DEVICE_I2C
86-
8787
#endif

targets/TARGET_STM/TARGET_STM32G0/i2c_device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ static inline uint32_t get_i2c_timing(int hz)
6161
return tim;
6262
}
6363

64+
#endif // DEVICE_I2C
65+
6466
#ifdef __cplusplus
6567
}
6668
#endif
6769

68-
#endif // DEVICE_I2C
69-
7070
#endif

targets/TARGET_STM/TARGET_STM32G4/i2c_device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ static inline uint32_t get_i2c_timing(int hz)
5555
return tim;
5656
}
5757

58+
#endif // DEVICE_I2C
59+
5860
#ifdef __cplusplus
5961
}
6062
#endif
6163

62-
#endif // DEVICE_I2C
63-
6464
#endif

targets/TARGET_STM/TARGET_STM32H7/i2c_device.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ extern "C" {
3838
/* Provide the suitable timing depending on requested frequency */
3939
extern uint32_t get_i2c_timing(I2CName i2c, int hz);
4040

41+
#endif // DEVICE_I2C
4142

4243
#ifdef __cplusplus
4344
}
4445
#endif
4546

46-
#endif // DEVICE_I2C
47-
4847
#endif

targets/TARGET_STM/TARGET_STM32L0/i2c_device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ static inline uint32_t get_i2c_timing(int hz)
6666
return tim;
6767
}
6868

69+
#endif // DEVICE_I2C
70+
6971
#ifdef __cplusplus
7072
}
7173
#endif
7274

73-
#endif // DEVICE_I2C
74-
7575
#endif

targets/TARGET_STM/TARGET_STM32L1/i2c_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@ extern "C" {
3131

3232
#endif // DEVICE_I2C
3333

34+
#ifdef __cplusplus
35+
}
36+
#endif
37+
3438
#endif

targets/TARGET_STM/TARGET_STM32L4/can_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,8 @@ extern "C" {
4242

4343
#endif // DEVICE_CAN
4444

45+
#ifdef __cplusplus
46+
}
47+
#endif
48+
4549
#endif

targets/TARGET_STM/TARGET_STM32L4/i2c_device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ static inline uint32_t get_i2c_timing(int hz)
9292
return tim;
9393
}
9494

95+
#endif // DEVICE_I2C
96+
9597
#ifdef __cplusplus
9698
}
9799
#endif
98100

99-
#endif // DEVICE_I2C
100-
101101
#endif

targets/TARGET_STM/TARGET_STM32L5/can_device.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,8 @@ extern "C" {
3939

4040
#endif // DEVICE_CAN
4141

42+
#ifdef __cplusplus
43+
}
44+
#endif
45+
4246
#endif

targets/TARGET_STM/TARGET_STM32L5/i2c_device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ static inline uint32_t get_i2c_timing(int hz)
6161
return tim;
6262
}
6363

64+
#endif // DEVICE_I2C
65+
6466
#ifdef __cplusplus
6567
}
6668
#endif
6769

68-
#endif // DEVICE_I2C
69-
7070
#endif

targets/TARGET_STM/TARGET_STM32WB/i2c_device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ static inline uint32_t get_i2c_timing(int hz)
7272
}
7373
return tim;
7474
}
75+
:
76+
#endif // DEVICE_I2C
7577

7678
#ifdef __cplusplus
7779
}
7880
#endif
7981

80-
#endif // DEVICE_I2C
81-
8282
#endif

targets/TARGET_STM/TARGET_STM32WL/i2c_device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ static inline uint32_t get_i2c_timing(int hz)
5555
return tim;
5656
}
5757

58+
#endif // DEVICE_I2C
59+
5860
#ifdef __cplusplus
5961
}
6062
#endif
6163

62-
#endif // DEVICE_I2C
63-
6464
#endif

0 commit comments

Comments
 (0)