medianut.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. #ifndef _CFG_MEDIANUT_H_
  2. #define _CFG_MEDIANUT_H_
  3. /*
  4. * Copyright (C) 2001-2003 by egnite Software GmbH. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the copyright holders nor the names of
  16. * contributors may be used to endorse or promote products derived
  17. * from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
  23. * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. * For additional information see http://www.ethernut.de/
  33. *
  34. */
  35. /*
  36. * $Log: medianut.h,v $
  37. * Revision 1.2 2003/07/13 19:42:28 haraldkipp
  38. * Infrared remote control added.
  39. *
  40. * Revision 1.1.1.1 2003/05/09 14:41:04 haraldkipp
  41. * Initial using 3.2.1
  42. *
  43. * Revision 1.4 2003/05/06 18:39:54 harald
  44. * Cleanup
  45. *
  46. * Revision 1.3 2003/04/07 20:34:06 harald
  47. * Oops. Medianut's LCD ports had been accidently removed.
  48. *
  49. * Revision 1.2 2003/04/07 20:10:37 harald
  50. * Redesigned by Pavel Chromy
  51. *
  52. */
  53. /*!
  54. * \file cfg/medianut.h
  55. * \brief Medianut hardware specification.
  56. */
  57. /*!
  58. * \addtogroup xgMedianutCfg
  59. */
  60. /*@{*/
  61. #define VS_SCK_PORT PORTB /*!< Port register of \ref VS_SCK_BIT. */
  62. #define VS_SCK_DDR DDRB /*!< Data direction register of \ref VS_SCK_BIT. */
  63. #define VS_SCK_BIT 0 /*!< \brief VS1001 serial control interface clock input bit.
  64. * The first rising clock edge after XCS has gone
  65. * low marks the first bit to be written to the decoder.
  66. */
  67. #define VS_SS_PORT PORTB /*!< Port output register of \ref VS_SS_BIT. */
  68. #define VS_SS_DDR DDRB /*!< Data direction register of \ref VS_SS_BIT. */
  69. #define VS_SS_BIT 1 /*!< \brief VS1001 serial data interface clock input bit. */
  70. #define VS_SI_PORT PORTB /*!< Port output register of \ref VS_SI_BIT. */
  71. #define VS_SI_DDR DDRB /*!< Data direction register of \ref VS_SI_BIT. */
  72. #define VS_SI_BIT 2 /*!< \brief VS1001 serial control interface data input.
  73. * The decoder samples this input on the
  74. * rising edge of SCK if XCS is low.
  75. */
  76. #define VS_SO_PIN PINB /*!< Port input register of \ref VS_SO_BIT. */
  77. #define VS_SO_DDR DDRB /*!< Data direction register of \ref VS_SO_BIT. */
  78. #define VS_SO_BIT 3 /*!< \brief VS1001 serial control interface data output.
  79. * If data is transfered from the decoder, bits
  80. * are shifted out on the falling SCK edge.
  81. * If data is transfered to the decoder,
  82. * SO is at a high impedance state.
  83. */
  84. #define VS_XCS_PORT PORTB /*!< Port output register of \ref VS_XCS_BIT. */
  85. #define VS_XCS_DDR DDRB /*!< Data direction register of \ref VS_XCS_BIT. */
  86. #define VS_XCS_BIT 4 /*!< \brief VS1001 active low chip select input.
  87. * A high level forces the serial interface
  88. * into standby mode, ending the current
  89. * operation. A high level also forces serial
  90. * output (SO) to high impedance state.
  91. */
  92. #define VS_BSYNC_PORT PORTB /*!< Port output register of \ref VS_BSYNC_BIT. */
  93. #define VS_BSYNC_DDR DDRB /*!< Data direction register of \ref VS_BSYNC_BIT. */
  94. #define VS_BSYNC_BIT 5 /*!< \brief VS1001 serial data interface bit sync.
  95. * The first DCLK sampling edge, during
  96. * which BSYNC is high, marks the first
  97. * bit of a data byte.
  98. */
  99. #define VS_RESET_PORT PORTB /*!< Port output register of \ref VS_RESET_BIT. */
  100. #define VS_RESET_DDR DDRB /*!< Data direction register of \ref VS_RESET_BIT. */
  101. #define VS_RESET_BIT 7 /*!< \brief VS1001 hardware reset input. */
  102. #define VS_DREQ_PORT PORTE /*!< Port output register of \ref VS_DREQ_BIT. */
  103. #define VS_DREQ_PIN PINE /*!< Port input register of \ref VS_DREQ_BIT. */
  104. #define VS_DREQ_DDR DDRE /*!< Data direction register of \ref VS_DREQ_BIT. */
  105. #define VS_DREQ_BIT 6 /*!< \brief VS1001 data request output. */
  106. #define LCD_DATA_PORT PORTD /*!< Port output register of \ref LCD_DATA_BITS. */
  107. #define LCD_DATA_DDR DDRD /*!< Data direction register of \ref LCD_DATA_BITS. */
  108. #define LCD_DATA_BITS 0xF0 /*!< \brief LCD data lines, either upper or lower 4 bits. */
  109. #define LCD_ENABLE_PORT PORTE /*!< Port output register of \ref LCD_ENABLE_BIT. */
  110. #define LCD_ENABLE_DDR DDRE /*!< Data direction register of \ref LCD_ENABLE_BIT. */
  111. #define LCD_ENABLE_BIT 3 /*!< \brief LCD enable output. */
  112. #define LCD_REGSEL_PORT PORTE /*!< Port output register of \ref LCD_REGSEL_BIT. */
  113. #define LCD_REGSEL_DDR DDRE /*!< Data direction register of \ref LCD_REGSEL_BIT. */
  114. #define LCD_REGSEL_BIT 2 /*!< \brief LCD register select output. */
  115. #define LCD_LIGHT_PORT PORTB /*!< Port output register of \ref LCD_LIGHT_BIT. */
  116. #define LCD_LIGHT_DDR DDRB /*!< Data direction register of \ref LCD_LIGHT_BIT. */
  117. #define LCD_LIGHT_BIT 6 /*!< \brief LCD output to switch backlight. */
  118. #define IR_SIGNAL_PORT PORTE /*!< Port output register of \ref IR_SIGNAL_BIT. */
  119. #define IR_SIGNAL_PIN PINE /*!< Port input register of \ref IR_SIGNAL_BIT. */
  120. #define IR_SIGNAL_DDR DDRE /*!< Data direction register of \ref IR_SIGNAL_BIT. */
  121. #define IR_SIGNAL_BIT 4 /*!< \brief Infrared decoder signal bit. */
  122. /*@}*/
  123. #endif