summaryrefslogtreecommitdiff
path: root/components/drivers/spi
diff options
context:
space:
mode:
authorKai <[email protected]>2024-10-24 09:03:04 +0800
committerRbb666 <[email protected]>2024-10-24 20:22:48 +0800
commit5e34298f998e3e655dc5fa1985d6b1e81d70cc92 (patch)
tree73ba4125e7a2dbee8333631f0c150b5957828a49 /components/drivers/spi
parentb3d59050b049f03d954273e8921f941dd806360a (diff)
add missing extern "C" in header to support cpp
Diffstat (limited to 'components/drivers/spi')
-rw-r--r--components/drivers/spi/dev_spi_flash_sfud.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/components/drivers/spi/dev_spi_flash_sfud.h b/components/drivers/spi/dev_spi_flash_sfud.h
index 7769ddc808..5c3236fcce 100644
--- a/components/drivers/spi/dev_spi_flash_sfud.h
+++ b/components/drivers/spi/dev_spi_flash_sfud.h
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2016-09-28 armink first version.
+ * 2024-10-24 yekai Add C++ support
*/
#ifndef __DEV_SPI_FLASH_SFUD_H__
@@ -16,6 +17,10 @@
#include "./sfud/inc/sfud.h"
#include "dev_spi_flash.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* Probe SPI flash by SFUD(Serial Flash Universal Driver) driver library and though SPI device.
*
@@ -66,4 +71,8 @@ sfud_flash_t rt_sfud_flash_find(const char *spi_dev_name);
*/
sfud_flash_t rt_sfud_flash_find_by_dev_name(const char *flash_dev_name);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __DEV_SPI_FLASH_SFUD_H__ */