00001 /*! \file spi.h \brief SPI interface driver. */ 00002 //***************************************************************************** 00003 // 00004 // File Name : 'spi.h' 00005 // Title : SPI interface driver 00006 // Author : Pascal Stang - Copyright (C) 2000-2002 00007 // Created : 11/22/2000 00008 // Revised : 06/06/2002 00009 // Version : 0.6 00010 // Target MCU : Atmel AVR series 00011 // Editor Tabs : 4 00012 // 00013 // NOTE: This code is currently below version 1.0, and therefore is considered 00014 // to be lacking in some functionality or documentation, or may not be fully 00015 // tested. Nonetheless, you can expect most functions to work. 00016 // 00017 // This code is distributed under the GNU Public License 00018 // which can be found at http://www.gnu.org/licenses/gpl.txt 00019 // 00020 //***************************************************************************** 00021 00022 #ifndef SPI_H 00023 #define SPI_H 00024 00025 #include "global.h" 00026 00027 // function prototypes 00028 00029 // SPI interface initializer 00030 void spiInit(void); 00031 00032 // spiSendByte(u08 data) waits until the SPI interface is ready 00033 // and then sends a single byte over the SPI port. This command 00034 // does not receive anything. 00035 void spiSendByte(u08 data); 00036 00037 // spiTransferByte(u08 data) waits until the SPI interface is ready 00038 // and then sends a single byte over the SPI port. The function also 00039 // returns the byte that was received during transmission. 00040 u08 spiTransferByte(u08 data); 00041 00042 // spiTransferWord(u08 data) works just like spiTransferByte but 00043 // operates on a whole word (16-bits of data). 00044 u16 spiTransferWord(u16 data); 00045 00046 #endif
1.3-rc2