Rev 1180 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1180 | Rev 1198 | ||
---|---|---|---|
Line 59... | Line 59... | ||
59 | #include "eeprom.h" |
59 | #include "eeprom.h" |
60 | #include "uart0.h" |
60 | #include "uart0.h" |
61 | #include "timer0.h" |
61 | #include "timer0.h" |
62 | #include "analog.h" |
62 | #include "analog.h" |
Line -... | Line 63... | ||
- | 63 | ||
- | 64 | ||
- | 65 | //----------------------------------------- |
|
- | 66 | #define DDR_SPI DDRB |
|
- | 67 | #define DD_SS PB4 |
|
- | 68 | #define DD_SCK PB7 |
|
- | 69 | #define DD_MOSI PB5 |
|
- | 70 | #define DD_MISO PB6 |
|
- | 71 | ||
- | 72 | // for compatibility reasons gcc3.x <-> gcc4.x |
|
- | 73 | #ifndef SPCR |
|
- | 74 | #define SPCR SPCR0 |
|
- | 75 | #endif |
|
- | 76 | #ifndef SPIE |
|
- | 77 | #define SPIE SPIE0 |
|
- | 78 | #endif |
|
- | 79 | #ifndef SPE |
|
- | 80 | #define SPE SPE0 |
|
- | 81 | #endif |
|
- | 82 | #ifndef DORD |
|
- | 83 | #define DORD DORD0 |
|
- | 84 | #endif |
|
- | 85 | #ifndef MSTR |
|
- | 86 | #define MSTR MSTR0 |
|
- | 87 | #endif |
|
- | 88 | #ifndef CPOL |
|
- | 89 | #define CPOL CPOL0 |
|
- | 90 | #endif |
|
- | 91 | #ifndef CPHA |
|
- | 92 | #define CPHA CPHA0 |
|
- | 93 | #endif |
|
- | 94 | #ifndef SPR1 |
|
- | 95 | #define SPR1 SPR01 |
|
- | 96 | #endif |
|
- | 97 | #ifndef SPR0 |
|
- | 98 | #define SPR0 SPR00 |
|
- | 99 | #endif |
|
- | 100 | ||
- | 101 | #ifndef SPDR |
|
- | 102 | #define SPDR SPDR0 |
|
- | 103 | #endif |
|
- | 104 | ||
- | 105 | #ifndef SPSR |
|
- | 106 | #define SPSR SPSR0 |
|
- | 107 | #endif |
|
- | 108 | #ifndef SPIF |
|
- | 109 | #define SPIF SPIF0 |
|
- | 110 | #endif |
|
- | 111 | #ifndef WCOL |
|
- | 112 | #define WCOL WCOL0 |
|
- | 113 | #endif |
|
- | 114 | #ifndef SPI2X |
|
- | 115 | #define SPI2X SPI2X0 |
|
- | 116 | #endif |
|
- | 117 | // ------------------------- |
|
- | 118 | ||
- | 119 | #define SLAVE_SELECT_DDR_PORT DDRC |
|
- | 120 | #define SLAVE_SELECT_PORT PORTC |
|
- | 121 | #define SPI_SLAVE_SELECT PC5 |
|
- | 122 | ||
63 | 123 | ||
64 | #define SPI_TXSYNCBYTE1 0xAA |
124 | #define SPI_TXSYNCBYTE1 0xAA |
65 | #define SPI_TXSYNCBYTE2 0x83 |
125 | #define SPI_TXSYNCBYTE2 0x83 |
66 | #define SPI_RXSYNCBYTE1 0x81 |
126 | #define SPI_RXSYNCBYTE1 0x81 |