at91_rtt.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #ifndef _ARCH_ARM_AT91_RTT_H_
  2. #define _ARCH_ARM_AT91_RTT_H_
  3. /*
  4. * Copyright (C) 2010 by egnite GmbH
  5. *
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in the
  16. * documentation and/or other materials provided with the distribution.
  17. * 3. Neither the name of the copyright holders nor the names of
  18. * contributors may be used to endorse or promote products derived
  19. * from this software without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  25. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  26. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  27. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  28. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  29. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  30. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  31. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  32. * SUCH DAMAGE.
  33. *
  34. * For additional information see http://www.ethernut.de/
  35. */
  36. /*!
  37. * \file arch/arm/at91_rtt.h
  38. * \brief AT91 peripherals.
  39. *
  40. * \verbatim
  41. * $Id$
  42. * \endverbatim
  43. */
  44. /*!
  45. * \addtogroup xgNutArchArmAt91Rtt
  46. */
  47. /*@{*/
  48. /*! \name Real-Time Timer Mode Register */
  49. /*@{*/
  50. #define RTT_MR_OFF 0x00000000 /*!< \brief Mode register offset. */
  51. #define RTT_MR (RTT_BASE + RTT_MR_OFF) /*!< \brief Mode register address. */
  52. #define RTT_RTPRES 0x0000FFFF /*!< \brief Timer prescaler value mask. */
  53. #define RTT_RTPRES_LSB 0 /*!< \brief Timer prescaler value mask. */
  54. #define RTT_ALMIEN 0x00010000 /*!< \brief Alarm interrupt enable. */
  55. #define RTT_RTTINCIEN 0x00020000 /*!< \brief Timer increment interrupt enable. */
  56. #define RTT_RTTRST 0x00040000 /*!< \brief Timer restart. */
  57. /*@}*/
  58. /*! \name Real-Time Timer Alarm Register */
  59. /*@{*/
  60. #define RTT_AR_OFF 0x00000004 /*!< \brief Alarm register offset. */
  61. #define RTT_AR (RTT_BASE + RTT_AR_OFF) /*!< \brief Alarm register address. */
  62. /*@}*/
  63. /*! \name Real-Time Timer Value Register */
  64. /*@{*/
  65. #define RTT_VR_OFF 0x00000004 /*!< \brief Value register offset. */
  66. #define RTT_VR (RTT_BASE + RTT_VR_OFF) /*!< \brief Value register address. */
  67. /*! \name Real-Time Timer Status Register */
  68. /*@{*/
  69. #define RTT_SR_OFF 0x00000008 /*!< \brief Status register offset. */
  70. #define RTT_SR (RTT_BASE + RTT_SR_OFF) /*!< \brief Status register address. */
  71. #define RTT_ALMS 0x00000001 /*!< \brief Alarm status. */
  72. #define RTT_RTTINC 0x00000002 /*!< \brief Timer increment. */
  73. /*@}*/
  74. /*@} xgNutArchArmAt91Rtt */
  75. #endif /* _ARCH_ARM_AT91_RTT_H_ */