sys_pcr.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. /** @file sys_pcr.h
  2. * @brief PCR Driver Header File
  3. * @date 29.May.2013
  4. * @version 03.05.02
  5. *
  6. * This file contains:
  7. * - Definitions
  8. * - Types
  9. * .
  10. * which are relevant for the System driver.
  11. */
  12. /* (c) Texas Instruments 2009-2013, All rights reserved. */
  13. #ifndef __SYS_PCR_H__
  14. #define __SYS_PCR_H__
  15. #include "reg_pcr.h"
  16. /* USER CODE BEGIN (0) */
  17. /* USER CODE END */
  18. /* PCR General Definitions */
  19. typedef uint32 peripheralFrame_CS_t;
  20. #define PeripheralFrame_CS0 0U
  21. #define PeripheralFrame_CS1 1U
  22. #define PeripheralFrame_CS2 2U
  23. #define PeripheralFrame_CS3 3U
  24. #define PeripheralFrame_CS4 4U
  25. #define PeripheralFrame_CS5 5U
  26. #define PeripheralFrame_CS6 6U
  27. #define PeripheralFrame_CS7 7U
  28. #define PeripheralFrame_CS8 8U
  29. #define PeripheralFrame_CS9 9U
  30. #define PeripheralFrame_CS10 10U
  31. #define PeripheralFrame_CS11 11U
  32. #define PeripheralFrame_CS12 12U
  33. #define PeripheralFrame_CS13 13U
  34. #define PeripheralFrame_CS14 14U
  35. #define PeripheralFrame_CS15 15U
  36. #define PeripheralFrame_CS16 16U
  37. #define PeripheralFrame_CS17 17U
  38. #define PeripheralFrame_CS18 18U
  39. #define PeripheralFrame_CS19 19U
  40. #define PeripheralFrame_CS20 20U
  41. #define PeripheralFrame_CS21 21U
  42. #define PeripheralFrame_CS22 22U
  43. #define PeripheralFrame_CS23 23U
  44. #define PeripheralFrame_CS24 24U
  45. #define PeripheralFrame_CS25 25U
  46. #define PeripheralFrame_CS26 26U
  47. #define PeripheralFrame_CS27 27U
  48. #define PeripheralFrame_CS28 28U
  49. #define PeripheralFrame_CS29 29U
  50. #define PeripheralFrame_CS30 30U
  51. #define PeripheralFrame_CS31 31U
  52. /* USER CODE BEGIN (1) */
  53. /* USER CODE END */
  54. typedef uint32 quadrant_Select_t;
  55. #define Quadrant0 1U
  56. #define Quadrant1 2U
  57. #define Quadrant2 4U
  58. #define Quadrant3 8U
  59. /* USER CODE BEGIN (2) */
  60. /* USER CODE END */
  61. /** @typedef peripheral_Frame_Select_t
  62. * @brief PCR Peripheral Frame Type Definition
  63. *
  64. * This type is used to access the PCR peripheral Frame configuration register.
  65. */
  66. typedef struct peripheral_Frame_Select
  67. {
  68. peripheralFrame_CS_t Peripheral_CS;
  69. quadrant_Select_t Peripheral_Quadrant;
  70. }peripheral_Frame_Select_t;
  71. /* USER CODE BEGIN (3) */
  72. /* USER CODE END */
  73. /** @typedef peripheral_Quad_ChipSelect_t
  74. * @brief PCR Peripheral Frame registers Type Definition
  75. *
  76. * This type is used to access all the PCR peripheral Frame configuration registers.
  77. */
  78. typedef struct peripheral_Quad_ChipSelect
  79. {
  80. uint32 Peripheral_Quad0_3_CS0_7;
  81. uint32 Peripheral_Quad4_7_CS8_15;
  82. uint32 Peripheral_Quad8_11_CS16_23;
  83. uint32 Peripheral_Quad12_15_CS24_31;
  84. }peripheral_Quad_ChipSelect_t;
  85. /* USER CODE BEGIN (4) */
  86. /* USER CODE END */
  87. /** @typedef peripheral_Memory_ChipSelect_t
  88. * @brief PCR Peripheral Memory Frame registers Type Definition
  89. *
  90. * This type is used to access all the PCR peripheral Memory Frame configuration registers.
  91. */
  92. typedef struct peripheral_Memory_ChipSelect
  93. {
  94. uint32 Peripheral_Mem_CS0_31;
  95. uint32 Peripheral_Mem_CS32_63;
  96. }peripheral_Memory_ChipSelect_t;
  97. /* USER CODE BEGIN (5) */
  98. /* USER CODE END */
  99. typedef uint32 peripheral_MemoryFrame_CS_t;
  100. #define PeripheralMemoryFrame_CS0 0U
  101. #define PeripheralMemoryFrame_CS1 1U
  102. #define PeripheralMemoryFrame_CS2 2U
  103. #define PeripheralMemoryFrame_CS3 3U
  104. #define PeripheralMemoryFrame_CS4 4U
  105. #define PeripheralMemoryFrame_CS5 5U
  106. #define PeripheralMemoryFrame_CS6 6U
  107. #define PeripheralMemoryFrame_CS7 7U
  108. #define PeripheralMemoryFrame_CS8 8U
  109. #define PeripheralMemoryFrame_CS9 9U
  110. #define PeripheralMemoryFrame_CS10 10U
  111. #define PeripheralMemoryFrame_CS11 11U
  112. #define PeripheralMemoryFrame_CS12 12U
  113. #define PeripheralMemoryFrame_CS13 13U
  114. #define PeripheralMemoryFrame_CS14 14U
  115. #define PeripheralMemoryFrame_CS15 15U
  116. #define PeripheralMemoryFrame_CS16 16U
  117. #define PeripheralMemoryFrame_CS17 17U
  118. #define PeripheralMemoryFrame_CS18 18U
  119. #define PeripheralMemoryFrame_CS19 19U
  120. #define PeripheralMemoryFrame_CS20 20U
  121. #define PeripheralMemoryFrame_CS21 21U
  122. #define PeripheralMemoryFrame_CS22 22U
  123. #define PeripheralMemoryFrame_CS23 23U
  124. #define PeripheralMemoryFrame_CS24 24U
  125. #define PeripheralMemoryFrame_CS25 25U
  126. #define PeripheralMemoryFrame_CS26 26U
  127. #define PeripheralMemoryFrame_CS27 27U
  128. #define PeripheralMemoryFrame_CS28 28U
  129. #define PeripheralMemoryFrame_CS29 29U
  130. #define PeripheralMemoryFrame_CS30 30U
  131. #define PeripheralMemoryFrame_CS31 31U
  132. #define PeripheralMemoryFrame_CS32 32U
  133. #define PeripheralMemoryFrame_CS33 33U
  134. #define PeripheralMemoryFrame_CS34 34U
  135. #define PeripheralMemoryFrame_CS35 35U
  136. #define PeripheralMemoryFrame_CS36 36U
  137. #define PeripheralMemoryFrame_CS37 37U
  138. #define PeripheralMemoryFrame_CS38 38U
  139. #define PeripheralMemoryFrame_CS39 39U
  140. #define PeripheralMemoryFrame_CS40 40U
  141. #define PeripheralMemoryFrame_CS41 41U
  142. #define PeripheralMemoryFrame_CS42 42U
  143. #define PeripheralMemoryFrame_CS43 43U
  144. #define PeripheralMemoryFrame_CS44 44U
  145. #define PeripheralMemoryFrame_CS45 45U
  146. #define PeripheralMemoryFrame_CS46 46U
  147. #define PeripheralMemoryFrame_CS47 47U
  148. #define PeripheralMemoryFrame_CS48 48U
  149. #define PeripheralMemoryFrame_CS49 49U
  150. #define PeripheralMemoryFrame_CS50 50U
  151. #define PeripheralMemoryFrame_CS51 51U
  152. #define PeripheralMemoryFrame_CS52 52U
  153. #define PeripheralMemoryFrame_CS53 53U
  154. #define PeripheralMemoryFrame_CS54 54U
  155. #define PeripheralMemoryFrame_CS55 55U
  156. #define PeripheralMemoryFrame_CS56 56U
  157. #define PeripheralMemoryFrame_CS57 57U
  158. #define PeripheralMemoryFrame_CS58 58U
  159. #define PeripheralMemoryFrame_CS59 59U
  160. #define PeripheralMemoryFrame_CS60 60U
  161. #define PeripheralMemoryFrame_CS61 61U
  162. #define PeripheralMemoryFrame_CS62 62U
  163. #define PeripheralMemoryFrame_CS63 63U
  164. /* USER CODE BEGIN (6) */
  165. /* USER CODE END */
  166. /**
  167. * @defgroup PCR PCR
  168. * @brief Peripheral Central Resource Controller
  169. *
  170. * The PCR manages the accesses to the peripheral registers and peripheral
  171. * memories. It provides a global reset for all the peripherals. It also supports the
  172. * capability to selectively enable or disable the clock for each peripheral
  173. * individually. The PCR also manages the accesses to the system module
  174. * registers required to configure the device’s clocks, interrupts, and so on. The
  175. * system module registers also include status flags for indicating exception
  176. * conditions – resets, aborts, errors, interrupts.
  177. *
  178. * Related files:
  179. * - reg_pcr.h
  180. * - sys_pcr.h
  181. * - sys_pcr.c
  182. *
  183. * @addtogroup PCR
  184. * @{
  185. */
  186. /* PCR Interface Functions */
  187. void peripheral_Frame_Protection_Set(peripheral_Frame_Select_t peripheral_Frame);
  188. void peripheral_Frame_Protection_Clr(peripheral_Frame_Select_t peripheral_Frame);
  189. void peripheral_Frame_Powerdown_Set(peripheral_Frame_Select_t peripheral_Frame);
  190. void peripheral_Frame_Powerdown_Clr(peripheral_Frame_Select_t peripheral_Frame);
  191. void peripheral_Protection_Set(peripheral_Quad_ChipSelect_t peripheral_Quad_CS);
  192. void peripheral_Protection_Clr(peripheral_Quad_ChipSelect_t peripheral_Quad_CS);
  193. peripheral_Quad_ChipSelect_t peripheral_Protection_Status(void);
  194. void peripheral_Powerdown_Set(peripheral_Quad_ChipSelect_t peripheral_Quad_CS);
  195. void peripheral_Powerdown_Clr(peripheral_Quad_ChipSelect_t peripheral_Quad_CS);
  196. peripheral_Quad_ChipSelect_t peripheral_Powerdown_Status(void);
  197. void peripheral_Memory_Protection_Set(peripheral_Memory_ChipSelect_t peripheral_Memory_CS);
  198. void peripheral_Memory_Protection_Clr(peripheral_Memory_ChipSelect_t peripheral_Memory_CS);
  199. peripheral_Memory_ChipSelect_t peripheral_Memory_Protection_Status(void);
  200. void peripheral_Memory_Powerdown_Set(peripheral_Memory_ChipSelect_t peripheral_Memory_CS);
  201. void peripheral_Memory_Powerdown_Clr(peripheral_Memory_ChipSelect_t peripheral_Memory_CS);
  202. peripheral_Memory_ChipSelect_t Periipheral_Memory_Powerdown_Status(void);
  203. void peripheral_Mem_Frame_Prot_Set(peripheral_MemoryFrame_CS_t peripheral_Memory_Frame_CS);
  204. void peripheral_Mem_Frame_Prot_Clr(peripheral_MemoryFrame_CS_t peripheral_Memory_Frame_CS);
  205. void peripheral_Mem_Frame_Pwrdwn_Set(peripheral_MemoryFrame_CS_t peripheral_Memory_Frame_CS);
  206. void peripheral_Mem_Frame_Pwrdwn_Clr (peripheral_MemoryFrame_CS_t peripheral_Memory_Frame_CS);
  207. /**@}*/
  208. /* USER CODE BEGIN (7) */
  209. /* USER CODE END */
  210. #endif