File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 1818
1919#include "pins_arduino.h"
2020
21+ #ifdef __cplusplus
22+ extern "C" {
23+ #endif
24+
2125void __libc_init_array (void );
2226
2327WEAK uint32_t pinNametoDigitalPin (PinName p )
@@ -33,4 +37,8 @@ WEAK uint32_t pinNametoDigitalPin(PinName p)
3337WEAK void init ( void )
3438{
3539 hw_config_init ();
36- }
40+ }
41+
42+ #ifdef __cplusplus
43+ }
44+ #endif
Original file line number Diff line number Diff line change 1818#ifndef _PINS_ARDUINO_H_
1919#define _PINS_ARDUINO_H_
2020
21+ // API compatibility
22+ #include "variant.h"
23+
24+ #ifdef __cplusplus
25+ extern "C" {
26+ #endif
27+
2128/**
2229 * Libc porting layers
2330 */
2431#if defined ( __GNUC__ ) /* GCC CS3 */
2532# include <syscalls.h> /** RedHat Newlib minimal stub */
2633#endif
2734
28- // API compatibility
29- #include "variant.h"
30-
3135#define NOT_AN_INTERRUPT NC // -1
3236
3337#define NUM_DIGITAL_PINS DEND
@@ -61,6 +65,8 @@ uint32_t pinNametoDigitalPin(PinName p);
6165#define digitalPinToPort (p ) ( get_GPIO_Port(digitalPinToPinName(p)) )
6266#define digitalPinToBitMask (p ) ( STM_GPIO_PIN(digitalPinToPinName(p)) )
6367
64-
68+ #ifdef __cplusplus
69+ }
70+ #endif
6571
6672#endif /*_PINS_ARDUINO_H_*/
You can’t perform that action at this time.
0 commit comments