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