reg_gio.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /** @file reg_gio.h
  2. * @brief GIO Register Layer Header File
  3. * @date 29.May.2013
  4. * @version 03.05.02
  5. *
  6. * This file contains:
  7. * - Definitions
  8. * - Types
  9. * - Interface Prototypes
  10. * .
  11. * which are relevant for the GIO driver.
  12. */
  13. /* (c) Texas Instruments 2009-2013, All rights reserved. */
  14. #ifndef __REG_GIO_H__
  15. #define __REG_GIO_H__
  16. #include "sys_common.h"
  17. /* USER CODE BEGIN (0) */
  18. /* USER CODE END */
  19. /* Gio Register Frame Definition */
  20. /** @struct gioBase
  21. * @brief GIO Base Register Definition
  22. *
  23. * This structure is used to access the GIO module registers.
  24. */
  25. /** @typedef gioBASE_t
  26. * @brief GIO Register Frame Type Definition
  27. *
  28. * This type is used to access the GIO Registers.
  29. */
  30. typedef volatile struct gioBase
  31. {
  32. uint32 GCR0; /**< 0x0000: Global Control Register */
  33. uint32 PWDN; /**< 0x0004: Power Down Register */
  34. uint32 INTDET; /**< 0x0008: Interrupt Detect Register*/
  35. uint32 POL; /**< 0x000C: Interrupt Polarity Register */
  36. uint32 INTENASET; /**< 0x0010: Interrupt Enable Set Register */
  37. uint32 INTENACLR; /**< 0x0014: Interrupt Enable Clear Register */
  38. uint32 LVLSET; /**< 0x0018: Interrupt Priority Set Register */
  39. uint32 LVLCLR; /**< 0x001C: Interrupt Priority Clear Register */
  40. uint32 FLG; /**< 0x0020: Interrupt Flag Register */
  41. uint32 OFFSET0; /**< 0x0024: Interrupt Offset A Register */
  42. uint32 OFFSET1; /**< 0x0028: Interrupt Offset B Register */
  43. } gioBASE_t;
  44. /** @struct gioPort
  45. * @brief GIO Port Register Definition
  46. */
  47. /** @typedef gioPORT_t
  48. * @brief GIO Port Register Type Definition
  49. *
  50. * This type is used to access the GIO Port Registers.
  51. */
  52. typedef volatile struct gioPort
  53. {
  54. uint32 DIR; /**< 0x0000: Data Direction Register */
  55. uint32 DIN; /**< 0x0004: Data Input Register */
  56. uint32 DOUT; /**< 0x0008: Data Output Register */
  57. uint32 DSET; /**< 0x000C: Data Output Set Register */
  58. uint32 DCLR; /**< 0x0010: Data Output Clear Register */
  59. uint32 PDR; /**< 0x0014: Open Drain Register */
  60. uint32 PULDIS; /**< 0x0018: Pullup Disable Register */
  61. uint32 PSL; /**< 0x001C: Pull Up/Down Selection Register */
  62. } gioPORT_t;
  63. /** @def gioREG
  64. * @brief GIO Register Frame Pointer
  65. *
  66. * This pointer is used by the GIO driver to access the gio module registers.
  67. */
  68. #define gioREG ((gioBASE_t *)0xFFF7BC00U)
  69. /** @def gioPORTA
  70. * @brief GIO Port (A) Register Pointer
  71. *
  72. * Pointer used by the GIO driver to access PORTA
  73. */
  74. #define gioPORTA ((gioPORT_t *)0xFFF7BC34U)
  75. /** @def gioPORTB
  76. * @brief GIO Port (B) Register Pointer
  77. *
  78. * Pointer used by the GIO driver to access PORTB
  79. */
  80. #define gioPORTB ((gioPORT_t *)0xFFF7BC54U)
  81. /* USER CODE BEGIN (1) */
  82. /* USER CODE END */
  83. #endif