r_pdl_poe.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /*""FILE COMMENT""*******************************************************
  2. * System Name : POE API for RX62Nxx
  3. * File Name : r_pdl_poe.h
  4. * Version : 1.02
  5. * Contents : POE API header
  6. * Customer :
  7. * Model :
  8. * Order :
  9. * CPU : RX
  10. * Compiler : RXC
  11. * OS : Nothing
  12. * Programmer :
  13. * Note :
  14. ************************************************************************
  15. * Copyright, 2011. Renesas Electronics Corporation
  16. * and Renesas Solutions Corporation
  17. ************************************************************************
  18. * History : 2011.04.08
  19. * : Ver 1.02
  20. * : CS-5 release.
  21. *""FILE COMMENT END""**************************************************/
  22. #ifndef R_PDL_POE_H
  23. #define R_PDL_POE_H
  24. #include "r_pdl_common_defs_RX62Nxx.h"
  25. /* Function prototypes */
  26. bool R_POE_Set(
  27. uint32_t,
  28. uint8_t,
  29. uint32_t
  30. );
  31. bool R_POE_Create(
  32. uint16_t,
  33. void *,
  34. void *,
  35. void *,
  36. void *,
  37. uint8_t
  38. );
  39. bool POE_Control(
  40. uint8_t,
  41. uint16_t,
  42. uint16_t
  43. );
  44. bool R_POE_GetStatus(
  45. uint16_t *
  46. );
  47. /* Pin selection */
  48. #define PDL_POE_PINS_0_TO_3 0x01u
  49. #define PDL_POE_PINS_4_TO_7 0x02u
  50. #define PDL_POE_PIN_8 0x04u
  51. #define PDL_POE_PIN_9 0x08u
  52. /* Input pin detection */
  53. #define PDL_POE_0_MODE_EDGE 0x00000001ul
  54. #define PDL_POE_0_MODE_LOW_8 0x00000002ul
  55. #define PDL_POE_0_MODE_LOW_16 0x00000004ul
  56. #define PDL_POE_0_MODE_LOW_128 0x00000008ul
  57. #define PDL_POE_1_MODE_EDGE 0x00000010ul
  58. #define PDL_POE_1_MODE_LOW_8 0x00000020ul
  59. #define PDL_POE_1_MODE_LOW_16 0x00000040ul
  60. #define PDL_POE_1_MODE_LOW_128 0x00000080ul
  61. #define PDL_POE_2_MODE_EDGE 0x00000100ul
  62. #define PDL_POE_2_MODE_LOW_8 0x00000200ul
  63. #define PDL_POE_2_MODE_LOW_16 0x00000400ul
  64. #define PDL_POE_2_MODE_LOW_128 0x00000800ul
  65. #define PDL_POE_3_MODE_EDGE 0x00001000ul
  66. #define PDL_POE_3_MODE_LOW_8 0x00002000ul
  67. #define PDL_POE_3_MODE_LOW_16 0x00004000ul
  68. #define PDL_POE_3_MODE_LOW_128 0x00008000ul
  69. #define PDL_POE_4_MODE_EDGE 0x00010000ul
  70. #define PDL_POE_4_MODE_LOW_8 0x00020000ul
  71. #define PDL_POE_4_MODE_LOW_16 0x00040000ul
  72. #define PDL_POE_4_MODE_LOW_128 0x00080000ul
  73. #define PDL_POE_5_MODE_EDGE 0x00100000ul
  74. #define PDL_POE_5_MODE_LOW_8 0x00200000ul
  75. #define PDL_POE_5_MODE_LOW_16 0x00400000ul
  76. #define PDL_POE_5_MODE_LOW_128 0x00800000ul
  77. #define PDL_POE_6_MODE_EDGE 0x01000000ul
  78. #define PDL_POE_6_MODE_LOW_8 0x02000000ul
  79. #define PDL_POE_6_MODE_LOW_16 0x04000000ul
  80. #define PDL_POE_6_MODE_LOW_128 0x08000000ul
  81. #define PDL_POE_7_MODE_EDGE 0x10000000ul
  82. #define PDL_POE_7_MODE_LOW_8 0x20000000ul
  83. #define PDL_POE_7_MODE_LOW_16 0x40000000ul
  84. #define PDL_POE_7_MODE_LOW_128 0x80000000ul
  85. #define PDL_POE_8_MODE_EDGE 0x01u
  86. #define PDL_POE_8_MODE_LOW_8 0x02u
  87. #define PDL_POE_8_MODE_LOW_16 0x04u
  88. #define PDL_POE_8_MODE_LOW_128 0x08u
  89. #define PDL_POE_9_MODE_EDGE 0x10u
  90. #define PDL_POE_9_MODE_LOW_8 0x20u
  91. #define PDL_POE_9_MODE_LOW_16 0x40u
  92. #define PDL_POE_9_MODE_LOW_128 0x80u
  93. /* Pin output control */
  94. /* High impedance request detection */
  95. #define PDL_POE_HI_Z_REQ_8_ENABLE 0x00000001ul
  96. #define PDL_POE_HI_Z_REQ_MTIOC0A 0x00000002ul
  97. #define PDL_POE_HI_Z_REQ_MTIOC0B 0x00000004ul
  98. #define PDL_POE_HI_Z_REQ_MTIOC0C 0x00000008ul
  99. #define PDL_POE_HI_Z_REQ_MTIOC0D 0x00000010ul
  100. #define PDL_POE_HI_Z_REQ_9_ENABLE 0x00000020ul
  101. #define PDL_POE_HI_Z_REQ_MTIOC6A 0x00000040ul
  102. #define PDL_POE_HI_Z_REQ_MTIOC6B 0x00000080ul
  103. #define PDL_POE_HI_Z_REQ_MTIOC6C 0x00000100ul
  104. #define PDL_POE_HI_Z_REQ_MTIOC6D 0x00000200ul
  105. /* Output short detection */
  106. #define PDL_POE_SHORT_3_4_HI_Z 0x00000400ul
  107. #define PDL_POE_SHORT_MTIOC4BD_B 0x00000800ul
  108. #define PDL_POE_SHORT_MTIOC4AC_B 0x00001000ul
  109. #define PDL_POE_SHORT_MTIOC3BD_B 0x00002000ul
  110. #define PDL_POE_SHORT_MTIOC4BD_A 0x00004000ul
  111. #define PDL_POE_SHORT_MTIOC4AC_A 0x00008000ul
  112. #define PDL_POE_SHORT_MTIOC3BD_A 0x00010000ul
  113. #define PDL_POE_SHORT_9_10_HI_Z 0x00020000ul
  114. #define PDL_POE_SHORT_MTIOC10BD 0x00040000ul
  115. #define PDL_POE_SHORT_MTIOC10AC 0x00080000ul
  116. #define PDL_POE_SHORT_MTIOC9BD 0x00100000ul
  117. /* High impedance request response */
  118. #define PDL_POE_IRQ_HI_Z_0_3_DISABLE 0x0001u
  119. #define PDL_POE_IRQ_HI_Z_0_3_ENABLE 0x0002u
  120. #define PDL_POE_IRQ_HI_Z_4_7_DISABLE 0x0004u
  121. #define PDL_POE_IRQ_HI_Z_4_7_ENABLE 0x0008u
  122. #define PDL_POE_IRQ_HI_Z_8_DISABLE 0x0010u
  123. #define PDL_POE_IRQ_HI_Z_8_ENABLE 0x0020u
  124. #define PDL_POE_IRQ_HI_Z_9_DISABLE 0x0040u
  125. #define PDL_POE_IRQ_HI_Z_9_ENABLE 0x0080u
  126. /* Output short detection response */
  127. #define PDL_POE_IRQ_SHORT_3_4_ENABLE 0x0100u
  128. #define PDL_POE_IRQ_SHORT_3_4_DISABLE 0x0200u
  129. #define PDL_POE_IRQ_SHORT_9_10_ENABLE 0x0400u
  130. #define PDL_POE_IRQ_SHORT_9_10_DISABLE 0x0800u
  131. /* MTU channel high impedance control */
  132. #define PDL_POE_MTU3_MTU4_HI_Z_ON 0x01u
  133. #define PDL_POE_MTU3_MTU4_HI_Z_OFF 0x02u
  134. #define PDL_POE_MTU0_HI_Z_ON 0x04u
  135. #define PDL_POE_MTU0_HI_Z_OFF 0x08u
  136. #define PDL_POE_MTU9_MTU10_HI_Z_ON 0x10u
  137. #define PDL_POE_MTU9_MTU10_HI_Z_OFF 0x20u
  138. #define PDL_POE_MTU6_HI_Z_ON 0x40u
  139. #define PDL_POE_MTU6_HI_Z_OFF 0x80u
  140. /* Event flag control */
  141. #define PDL_POE_FLAG_POE0_CLEAR 0x0001u
  142. #define PDL_POE_FLAG_POE1_CLEAR 0x0002u
  143. #define PDL_POE_FLAG_POE2_CLEAR 0x0004u
  144. #define PDL_POE_FLAG_POE3_CLEAR 0x0008u
  145. #define PDL_POE_FLAG_POE4_CLEAR 0x0010u
  146. #define PDL_POE_FLAG_POE5_CLEAR 0x0020u
  147. #define PDL_POE_FLAG_POE6_CLEAR 0x0040u
  148. #define PDL_POE_FLAG_POE7_CLEAR 0x0080u
  149. #define PDL_POE_FLAG_POE8_CLEAR 0x0100u
  150. #define PDL_POE_FLAG_POE9_CLEAR 0x0200u
  151. #define PDL_POE_FLAG_SHORT_3_4_CLEAR 0x0400u
  152. #define PDL_POE_FLAG_SHORT_9_10_CLEAR 0x0800u
  153. #endif
  154. /* End of file */