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