Skip to content

Commit 48c3549

Browse files
committed
Use extern "C" for app_main function only
1 parent c1b9bfb commit 48c3549

File tree

1 file changed

+1
-9
lines changed
  • examples_esp/getting_started/src

1 file changed

+1
-9
lines changed

examples_esp/getting_started/src/main.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
#include "sdkconfig.h"
66
#include <driver/spi_master.h>
77

8-
#ifdef __cplusplus
9-
extern "C" {
10-
#endif
11-
128
#ifdef RF24_CE_PIN
139
#define CE_PIN RF24_CE_PIN
1410
#else
@@ -27,7 +23,7 @@ static const char* TAG = "RF24/examples_esp/getting_started";
2723

2824
spi_bus_config_t busConfig;
2925

30-
void app_main(void)
26+
extern "C" void app_main(void)
3127
{
3228
#ifdef RF24_DEFAULT_MOSI
3329
printf("using MOSI pin %d!\n", RF24_DEFAULT_MOSI);
@@ -73,7 +69,3 @@ void app_main(void)
7369
vTaskDelay(1000 / portTICK_PERIOD_MS);
7470
}
7571
}
76-
77-
#ifdef __cplusplus
78-
}
79-
#endif

0 commit comments

Comments
 (0)