From a8feb21322dd4553c5e3369cc5759ec13e5bbb23 Mon Sep 17 00:00:00 2001 From: jp7g21 <jp7g21@soton.ac.uk> Date: Sat, 13 Nov 2021 20:24:50 +0000 Subject: [PATCH] Made command.h work in c++ --- emb/command.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/emb/command.h b/emb/command.h index abbb552..378761e 100644 --- a/emb/command.h +++ b/emb/command.h @@ -3,12 +3,20 @@ #include <stdint.h> -struct command { - char comm_ch; /* Character of command (ie 's', 'v', 'd') */ - int16_t arg[2]; -}; +#ifdef __cplusplus +extern "C" { +#endif -uint8_t uart_add_ch(char c); -struct command *get_command(void); + struct command { + char comm_ch; /* Character of command (ie 's', 'v', 'd') */ + int16_t arg[2]; + }; + + uint8_t uart_add_ch(char c); + struct command *get_command(void); +#ifdef __cplusplus +} +#endif + #endif /* _COMMAND_H */ -- GitLab