aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Tabaka <corey.tabaka@gmail.com>2013-05-31 00:57:19 -0700
committerCorey Tabaka <corey.tabaka@gmail.com>2013-07-18 02:30:41 -0700
commitc5a2254195eacf1d94cc9512f85cb71db2945959 (patch)
tree158d1b6657b4c7b76438f3684a1b9d7916e1a19d
parentde8c78df508abd75461d1399eecb6f18e0232f26 (diff)
downloadlk-c5a2254195eacf1d94cc9512f85cb71db2945959.tar.gz
[dev] Add C++ guards to headers.
-rw-r--r--include/dev/class/block.h5
-rw-r--r--include/dev/class/fb.h5
-rw-r--r--include/dev/class/i2c.h5
-rw-r--r--include/dev/class/spi.h5
4 files changed, 20 insertions, 0 deletions
diff --git a/include/dev/class/block.h b/include/dev/class/block.h
index 0af07ac4..240699d8 100644
--- a/include/dev/class/block.h
+++ b/include/dev/class/block.h
@@ -23,6 +23,7 @@
#ifndef __DEV_CLASS_BLOCK_H
#define __DEV_CLASS_BLOCK_H
+#include <compiler.h>
#include <dev/driver.h>
/* block interface */
@@ -38,11 +39,15 @@ struct block_ops {
status_t (*flush)(struct device *dev);
};
+__BEGIN_CDECLS
+
ssize_t class_block_get_size(struct device *dev);
ssize_t class_block_get_count(struct device *dev);
ssize_t class_block_write(struct device *dev, off_t offset, const void *buf, size_t count);
ssize_t class_block_read(struct device *dev, off_t offset, void *buf, size_t count);
status_t class_block_flush(struct device *dev);
+__END_CDECLS
+
#endif
diff --git a/include/dev/class/fb.h b/include/dev/class/fb.h
index 8a1f5600..e29b266e 100644
--- a/include/dev/class/fb.h
+++ b/include/dev/class/fb.h
@@ -23,6 +23,7 @@
#ifndef __DEV_CLASS_FB_H
#define __DEV_CLASS_FB_H
+#include <compiler.h>
#include <dev/driver.h>
struct fb_info {
@@ -43,11 +44,15 @@ struct fb_ops {
status_t (*update_region)(struct device *dev, size_t x, size_t y, size_t width, size_t height);
};
+__BEGIN_CDECLS
+
status_t class_fb_set_mode(struct device *dev, size_t width, size_t height, size_t bpp);
status_t class_fb_get_info(struct device *dev, struct fb_info *info);
status_t class_fb_update(struct device *dev);
status_t class_fb_update_region(struct device *dev, size_t x, size_t y, size_t width, size_t height);
+__END_CDECLS
+
#endif
diff --git a/include/dev/class/i2c.h b/include/dev/class/i2c.h
index 53ad1059..d38fbcb1 100644
--- a/include/dev/class/i2c.h
+++ b/include/dev/class/i2c.h
@@ -23,6 +23,7 @@
#ifndef __DEV_CLASS_I2C_H
#define __DEV_CLASS_I2C_H
+#include <compiler.h>
#include <dev/driver.h>
/* i2c interface */
@@ -36,9 +37,13 @@ struct i2c_ops {
status_t (*read_reg)(struct device *dev, uint8_t addr, uint8_t reg, void *value);
};
+__BEGIN_CDECLS
+
status_t class_i2c_write(struct device *dev, uint8_t addr, const void *buf, size_t len);
status_t class_i2c_read(struct device *dev, uint8_t addr, void *buf, size_t len);
status_t class_i2c_write_reg(struct device *dev, uint8_t addr, uint8_t reg, uint8_t value);
status_t class_i2c_read_reg(struct device *dev, uint8_t addr, uint8_t reg, void *value);
+__END_CDECLS
+
#endif
diff --git a/include/dev/class/spi.h b/include/dev/class/spi.h
index 309f0bbc..dad89594 100644
--- a/include/dev/class/spi.h
+++ b/include/dev/class/spi.h
@@ -23,6 +23,7 @@
#ifndef __DEV_CLASS_SPI_H
#define __DEV_CLASS_SPI_H
+#include <compiler.h>
#include <dev/driver.h>
/* spi transaction flags */
@@ -48,7 +49,11 @@ struct spi_ops {
ssize_t (*transaction)(struct device *dev, struct spi_transaction *txn, size_t count);
};
+__BEGIN_CDECLS
+
ssize_t class_spi_transaction(struct device *dev, struct spi_transaction *txn, size_t count);
+__END_CDECLS
+
#endif