ccan_001.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. * @brief CCAN 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 __CCAN_001_H_
  32. #define __CCAN_001_H_
  33. #include "sys_config.h"
  34. #include "cmsis.h"
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. /** @defgroup IP_CCAN_001 IP: CCAN register block and driver
  39. * @ingroup IP_Drivers
  40. * @{
  41. */
  42. /**
  43. * @brief CCAN Controller Area Network register block structure
  44. */
  45. typedef struct { /*!< C_CAN Structure */
  46. __IO uint32_t CNTL; /*!< CAN control */
  47. __IO uint32_t STAT; /*!< Status register */
  48. __I uint32_t EC; /*!< Error counter */
  49. __IO uint32_t BT; /*!< Bit timing register */
  50. __I uint32_t INT; /*!< Interrupt register */
  51. __IO uint32_t TEST; /*!< Test register */
  52. __IO uint32_t BRPE; /*!< Baud rate prescaler extension register */
  53. __I uint32_t RESERVED0;
  54. __IO uint32_t IF1_CMDREQ; /*!< Message interface command request */
  55. union {
  56. __IO uint32_t IF1_CMDMSK_R; /*!< Message interface command mask (read direction) */
  57. __IO uint32_t IF1_CMDMSK_W; /*!< Message interface command mask (write direction) */
  58. };
  59. __IO uint32_t IF1_MSK1; /*!< Message interface mask 1 */
  60. __IO uint32_t IF1_MSK2; /*!< Message interface 1 mask 2 */
  61. __IO uint32_t IF1_ARB1; /*!< Message interface 1 arbitration 1 */
  62. __IO uint32_t IF1_ARB2; /*!< Message interface 1 arbitration 2 */
  63. __IO uint32_t IF1_MCTRL; /*!< Message interface 1 message control */
  64. __IO uint32_t IF1_DA1; /*!< Message interface data A1 */
  65. __IO uint32_t IF1_DA2; /*!< Message interface 1 data A2 */
  66. __IO uint32_t IF1_DB1; /*!< Message interface 1 data B1 */
  67. __IO uint32_t IF1_DB2; /*!< Message interface 1 data B2 */
  68. __I uint32_t RESERVED1[13];
  69. __IO uint32_t IF2_CMDREQ; /*!< Message interface command request */
  70. union {
  71. __IO uint32_t IF2_CMDMSK_R; /*!< Message interface command mask (read direction) */
  72. __IO uint32_t IF2_CMDMSK_W; /*!< Message interface command mask (write direction) */
  73. };
  74. __IO uint32_t IF2_MSK1; /*!< Message interface mask 1 */
  75. __IO uint32_t IF2_MSK2; /*!< Message interface 1 mask 2 */
  76. __IO uint32_t IF2_ARB1; /*!< Message interface 1 arbitration 1 */
  77. __IO uint32_t IF2_ARB2; /*!< Message interface 1 arbitration 2 */
  78. __IO uint32_t IF2_MCTRL; /*!< Message interface 1 message control */
  79. __IO uint32_t IF2_DA1; /*!< Message interface data A1 */
  80. __IO uint32_t IF2_DA2; /*!< Message interface 1 data A2 */
  81. __IO uint32_t IF2_DB1; /*!< Message interface 1 data B1 */
  82. __IO uint32_t IF2_DB2; /*!< Message interface 1 data B2 */
  83. __I uint32_t RESERVED2[21];
  84. __I uint32_t TXREQ1; /*!< Transmission request 1 */
  85. __I uint32_t TXREQ2; /*!< Transmission request 2 */
  86. __I uint32_t RESERVED3[6];
  87. __I uint32_t ND1; /*!< New data 1 */
  88. __I uint32_t ND2; /*!< New data 2 */
  89. __I uint32_t RESERVED4[6];
  90. __I uint32_t IR1; /*!< Interrupt pending 1 */
  91. __I uint32_t IR2; /*!< Interrupt pending 2 */
  92. __I uint32_t RESERVED5[6];
  93. __I uint32_t MSGV1; /*!< Message valid 1 */
  94. __I uint32_t MSGV2; /*!< Message valid 2 */
  95. __I uint32_t RESERVED6[6];
  96. __IO uint32_t CLKDIV; /*!< CAN clock divider register */
  97. } IP_CCAN_001_Type;
  98. /**
  99. * @}
  100. */
  101. #ifdef __cplusplus
  102. }
  103. #endif
  104. #endif /* __CCAN_001_H_ */