]> granicus.if.org Git - esp-idf/commitdiff
console: Add C++ guards to header
authorAngus Gratton <angus@espressif.com>
Mon, 29 Jan 2018 01:22:04 +0000 (09:22 +0800)
committerAngus Gratton <gus@projectgus.com>
Mon, 29 Jan 2018 01:22:04 +0000 (09:22 +0800)
As reported on forum https://esp32.com/viewtopic.php?f=2&t=4478&p=19659

components/console/esp_console.h

index bea7eee7281f86b9c08059158cde702c57878afa..45a10b7a2ed63eb2ec2f67c9dedafb7010eb258d 100644 (file)
 // limitations under the License.
 #pragma once
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <stddef.h>
 #include "esp_err.h"
 
@@ -181,3 +186,7 @@ const char *esp_console_get_hint(const char *buf, int *color, int *bold);
  *      - ESP_ERR_INVALID_STATE, if esp_console_init wasn't called
  */
 esp_err_t esp_console_register_help_command();
+
+#ifdef __cplusplus
+}
+#endif