cslr_cp_timer16.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /********************************************************************
  2. * Copyright (C) 2003-2012 Texas Instruments Incorporated.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. *
  8. * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. *
  11. * Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the
  14. * distribution.
  15. *
  16. * Neither the name of Texas Instruments Incorporated nor the names of
  17. * its 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  23. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  24. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  25. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  26. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. *
  32. */
  33. /*********************************************************************
  34. * file: cslr_cp_timer16.h
  35. *
  36. * Brief: This file contains the Register Description for cp_timer16
  37. *
  38. *********************************************************************/
  39. #ifndef CSLR_CP_TIMER16_H_
  40. #define CSLR_CP_TIMER16_H_
  41. #include <ti/csl/cslr.h>
  42. #include <ti/csl/tistdtypes.h>
  43. /* Minimum unit = 1 byte */
  44. /**************************************************************************\
  45. * Register Overlay Structure
  46. \**************************************************************************/
  47. typedef struct {
  48. volatile Uint32 TIMER_CNTRL_REG;
  49. volatile Uint32 TIMER_LOAD_REG;
  50. volatile Uint32 TIMER_VALUE_REG;
  51. volatile Uint32 TIMER_IRQ_REG;
  52. } CSL_Cp_timer16Regs;
  53. /**************************************************************************\
  54. * Field Definition Macros
  55. \**************************************************************************/
  56. /* TIMER_CNTRL_REG */
  57. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_GO_MASK (0x00000001u)
  58. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_GO_SHIFT (0x00000000u)
  59. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_GO_RESETVAL (0x00000000u)
  60. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_MODE_MASK (0x00000002u)
  61. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_MODE_SHIFT (0x00000001u)
  62. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_MODE_RESETVAL (0x00000000u)
  63. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_PRESCALE_MASK (0x0000003Cu)
  64. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_PRESCALE_SHIFT (0x00000002u)
  65. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_PRESCALE_RESETVAL (0x00000000u)
  66. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_PSE_MASK (0x00008000u)
  67. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_PSE_SHIFT (0x0000000Fu)
  68. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_PSE_RESETVAL (0x00000000u)
  69. #define CSL_CP_TIMER16_TIMER_CNTRL_REG_RESETVAL (0x00000000u)
  70. /* TIMER_LOAD_REG */
  71. #define CSL_CP_TIMER16_TIMER_LOAD_REG_COUNT_MASK (0x0000FFFFu)
  72. #define CSL_CP_TIMER16_TIMER_LOAD_REG_COUNT_SHIFT (0x00000000u)
  73. #define CSL_CP_TIMER16_TIMER_LOAD_REG_COUNT_RESETVAL (0x0000FFFFu)
  74. #define CSL_CP_TIMER16_TIMER_LOAD_REG_RESETVAL (0x0000FFFFu)
  75. /* TIMER_VALUE_REG */
  76. #define CSL_CP_TIMER16_TIMER_VALUE_REG_CURR_COUNT_MASK (0x0000FFFFu)
  77. #define CSL_CP_TIMER16_TIMER_VALUE_REG_CURR_COUNT_SHIFT (0x00000000u)
  78. #define CSL_CP_TIMER16_TIMER_VALUE_REG_CURR_COUNT_RESETVAL (0x0000FFFFu)
  79. #define CSL_CP_TIMER16_TIMER_VALUE_REG_RESETVAL (0x0000FFFFu)
  80. /* TIMER_IRQ_REG */
  81. #define CSL_CP_TIMER16_TIMER_IRQ_REG_INTERRUPT_MASK (0x00000001u)
  82. #define CSL_CP_TIMER16_TIMER_IRQ_REG_INTERRUPT_SHIFT (0x00000000u)
  83. #define CSL_CP_TIMER16_TIMER_IRQ_REG_INTERRUPT_RESETVAL (0x00000000u)
  84. #define CSL_CP_TIMER16_TIMER_IRQ_REG_RESETVAL (0x00000000u)
  85. #endif