From 3f68de64b6b7d5fa7524b9b0eb5419e0b96d2d61 Mon Sep 17 00:00:00 2001 From: Jacques Germishuys Date: Fri, 4 Aug 2017 22:06:11 +0200 Subject: [PATCH] guard uart functions with extern "C" --- ports/avr/uart.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/avr/uart.h b/ports/avr/uart.h index 15c0370..69db35c 100644 --- a/ports/avr/uart.h +++ b/ports/avr/uart.h @@ -13,6 +13,9 @@ #include "atom.h" +#ifdef __cplusplus +extern "C" { +#endif /* * Perform UART startup initialization. @@ -23,3 +26,7 @@ int uart_init(uint32_t baudrate); * Send one character to the UART. */ int uart_putchar(char c, FILE *stream); + +#ifdef __cplusplus +} +#endif