//*****************************************************************************
//
// File Name : spi.h
// Title : Basic functions for hardware SPI
// Author : Smoerijf.be (Orinal by Pascal Stang - edit by smoerijf)
// Target MCU : Atmel AVR Series
//
//*****************************************************************************
#ifndef SPI_H
#define SPI_H
// function prototypes
// SPI interface initializer
void spiInit(void);
void spiDisable(void);
void spiEnable(void); ///< automaticly done by spiInit();
void spiSlow(void);
// spiSend(u08 data) waits until the SPI interface is ready
// and then sends a single byte over the SPI port. This command
// does not receive anything.
void spiSend(u08 data);
// spiTransferByte(u08 data) waits until the SPI interface is ready
// and then sends a single byte over the SPI port. The function also
// returns the byte that was received during transmission.
u08 spiTransfer(u08 data);
//void spiSetBitrate(u08 spr);
/*
void setMaster(void);
void setSlave(void);
*/
#endif