1
0

r_pdl_ppg.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*""FILE COMMENT""*******************************************************
  2. * System Name : PPG API for RX62Nxx
  3. * File Name : r_pdl_PPG.h
  4. * Version : 1.02
  5. * Contents : PPG 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_PPG_H
  23. #define R_PDL_PPG_H
  24. #include "r_pdl_common_defs_RX62Nxx.h"
  25. /* Function prototypes */
  26. bool R_PPG_Create(
  27. uint32_t,
  28. uint16_t,
  29. uint8_t
  30. );
  31. bool R_PPG_Destroy(
  32. uint32_t
  33. );
  34. bool R_PPG_Control(
  35. uint32_t,
  36. uint8_t
  37. );
  38. /* Output pin selection */
  39. #define PDL_PPG_PO0 (PDL_PPG_GROUP_0 | 0x01u)
  40. #define PDL_PPG_PO1 (PDL_PPG_GROUP_0 | 0x02u)
  41. #define PDL_PPG_PO2 (PDL_PPG_GROUP_0 | 0x04u)
  42. #define PDL_PPG_PO3 (PDL_PPG_GROUP_0 | 0x08u)
  43. #define PDL_PPG_PO4 (PDL_PPG_GROUP_1 | 0x10u)
  44. #define PDL_PPG_PO5 (PDL_PPG_GROUP_1 | 0x20u)
  45. #define PDL_PPG_PO6 (PDL_PPG_GROUP_1 | 0x40u)
  46. #define PDL_PPG_PO7 (PDL_PPG_GROUP_1 | 0x80u)
  47. #define PDL_PPG_PO8 (PDL_PPG_GROUP_2 | 0x01u)
  48. #define PDL_PPG_PO9 (PDL_PPG_GROUP_2 | 0x02u)
  49. #define PDL_PPG_PO10 (PDL_PPG_GROUP_2 | 0x04u)
  50. #define PDL_PPG_PO11 (PDL_PPG_GROUP_2 | 0x08u)
  51. #define PDL_PPG_PO12 (PDL_PPG_GROUP_3 | 0x10u)
  52. #define PDL_PPG_PO13 (PDL_PPG_GROUP_3 | 0x20u)
  53. #define PDL_PPG_PO14 (PDL_PPG_GROUP_3 | 0x40u)
  54. #define PDL_PPG_PO15 (PDL_PPG_GROUP_3 | 0x80u)
  55. #define PDL_PPG_PO16 (PDL_PPG_GROUP_4 | 0x01u)
  56. #define PDL_PPG_PO17 (PDL_PPG_GROUP_4 | 0x02u)
  57. #define PDL_PPG_PO18 (PDL_PPG_GROUP_4 | 0x04u)
  58. #define PDL_PPG_PO19 (PDL_PPG_GROUP_4 | 0x08u)
  59. #define PDL_PPG_PO20 (PDL_PPG_GROUP_5 | 0x10u)
  60. #define PDL_PPG_PO21 (PDL_PPG_GROUP_5 | 0x20u)
  61. #define PDL_PPG_PO22 (PDL_PPG_GROUP_5 | 0x40u)
  62. #define PDL_PPG_PO23 (PDL_PPG_GROUP_5 | 0x80u)
  63. #define PDL_PPG_PO24 (PDL_PPG_GROUP_6 | 0x01u)
  64. #define PDL_PPG_PO25 (PDL_PPG_GROUP_6 | 0x02u)
  65. #define PDL_PPG_PO26 (PDL_PPG_GROUP_6 | 0x04u)
  66. #define PDL_PPG_PO27 (PDL_PPG_GROUP_6 | 0x08u)
  67. #define PDL_PPG_PO28 (PDL_PPG_GROUP_7 | 0x10u)
  68. #define PDL_PPG_PO29 (PDL_PPG_GROUP_7 | 0x20u)
  69. #define PDL_PPG_PO30 (PDL_PPG_GROUP_7 | 0x40u)
  70. #define PDL_PPG_PO31 (PDL_PPG_GROUP_7 | 0x80u)
  71. /* Output trigger selection */
  72. #define PDL_PPG_TRIGGER_MTU0 0x0001u
  73. #define PDL_PPG_TRIGGER_MTU1 0x0002u
  74. #define PDL_PPG_TRIGGER_MTU2 0x0004u
  75. #define PDL_PPG_TRIGGER_MTU3 0x0008u
  76. #define PDL_PPG_TRIGGER_MTU6 0x0010u
  77. #define PDL_PPG_TRIGGER_MTU7 0x0020u
  78. #define PDL_PPG_TRIGGER_MTU8 0x0040u
  79. #define PDL_PPG_TRIGGER_MTU9 0x0080u
  80. /* Non-overlap control */
  81. #define PDL_PPG_NORMAL 0x0100u
  82. #define PDL_PPG_NON_OVERLAP 0x0200u
  83. /* Invert control */
  84. #define PDL_PPG_DIRECT 0x0400u
  85. #define PDL_PPG_INVERT 0x0800u
  86. /* Group selection */
  87. #define PDL_PPG_GROUP_0 0x00000100u
  88. #define PDL_PPG_GROUP_1 0x00110200u
  89. #define PDL_PPG_GROUP_2 0x00220400u
  90. #define PDL_PPG_GROUP_3 0x00330800u
  91. #define PDL_PPG_GROUP_4 0x01041000u
  92. #define PDL_PPG_GROUP_5 0x01152000u
  93. #define PDL_PPG_GROUP_6 0x01264000u
  94. #define PDL_PPG_GROUP_7 0x01378000u
  95. #endif
  96. /* End of file */