aboutsummaryrefslogtreecommitdiff
path: root/spi.h
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-03-14 11:37:43 +0100
committerKarel Kočí <cynerd@email.cz>2015-03-14 11:37:43 +0100
commit401d8ce02e0638f96d66b9ac1f0b43219b2d20d2 (patch)
tree0a11ccfbb368be80253e658b9054ebde684e0d60 /spi.h
parent8a115123eee5b9e294ff86ec4e41e6112dc47774 (diff)
downloadavr-ioe-401d8ce02e0638f96d66b9ac1f0b43219b2d20d2.tar.gz
avr-ioe-401d8ce02e0638f96d66b9ac1f0b43219b2d20d2.tar.bz2
avr-ioe-401d8ce02e0638f96d66b9ac1f0b43219b2d20d2.zip
SPI implemented !NOT TESTED!
SPI for spi hardware implemented, but newer tested yet!
Diffstat (limited to 'spi.h')
-rw-r--r--spi.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/spi.h b/spi.h
new file mode 100644
index 0000000..acee3b5
--- /dev/null
+++ b/spi.h
@@ -0,0 +1,21 @@
+#include <avr/io.h>
+#include <stdint.h>
+
+#include "mcu/mcu.h"
+
+#ifndef _IOE_SPI_H_
+#define _IOE_SPI_H_
+
+inline void ioe_spi_init(void);
+inline int ioe_spi_ready(void);
+inline void ioe_spi_join(void);
+#ifdef IOE_SPI_MASTER
+inline int8_t ioe_spi_transfer(int8_t data);
+#else /* IOE_SPI_MASTER */
+inline void ioe_spi_expose(int8_t data);
+#endif /* IOE_SPI_MASTER */
+
+// Following function must be user defined
+inline void ioe_spi_retrieve(int8_t);
+
+#endif /* _IOE_SPI_H_ */