From 8f064dabcdd4f8d27741fd847d5c18a512706f43 Mon Sep 17 00:00:00 2001 From: Jon Sailor Date: Fri, 22 Jan 2021 19:00:40 -0500 Subject: [PATCH] tinyusb: add 'extern C' bit to tusb_console.h Public headers need the "if __cplusplus, extern C" boilerplate. Otherwise, C++ sources which include the header will look for a name-mangled symbol and fail at link time. Closes https://github.com/espressif/esp-idf/pull/6455 Closes IDFGH-4641 --- components/tinyusb/additions/include/tusb_console.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/tinyusb/additions/include/tusb_console.h b/components/tinyusb/additions/include/tusb_console.h index f7304eea31..530221dc6f 100644 --- a/components/tinyusb/additions/include/tusb_console.h +++ b/components/tinyusb/additions/include/tusb_console.h @@ -14,6 +14,10 @@ #pragma once +#ifdef __cplusplus +extern "C" { +#endif + #include "esp_err.h" /** @@ -31,3 +35,7 @@ esp_err_t esp_tusb_init_console(int cdc_intf); * @return esp_err_t */ esp_err_t esp_tusb_deinit_console(int cdc_intf); + +#ifdef __cplusplus +} +#endif