Subversion Repositories HomeAutomation

Rev

Rev 1003 | Details | Compare with Previous | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
932 arune 1
#ifndef CONFIG_H_
2
#define CONFIG_H_
3
 
1003 linlun 4
/* set to 0 for not sending timestamps on bus */
5
#define SENDTIMESTAMP                   1
1115 arune 6
#define USE_STDCAN			1
7
#define NODE_ID 			0
8
#define STDCAN_FILTER 			0
1003 linlun 9
 
932 arune 10
// Kolla makefile för att sätta MCU!!
11
 
12
//#define F_CPU 					8000000UL
13
#define F_CPU 					20000000UL
14
 
15
//#define MCU atmega88
16
#define CAN_CONTROLLER 			MCP2515
17
#define MCP_CS_PORT 			PORTC
18
#define MCP_CS_DDR 				DDRC
19
#define MCP_CS_BIT 				PC3
20
#define MCP_CAN_BITRATE_KBPS 	250
21
#define MCP_CLOCK_FREQ_MHZ 		20
22
#define MCP_CLOCK_PRESC 		1
23
 
24
/*
25
Old simple-ethernet node
26
#define MCP_CS_PORT 			PORTB
27
#define MCP_CS_DDR 				DDRB
28
#define MCP_CS_BIT 				PB2
29
*/
30
 
31
#define ENC28J60_USART_SPI_MODE
32
 
33
 /* 
34
 * mac and ip have to be unique in your local area network. 
35
 * You can not have the same numbers in two devices: 
36
 */
37
 
38
#define ENC28J60_MAC1			0x54
39
#define ENC28J60_MAC2			0x55
40
#define ENC28J60_MAC3			0x58
41
#define ENC28J60_MAC4			0x10
42
#define ENC28J60_MAC5			0x00
43
#define ENC28J60_MAC6			0x27
44
 
45
#define ENC28J60_IP1			192
46
#define ENC28J60_IP2			168
47
#define ENC28J60_IP3			16
48
#define ENC28J60_IP4			51
49
 
50
 
51
 /**
52
 * ENC28J60 Chip Select port on avr. 
53
 * Same for nodeSimpleEth and core-expansion simple-eth
54
 */ 
55
#define ENC28J60_CS_PORT	PORTC
56
#define ENC28J60_CS_DDR		DDRC
57
#define ENC28J60_CS			PC0
58
 
59
 
60
 /**
61
 * ENC28J60 Reset port on avr. 
62
 * Same for nodeSimpleEth and core-expansion simple-eth
63
 */ 
64
#define ENC28J60_RESET_PORT	PORTC
65
#define ENC28J60_RESET_DDR	DDRC
66
#define ENC28J60_RESET		PC1
67
 
68
// only for USART in SPImode
69
#define XCK_DDR				DDRD
70
#define XCK					PD4
71
 
72
 
73
#endif /*CONFIG_H_*/