From c296ed19752a4512e4f08edc6983baa7f525ad78 Mon Sep 17 00:00:00 2001 From: Sascha Schneider Date: Wed, 7 Feb 2024 10:10:12 +0100 Subject: [PATCH] Add cpp compatibility to mos_api.h --- include/mos_api.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/mos_api.h b/include/mos_api.h index a2bf825..d92e5bd 100644 --- a/include/mos_api.h +++ b/include/mos_api.h @@ -185,6 +185,10 @@ typedef struct { uint24_t* dir_ptr; /* Pointer to the directory entry in the win[] (not used at exFAT) */ } FIL; +#ifdef __cplusplus +extern "C" { +#endif + // Generic IO extern int putch(int a); extern char getch(void); @@ -252,4 +256,8 @@ extern void mos_i2c_close(void); extern uint8_t mos_i2c_write(uint8_t i2c_address, uint8_t size, unsigned char * buffer); extern uint8_t mos_i2c_read(uint8_t i2c_address, uint8_t size, unsigned char * buffer); -#endif \ No newline at end of file +#ifdef __cplusplus +} +#endif + +#endif // _MOS_H \ No newline at end of file