Subversion Repositories FlightCtrl

Rev

Rev 1187 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1187 Rev 1198
Line 6... Line 6...
6
#include <inttypes.h>
6
#include <inttypes.h>
Line 7... Line 7...
7
 
7
 
Line 8... Line -...
8
 
-
 
9
#define SPI_PROTOCOL_COMP   1
-
 
10
 
-
 
11
//-----------------------------------------
-
 
12
#define DDR_SPI DDRB
-
 
13
#define DD_SS   PB4
-
 
14
#define DD_SCK  PB7
-
 
15
#define DD_MOSI PB5
-
 
16
#define DD_MISO PB6
-
 
17
 
-
 
18
// for compatibility reasons gcc3.x <-> gcc4.x
-
 
19
#ifndef SPCR
-
 
20
#define SPCR   SPCR0
-
 
21
#endif
-
 
22
#ifndef SPIE
-
 
23
#define SPIE   SPIE0
-
 
24
#endif
-
 
25
#ifndef SPE
-
 
26
#define SPE    SPE0
-
 
27
#endif
-
 
28
#ifdef  DORD
-
 
29
#define DORD   DORD0
-
 
30
#endif
-
 
31
#ifndef MSTR
-
 
32
#define MSTR   MSTR0
-
 
33
#endif
-
 
34
#ifndef CPOL
-
 
35
#define CPOL   CPOL0
-
 
36
#endif
-
 
37
#ifndef CPHA
-
 
38
#define CPHA   CPHA0
-
 
39
#endif
-
 
40
#ifndef SPR1
-
 
41
#define SPR1   SPR01
-
 
42
#endif
-
 
43
#ifndef SPR0
-
 
44
#define SPR0   SPR00
-
 
45
#endif
-
 
46
 
-
 
47
#ifndef SPDR
-
 
48
#define SPDR   SPDR0
-
 
49
#endif
-
 
50
 
-
 
51
#ifndef SPSR
-
 
52
#define SPSR   SPSR0
-
 
53
#endif
-
 
54
#ifndef SPIF
-
 
55
#define SPIF   SPIF0
-
 
56
#endif
-
 
57
#ifndef WCOL
-
 
58
#define WCOL   WCOL0
-
 
59
#endif
-
 
60
#ifndef SPI2X
-
 
61
#define SPI2X  SPI2X0
-
 
62
#endif
-
 
63
// -------------------------
-
 
64
 
-
 
65
#define SLAVE_SELECT_DDR_PORT   DDRC
-
 
Line 66... Line 8...
66
#define SLAVE_SELECT_PORT       PORTC
8
 
67
#define SPI_SLAVE_SELECT        PC5
9
#define SPI_PROTOCOL_COMP   1
68
 
10
 
69
 
11