Spi.h

Go to the documentation of this file.
00001 #ifndef __SPI_H__
00002 #define __SPI_H__
00003 
00004 #include "global.h"
00005 
00006 
00007 #define SPI_SCK_PIN           (1<<PB7)
00008 #define SPI_MOSI_PIN          (1<<PB5)
00009 #define SPI_MOSI_PIN_NR  5
00010 #define SPI_MISO_PIN          (1<<PB6)
00011 #define SPI_MISO_PIN_NR  6
00012 #define SPI_PORTR        PORTB
00013 #define SPI_PINR         PINB
00014 #define SPI_DDR               DDRB
00015 
00016 
00017 class Spi {
00018 
00019      public:
00020           void init();
00021           void enableSPI();
00022           void disableSPI();
00023           void writeData(unsigned char _byte);
00024           unsigned char readData();
00025 };
00026 
00027 
00028 #endif

Generated on Wed Nov 25 11:27:41 2009 for Crawling Robot Microcontroller Software by  doxygen 1.5.5