m-can.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #ifndef _CFG_MCAN_H_
  2. #define _CFG_MCAN_H_
  3. /*
  4. * Copyright (C) 2004 by Ole Reinhardt<ole.reinhardt@kernelconcepts.de>
  5. * Kernel concepts (http://www.kernelconcepts.de) All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. *
  11. * 1. Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. * 2. Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in the
  15. * documentation and/or other materials provided with the distribution.
  16. * 3. Neither the name of the copyright holders nor the names of
  17. * contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
  21. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  23. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
  24. * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  25. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  26. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  27. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  28. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  29. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  30. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31. * SUCH DAMAGE.
  32. *
  33. * For additional information see http://www.ethernut.de/
  34. *
  35. */
  36. /*
  37. * $Log: m-can.h,v $
  38. * Revision 1.4 2006/10/08 16:48:09 haraldkipp
  39. * Documentation fixed
  40. *
  41. * Revision 1.3 2005/08/02 17:46:48 haraldkipp
  42. * Major API documentation update.
  43. *
  44. * Revision 1.2 2005/05/27 14:08:01 olereinhardt
  45. * Changed specs to new m-can board design (LCD controller)
  46. *
  47. * Revision 1.1 2004/06/07 15:14:25 olereinhardt
  48. * Initial checkin
  49. *
  50. */
  51. /*!
  52. * \addtogroup xgMCanCfg
  53. */
  54. /*@{*/
  55. /*!
  56. * \file cfg/m-can.h
  57. * \brief MCAN Board Configuration
  58. */
  59. /*
  60. * \brief Defines for CAN controller
  61. */
  62. #define SJA_SIGNAL sig_INTERRUPT7
  63. #define SJA_EICR EICRB
  64. #define SJA_SIGNAL_BIT 7
  65. /*
  66. * \brief LCD Display definitions
  67. */
  68. //#define KS0073_CONTROLLER
  69. #define LCD_4x20
  70. #undef LCD_DATA_PORT
  71. #undef LCD_DATA_DDR
  72. #undef LCD_DATA_BITS
  73. #undef LCD_DATA_PIN
  74. #define LCD_DATA_PORT PORTB /*!< Port output register of \ref LCD_DATA_BITS. */
  75. #define LCD_DATA_DDR DDRB /*!< Data direction register of \ref LCD_DATA_BITS. */
  76. #define LCD_DATA_BITS 0xFF /*!< \brief LCD data lines, either upper or lower 4 bits. */
  77. #define LCD_DATA_PIN PINB /*!< Port input register of \ref LCD_DATA_BITS. */
  78. #undef LCD_ENABLE_PORT
  79. #undef LCD_ENABLE_DDR
  80. #undef LCD_ENABLE_BIT
  81. #define LCD_ENABLE_PORT PORTE /*!< Port output register of \ref LCD_ENABLE_BIT. */
  82. #define LCD_ENABLE_DDR DDRE /*!< Data direction register of \ref LCD_ENABLE_BIT. */
  83. #define LCD_ENABLE_BIT 2 /*!< \brief LCD enable output. */
  84. #undef LCD_RW_PORT
  85. #undef LCD_RW_DDR
  86. #undef LCD_RW_BIT
  87. #define LCD_RW_PORT PORTE /*!< Port output register of \ref LCD_RW_BIT. */
  88. #define LCD_RW_DDR DDRE /*!< Data direction register of \ref LCD_RW_BIT. */
  89. #define LCD_RW_BIT 1 /*!< \brief LCD read/write output. */
  90. #undef LCD_REGSEL_PORT
  91. #undef LCD_REGSEL_DDR
  92. #undef LCD_REGSEL_BIT
  93. #define LCD_REGSEL_PORT PORTE /*!< Port output register of \ref LCD_REGSEL_BIT. */
  94. #define LCD_REGSEL_DDR DDRE /*!< Data direction register of \ref LCD_REGSEL_BIT. */
  95. #define LCD_REGSEL_BIT 0 /*!< \brief LCD register select output. */
  96. /*@}*/
  97. #endif