r_pdl_cmt.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*""FILE COMMENT""*******************************************************
  2. * System Name : CMT API for RX62Nxx
  3. * File Name : r_pdl_cmt.h
  4. * Version : 1.02
  5. * Contents : CMT 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_CMT_H
  23. #define R_PDL_CMT_H
  24. #include "r_pdl_common_defs_RX62Nxx.h"
  25. /* Function prototypes */
  26. bool R_CMT_Create(
  27. uint8_t,
  28. uint16_t,
  29. float,
  30. void *,
  31. uint8_t
  32. );
  33. bool R_CMT_CreateOneShot(
  34. uint8_t,
  35. uint16_t,
  36. float,
  37. void *,
  38. uint8_t
  39. );
  40. bool R_CMT_Destroy(
  41. uint8_t
  42. );
  43. bool R_CMT_Control(
  44. uint8_t,
  45. uint16_t,
  46. float
  47. );
  48. bool R_CMT_Read(
  49. uint8_t,
  50. uint8_t *,
  51. uint16_t *
  52. );
  53. /* Timer counter control */
  54. #define PDL_CMT_STOP 0x0001u
  55. #define PDL_CMT_START 0x0002u
  56. /* Calculation selection */
  57. #define PDL_CMT_PERIOD 0x0004u
  58. #define PDL_CMT_FREQUENCY 0x0008u
  59. /* CPU control */
  60. #define PDL_CMT_CPU_ON 0x0010u
  61. #define PDL_CMT_CPU_OFF 0x0020u
  62. /* DMAC / DTC trigger control */
  63. #define PDL_CMT_DMAC_DTC_TRIGGER_DISABLE 0x0040u
  64. #define PDL_CMT_DMAC_TRIGGER_ENABLE 0x0080u
  65. #define PDL_CMT_DTC_TRIGGER_ENABLE 0x0100u
  66. /* Direct register control */
  67. #define PDL_CMT_CONSTANT 0x0200u
  68. #define PDL_CMT_COUNTER 0x0400u
  69. #define PDL_CMT_PCLK_DIV_8 0x0800u
  70. #define PDL_CMT_PCLK_DIV_32 0x1000u
  71. #define PDL_CMT_PCLK_DIV_128 0x2000u
  72. #define PDL_CMT_PCLK_DIV_512 0x4000u
  73. #endif
  74. /* End of file */