sgpio_001.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * @brief Serial GPIO registers and control functions
  3. *
  4. * @note
  5. * Copyright(C) NXP Semiconductors, 2012
  6. * All rights reserved.
  7. *
  8. * @par
  9. * Software that is described herein is for illustrative purposes only
  10. * which provides customers with programming information regarding the
  11. * LPC products. This software is supplied "AS IS" without any warranties of
  12. * any kind, and NXP Semiconductors and its licensor disclaim any and
  13. * all warranties, express or implied, including all implied warranties of
  14. * merchantability, fitness for a particular purpose and non-infringement of
  15. * intellectual property rights. NXP Semiconductors assumes no responsibility
  16. * or liability for the use of the software, conveys no license or rights under any
  17. * patent, copyright, mask work right, or any other intellectual property rights in
  18. * or to any products. NXP Semiconductors reserves the right to make changes
  19. * in the software without notification. NXP Semiconductors also makes no
  20. * representation or warranty that such application will be suitable for the
  21. * specified use without further testing or modification.
  22. *
  23. * @par
  24. * Permission to use, copy, modify, and distribute this software and its
  25. * documentation is hereby granted, under NXP Semiconductors' and its
  26. * licensor's relevant copyrights in the software, without fee, provided that it
  27. * is used in conjunction with NXP Semiconductors microcontrollers. This
  28. * copyright, permission, and disclaimer notice must appear in all copies of
  29. * this code.
  30. */
  31. #ifndef __SGPIO_001_H_
  32. #define __SGPIO_001_H_
  33. #include "sys_config.h"
  34. #include "cmsis.h"
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. /** @defgroup IP_SGPIO_001 IP: SGPIO register block and driver
  39. * @ingroup IP_Drivers
  40. * Serial GPIO
  41. * @{
  42. */
  43. /**
  44. * @brief Serial GPIO register block structure
  45. */
  46. typedef struct { /*!< SGPIO Structure */
  47. __IO uint32_t OUT_MUX_CFG[16]; /*!< Pin multiplexer configurationregisters. */
  48. __IO uint32_t SGPIO_MUX_CFG[16]; /*!< SGPIO multiplexer configuration registers. */
  49. __IO uint32_t SLICE_MUX_CFG[16]; /*!< Slice multiplexer configuration registers. */
  50. __IO uint32_t REG[16]; /*!< Slice data registers. Eachtime COUNT0 reaches 0x0 the register shifts loading bit 31 withdata captured from DIN(n). DOUT(n) is set to REG(0) */
  51. __IO uint32_t REG_SS[16]; /*!< Slice data shadow registers. Each time POSreaches 0x0 the contents of REG_SS is exchanged with the contentof REG */
  52. __IO uint32_t PRESET[16]; /*!< Reload valueof COUNT0, loaded when COUNT0 reaches 0x0 */
  53. __IO uint32_t COUNT[16]; /*!< Down counter, counts down each clock cycle. */
  54. __IO uint32_t POS[16]; /*!< Each time COUNT0 reaches 0x0 */
  55. __IO uint32_t MASK_A; /*!< Mask for pattern match function of slice A */
  56. __IO uint32_t MASK_H; /*!< Mask for pattern match function of slice H */
  57. __IO uint32_t MASK_I; /*!< Mask for pattern match function of slice I */
  58. __IO uint32_t MASK_P; /*!< Mask for pattern match function of slice P */
  59. __I uint32_t GPIO_INREG; /*!< GPIO input status register */
  60. __IO uint32_t GPIO_OUTREG; /*!< GPIO output control register */
  61. __IO uint32_t GPIO_OENREG; /*!< GPIO OE control register */
  62. __IO uint32_t CTRL_ENABLED; /*!< Enables the slice COUNT counter */
  63. __IO uint32_t CTRL_DISABLED; /*!< Disables the slice COUNT counter */
  64. __I uint32_t RESERVED0[823];
  65. __O uint32_t CLR_EN_0; /*!< Shift clock interrupt clear mask */
  66. __O uint32_t SET_EN_0; /*!< Shift clock interrupt set mask */
  67. __I uint32_t ENABLE_0; /*!< Shift clock interrupt enable */
  68. __I uint32_t STATUS_0; /*!< Shift clock interrupt status */
  69. __O uint32_t CTR_STATUS_0; /*!< Shift clock interrupt clear status */
  70. __O uint32_t SET_STATUS_0; /*!< Shift clock interrupt set status */
  71. __I uint32_t RESERVED1[2];
  72. __O uint32_t CLR_EN_1; /*!< Capture clock interrupt clear mask */
  73. __O uint32_t SET_EN_1; /*!< Capture clock interrupt set mask */
  74. __I uint32_t ENABLE_1; /*!< Capture clock interrupt enable */
  75. __I uint32_t STATUS_1; /*!< Capture clock interrupt status */
  76. __O uint32_t CTR_STATUS_1; /*!< Capture clock interrupt clear status */
  77. __O uint32_t SET_STATUS_1; /*!< Capture clock interrupt set status */
  78. __I uint32_t RESERVED2[2];
  79. __O uint32_t CLR_EN_2; /*!< Pattern match interrupt clear mask */
  80. __O uint32_t SET_EN_2; /*!< Pattern match interrupt set mask */
  81. __I uint32_t ENABLE_2; /*!< Pattern match interrupt enable */
  82. __I uint32_t STATUS_2; /*!< Pattern match interrupt status */
  83. __O uint32_t CTR_STATUS_2; /*!< Pattern match interrupt clear status */
  84. __O uint32_t SET_STATUS_2; /*!< Pattern match interrupt set status */
  85. __I uint32_t RESERVED3[2];
  86. __O uint32_t CLR_EN_3; /*!< Input interrupt clear mask */
  87. __O uint32_t SET_EN_3; /*!< Input bit match interrupt set mask */
  88. __I uint32_t ENABLE_3; /*!< Input bit match interrupt enable */
  89. __I uint32_t STATUS_3; /*!< Input bit match interrupt status */
  90. __O uint32_t CTR_STATUS_3; /*!< Input bit match interrupt clear status */
  91. __O uint32_t SET_STATUS_3; /*!< Shift clock interrupt set status */
  92. } IP_SGPIO_001_Type;
  93. /**
  94. * @}
  95. */
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #endif /* __SGPIO_001_H_ */