Subversion Repositories HomeAutomation

Rev

Rev 680 | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. #ifndef CONFIG_H_
  2. #define CONFIG_H_
  3.  
  4. // Kolla makefile för att sätta MCU!!
  5.  
  6. #define F_CPU                   8000000UL
  7.  
  8. //#define MCU atmega88
  9. #define CAN_CONTROLLER          MCP2515
  10. #define MCP_CS_PORT             PORTB
  11. #define MCP_CS_DDR              DDRB
  12. #define MCP_CS_BIT              PB2
  13. #define MCP_CAN_BITRATE_KBPS    250
  14. #define MCP_CLOCK_FREQ_MHZ      20
  15. #define MCP_CLOCK_PRESC         1
  16.  
  17.  
  18. #define ENC28J60_USART_SPI_MODE
  19.  
  20.  /*
  21.  * mac and ip have to be unique in your local area network.
  22.  * You can not have the same numbers in two devices:
  23.  */
  24.  
  25. #define ENC28J60_MAC1           0x54
  26. #define ENC28J60_MAC2           0x55
  27. #define ENC28J60_MAC3           0x58
  28. #define ENC28J60_MAC4           0x10
  29. #define ENC28J60_MAC5           0x00
  30. #define ENC28J60_MAC6           0x27
  31.  
  32. #define ENC28J60_IP1            192
  33. #define ENC28J60_IP2            168
  34. #define ENC28J60_IP3            0
  35. #define ENC28J60_IP4            50
  36.  
  37.  /**
  38.  * ENC28J60 Chip Select port on avr.
  39.  */
  40.  
  41. #define ENC28J60_CS_PORT    PORTC
  42. #define ENC28J60_CS_DDR     DDRC
  43. #define ENC28J60_CS         PC0
  44.  
  45.  /**
  46.  * ENC28J60 Reset port on avr.
  47.  */
  48. #define ENC28J60_RESET_PORT PORTC
  49. #define ENC28J60_RESET_DDR  DDRC
  50. #define ENC28J60_RESET      PC1
  51.  
  52. // only for USART in SPImode
  53. #define XCK_DDR             DDRD
  54. #define XCK                 PD4
  55.  
  56.  
  57. #endif /*CONFIG_H_*/
  58.