4008-04-07 Release
[avr_bc100.git] / BaseMegaFirmware / GCC / spi.h
1 // Martin Thomas 3/2008\r
2 \r
3 #ifndef SPI_H\r
4 #define SPI_H\r
5 \r
6 #include <stdint.h>\r
7 \r
8 #if defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__)\r
9 #define SPI_PORT                PORTB\r
10 #define SPI_DDR                 DDRB\r
11 #define SPI_PIN                 PINB\r
12 #define SPI_SS_BIT              PB4\r
13 #define SPI_MOSI_BIT    PB5\r
14 #define SPI_MISO_BIT    PB6\r
15 #define SPI_SCK_BIT             PB7\r
16 #else\r
17 #error "no SPI definitions for this device"\r
18 #endif\r
19 \r
20 void SPI_init( void );\r
21 void SPI_release( void );\r
22 uint8_t SPI_rw( uint8_t output );\r
23 \r
24 #endif /* SPI_H */\r
25 \r