at91_shdwc.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #ifndef _ARCH_ARM_AT91_SHDWC_H_
  2. #define _ARCH_ARM_AT91_SHDWC_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_shdwc.h
  38. * \brief AT91 peripherals.
  39. *
  40. * \verbatim
  41. * $Id$
  42. * \endverbatim
  43. */
  44. /*!
  45. * \addtogroup xgNutArchArmAt91Shdwc
  46. */
  47. /*@{*/
  48. /*! \name Shutdown Control Register */
  49. /*@{*/
  50. #define SHDWC_CR_OFF 0x00000000 /*!< \brief Control register offset. */
  51. #define SHDWC_CR (SHDWC_BASE + SHDWC_CR_OFF) /*!< \brief Control register address. */
  52. #define SHDWC_SHDW 0x00000001 /*!< \brief Shutdown command. */
  53. #define SHDWC_KEY 0xA5000000 /*!< \brief Shutdown password. */
  54. /*@}*/
  55. /*! \name Shutdown Mode Register */
  56. /*@{*/
  57. #define SHDWC_MR_OFF 0x00000004 /*!< \brief Mode register offset. */
  58. #define SHDWC_MR (SHDWC_BASE + SHDWC_MR_OFF) /*!< \brief Mode register address. */
  59. #define SHDWC_WKMODE0 0x00000003 /*!< \brief Wake-up 0 mode mask. */
  60. #define SHDWC_WKMODE0_NONE 0x00000000 /*!< \brief No detection on the wake-up input. */
  61. #define SHDWC_WKMODE0_HIGH 0x00000001 /*!< \brief Low to high level. */
  62. #define SHDWC_WKMODE0_LOW 0x00000002 /*!< \brief High to low level. */
  63. #define SHDWC_WKMODE0_ANYLEVEL 0x00000003 /*!< \brief Both levels change. */
  64. #define SHDWC_CPTWK0 0x000000F0 /*!< \brief Counter on wake-up 0 mask. */
  65. #define SHDWC_CPTWK0_LSB 4 /*!< \brief Counter on wake-up 0 LSB. */
  66. #define SHDWC_WKMODE1 0x00000300 /*!< \brief Wake-up 1 mode mask. */
  67. #define SHDWC_WKMODE1_NONE 0x00000000 /*!< \brief No detection on the wake-up input. */
  68. #define SHDWC_WKMODE1_HIGH 0x00000100 /*!< \brief Low to high level. */
  69. #define SHDWC_WKMODE1_LOW 0x00000200 /*!< \brief High to low level. */
  70. #define SHDWC_WKMODE1_ANYLEVEL 0x00000300 /*!< \brief Both levels change. */
  71. #define SHDWC_CPTWK1 0x0000F000 /*!< \brief Counter on wake-up 1 mask. */
  72. #define SHDWC_CPTWK1_LSB 12 /*!< \brief Counter on wake-up 1 LSB. */
  73. #define SHDWC_RTTWKEN 0x00010000 /*!< \brief Real-time timer wake-up enable. */
  74. #define SHDWC_RTCWKEN 0x00020000 /*!< \brief Real-time clock wake-up enable. */
  75. /*@}*/
  76. /*! \name Shutdown Status Register */
  77. /*@{*/
  78. #define SHDWC_SR_OFF 0x00000008 /*!< \brief Status register offset. */
  79. #define SHDWC_SR (SHDWC_BASE + SHDWC_SR_OFF) /*!< \brief Status register address. */
  80. #define SHDWC_WAKEUP0 0x00000001 /*!< \brief Wake-up 0 status. */
  81. #define SHDWC_WAKEUP1 0x00000002 /*!< \brief Wake-up 1 status. */
  82. #define SHDWC_FWKUP 0x00000004 /*!< \brief Force wake-up status. */
  83. #define SHDWC_RTTWK 0x00010000 /*!< \brief Real-time timer wake-up. */
  84. #define SHDWC_RTCWK 0x00020000 /*!< \brief Real-time clock wake-up. */
  85. /*@}*/
  86. /*@} xgNutArchArmAt91Shdwc */
  87. #endif /* _ARCH_ARM_AT91_SHDWC_H_ */