From bab75a6068ab0a64fe22395ad11efafccbf0d842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 11 Oct 2015 13:06:28 +0200 Subject: Implement SPI and remove files --- spi_usi.h | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 spi_usi.h (limited to 'spi_usi.h') diff --git a/spi_usi.h b/spi_usi.h deleted file mode 100644 index 900999f..0000000 --- a/spi_usi.h +++ /dev/null @@ -1,53 +0,0 @@ -#include -#include -#include -#include - -#include "mcu/mcu.h" - -#ifndef _IOE_SPI_USI_H_ -#define _IOE_SPI_USI_H_ - -/* - * Initialize USI as SPI - * - * NOTE: Global interrupt must be enabled for right function. - * { SREG |= _BV(7) } - */ -inline void ioe_spi_usi_init(void); -#ifdef IOE_SPI_USI_MASTER -/* - * Swaps byte with slave over SPI. - */ -inline int8_t ioe_spi_usi_transfer(int8_t data); -#else -/* - * Expose data for next master request. - * Please don't use this when device is busy. - * Best place to call this is ioe_spi_usi_retrieve(). - */ -inline void ioe_spi_usi_expose(int8_t data); -/* - * Returns NULL when device is no busy. - * When device is busy, returned value is number of already send bits. - */ -inline uint8_t ioe_spi_usi_busy(void); -/* - * Blocks processor until device is not busy. - */ -inline void ioe_spi_usi_join(void); - -/* - * 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