From 045e95a7bee443825a3eecdd5f10f16d812be1d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= <cynerd@email.cz>
Date: Sun, 22 Mar 2015 14:28:01 +0100
Subject: Add SPI USI mcu support check

---
 spi_usi.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/spi_usi.h b/spi_usi.h
index 51a4f40..900999f 100644
--- a/spi_usi.h
+++ b/spi_usi.h
@@ -3,6 +3,8 @@
 #include <avr/interrupt.h>
 #include <inttypes.h>
 
+#include "mcu/mcu.h"
+
 #ifndef _IOE_SPI_USI_H_
 #define _IOE_SPI_USI_H_
 
@@ -35,14 +37,17 @@ inline uint8_t ioe_spi_usi_busy(void);
  */
 inline void ioe_spi_usi_join(void);
 
-// Following function must be user defined
 /*
  * This function must be defined by user.
  * This function is called every time transfer is finished.
  * And until return from this function interrupts are disabled.
+ * WARNING: Please define this function in your code.
  */
 inline void ioe_spi_usi_retrieve(int8_t data);
 #endif /* IOE_SPI_USI_MASTER */
 
+#if !(__MCU_ATtiny4313__ || __MCU_ATtiny85__)
+#error "USI is not probably supported by your MCU."
+#endif
 
 #endif /* _IOE_SPI_USI_H_ */
-- 
cgit v1.2.3