File tree 2 files changed +19
-5
lines changed
2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 18
18
19
19
#include "pins_arduino.h"
20
20
21
+ #ifdef __cplusplus
22
+ extern "C" {
23
+ #endif
24
+
21
25
void __libc_init_array (void );
22
26
23
27
WEAK uint32_t pinNametoDigitalPin (PinName p )
@@ -33,4 +37,8 @@ WEAK uint32_t pinNametoDigitalPin(PinName p)
33
37
WEAK void init ( void )
34
38
{
35
39
hw_config_init ();
36
- }
40
+ }
41
+
42
+ #ifdef __cplusplus
43
+ }
44
+ #endif
Original file line number Diff line number Diff line change 18
18
#ifndef _PINS_ARDUINO_H_
19
19
#define _PINS_ARDUINO_H_
20
20
21
+ // API compatibility
22
+ #include "variant.h"
23
+
24
+ #ifdef __cplusplus
25
+ extern "C" {
26
+ #endif
27
+
21
28
/**
22
29
* Libc porting layers
23
30
*/
24
31
#if defined ( __GNUC__ ) /* GCC CS3 */
25
32
# include <syscalls.h> /** RedHat Newlib minimal stub */
26
33
#endif
27
34
28
- // API compatibility
29
- #include "variant.h"
30
-
31
35
#define NOT_AN_INTERRUPT NC // -1
32
36
33
37
#define NUM_DIGITAL_PINS DEND
@@ -61,6 +65,8 @@ uint32_t pinNametoDigitalPin(PinName p);
61
65
#define digitalPinToPort (p ) ( get_GPIO_Port(digitalPinToPinName(p)) )
62
66
#define digitalPinToBitMask (p ) ( STM_GPIO_PIN(digitalPinToPinName(p)) )
63
67
64
-
68
+ #ifdef __cplusplus
69
+ }
70
+ #endif
65
71
66
72
#endif /*_PINS_ARDUINO_H_*/
You can’t perform that action at this time.
0 commit comments