]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/RX200_RX231-RSK_Renesas_e2studio/src/cg_src/r_cg_port.h
Update RX231 projects to blink the LED.
[freertos] / FreeRTOS / Demo / RX200_RX231-RSK_Renesas_e2studio / src / cg_src / r_cg_port.h
1 /***********************************************************************************************************************\r
2 * DISCLAIMER\r
3 * This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.\r
4 * No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all\r
5 * applicable laws, including copyright laws. \r
6 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIESREGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED\r
7 * OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
8 * NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY\r
9 * LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,\r
10 * INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR\r
11 * ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\r
12 * Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability \r
13 * of this software. By using this software, you agree to the additional terms and conditions found by accessing the \r
14 * following link:\r
15 * http://www.renesas.com/disclaimer\r
16 *\r
17 * Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved.\r
18 ***********************************************************************************************************************/\r
19 \r
20 /***********************************************************************************************************************\r
21 * File Name    : r_cg_port.h\r
22 * Version      : Code Generator for RX231 V1.00.00.03 [10 Jul 2015]\r
23 * Device(s)    : R5F52318AxFP\r
24 * Tool-Chain   : CCRX\r
25 * Description  : This file implements device driver for Port module.\r
26 * Creation Date: 2015/08/17\r
27 ***********************************************************************************************************************/\r
28 #ifndef PORT_H\r
29 #define PORT_H\r
30 \r
31 /***********************************************************************************************************************\r
32 Macro definitions (Register bit)\r
33 ***********************************************************************************************************************/\r
34 /*\r
35     Port Direction Register (PDR)\r
36 */\r
37 /* Pmn Direction Control (B7 - B0) */\r
38 #define _00_Pm0_MODE_NOT_USED   (0x00U) /* Pm0 not used */\r
39 #define _00_Pm0_MODE_INPUT      (0x00U) /* Pm0 as input */\r
40 #define _01_Pm0_MODE_OUTPUT     (0x01U) /* Pm0 as output */\r
41 #define _00_Pm1_MODE_NOT_USED   (0x00U) /* Pm1 not used */\r
42 #define _00_Pm1_MODE_INPUT      (0x00U) /* Pm1 as input */\r
43 #define _02_Pm1_MODE_OUTPUT     (0x02U) /* Pm1 as output */\r
44 #define _00_Pm2_MODE_NOT_USED   (0x00U) /* Pm2 not used */\r
45 #define _00_Pm2_MODE_INPUT      (0x00U) /* Pm2 as input */\r
46 #define _04_Pm2_MODE_OUTPUT     (0x04U) /* Pm2 as output */\r
47 #define _00_Pm3_MODE_NOT_USED   (0x00U) /* Pm3 not used */\r
48 #define _00_Pm3_MODE_INPUT      (0x00U) /* Pm3 as input */\r
49 #define _08_Pm3_MODE_OUTPUT     (0x08U) /* Pm3 as output */\r
50 #define _00_Pm4_MODE_NOT_USED   (0x00U) /* Pm4 not used */\r
51 #define _00_Pm4_MODE_INPUT      (0x00U) /* Pm4 as input */\r
52 #define _10_Pm4_MODE_OUTPUT     (0x10U) /* Pm4 as output */\r
53 #define _00_Pm5_MODE_NOT_USED   (0x00U) /* Pm5 not used */\r
54 #define _00_Pm5_MODE_INPUT      (0x00U) /* Pm5 as input */\r
55 #define _20_Pm5_MODE_OUTPUT     (0x20U) /* Pm5 as output */\r
56 #define _00_Pm6_MODE_NOT_USED   (0x00U) /* Pm6 not used */\r
57 #define _00_Pm6_MODE_INPUT      (0x00U) /* Pm6 as input */\r
58 #define _40_Pm6_MODE_OUTPUT     (0x40U) /* Pm6 as output */\r
59 #define _00_Pm7_MODE_NOT_USED   (0x00U) /* Pm7 not used */\r
60 #define _00_Pm7_MODE_INPUT      (0x00U) /* Pm7 as input */\r
61 #define _80_Pm7_MODE_OUTPUT     (0x80U) /* Pm7 as output */\r
62 \r
63 /*\r
64     Port Output Data Register (PODR)\r
65 */\r
66 /* Pmn Output Data Store (B7 - B0) */\r
67 #define _00_Pm0_OUTPUT_0        (0x00U) /* output low at B0 */\r
68 #define _01_Pm0_OUTPUT_1        (0x01U) /* output high at B0 */\r
69 #define _00_Pm1_OUTPUT_0        (0x00U) /* output low at B1 */\r
70 #define _02_Pm1_OUTPUT_1        (0x02U) /* output high at B1 */\r
71 #define _00_Pm2_OUTPUT_0        (0x00U) /* output low at B2 */\r
72 #define _04_Pm2_OUTPUT_1        (0x04U) /* output high at B2 */\r
73 #define _00_Pm3_OUTPUT_0        (0x00U) /* output low at B3 */\r
74 #define _08_Pm3_OUTPUT_1        (0x08U) /* output high at B3 */\r
75 #define _00_Pm4_OUTPUT_0        (0x00U) /* output low at B4 */\r
76 #define _10_Pm4_OUTPUT_1        (0x10U) /* output high at B4 */\r
77 #define _00_Pm5_OUTPUT_0        (0x00U) /* output low at B5 */\r
78 #define _20_Pm5_OUTPUT_1        (0x20U) /* output high at B5 */\r
79 #define _00_Pm6_OUTPUT_0        (0x00U) /* output low at B6 */\r
80 #define _40_Pm6_OUTPUT_1        (0x40U) /* output high at B6 */\r
81 #define _00_Pm7_OUTPUT_0        (0x00U) /* output low at B7 */\r
82 #define _80_Pm7_OUTPUT_1        (0x80U) /* output high at B7 */\r
83 \r
84 /*\r
85     Open Drain Control Register 0 (ODR0)\r
86 */\r
87 /* Pmn Output Type Select (Pm0 to Pm3) */\r
88 #define _00_Pm0_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
89 #define _01_Pm0_NCH_OPEN_DRAIN  (0x01U) /* N-channel open-drain output */\r
90 #define _00_Pm1_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
91 #define _04_Pm1_NCH_OPEN_DRAIN  (0x04U) /* N-channel open-drain output */\r
92 #define _08_Pm1_PCH_OPEN_DRAIN  (0x08U) /* PMOS open-drain output, for PE1 only*/\r
93 #define _00_Pm2_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
94 #define _10_Pm2_NCH_OPEN_DRAIN  (0x10U) /* N-channel open-drain output */\r
95 #define _00_Pm3_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
96 #define _40_Pm3_NCH_OPEN_DRAIN  (0x40U) /* N-channel open-drain output */\r
97 \r
98 /*\r
99     Open Drain Control Register 1 (ODR1)\r
100 */\r
101 /* Pmn Output Type Select (Pm4 to Pm7) */\r
102 #define _00_Pm4_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
103 #define _01_Pm4_NCH_OPEN_DRAIN  (0x01U) /* N-channel open-drain output */\r
104 #define _00_Pm5_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
105 #define _04_Pm5_NCH_OPEN_DRAIN  (0x04U) /* N-channel open-drain output */\r
106 #define _00_Pm6_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
107 #define _10_Pm6_NCH_OPEN_DRAIN  (0x10U) /* N-channel open-drain output */\r
108 #define _00_Pm7_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
109 #define _40_Pm7_NCH_OPEN_DRAIN  (0x40U) /* N-channel open-drain output */\r
110 \r
111 /*\r
112     Pull-Up Control Register (PCR)\r
113 */\r
114 /* Pmn Input Pull-Up Resistor Control (B7 - B0) */\r
115 #define _00_Pm0_PULLUP_OFF      (0x00U) /* Pm0 pull-up resistor not connected */\r
116 #define _01_Pm0_PULLUP_ON       (0x01U) /* Pm0 pull-up resistor connected */\r
117 #define _00_Pm1_PULLUP_OFF      (0x00U) /* Pm1 pull-up resistor not connected */\r
118 #define _02_Pm1_PULLUP_ON       (0x02U) /* Pm1 pull-up resistor connected */\r
119 #define _00_Pm2_PULLUP_OFF      (0x00U) /* Pm2 Pull-up resistor not connected */\r
120 #define _04_Pm2_PULLUP_ON       (0x04U) /* Pm2 pull-up resistor connected */\r
121 #define _00_Pm3_PULLUP_OFF      (0x00U) /* Pm3 pull-up resistor not connected */\r
122 #define _08_Pm3_PULLUP_ON       (0x08U) /* Pm3 pull-up resistor connected */\r
123 #define _00_Pm4_PULLUP_OFF      (0x00U) /* Pm4 pull-up resistor not connected */\r
124 #define _10_Pm4_PULLUP_ON       (0x10U) /* Pm4 pull-up resistor connected */\r
125 #define _00_Pm5_PULLUP_OFF      (0x00U) /* Pm5 pull-up resistor not connected */\r
126 #define _20_Pm5_PULLUP_ON       (0x20U) /* Pm5 pull-up resistor connected */\r
127 #define _00_Pm6_PULLUP_OFF      (0x00U) /* Pm6 pull-up resistor not connected */\r
128 #define _40_Pm6_PULLUP_ON       (0x40U) /* Pm6 pull-up resistor connected */\r
129 #define _00_Pm7_PULLUP_OFF      (0x00U) /* Pm7 pull-up resistor not connected */\r
130 #define _80_Pm7_PULLUP_ON       (0x80U) /* Pm7 pull-up resistor connected */\r
131 \r
132 /*\r
133     Drive Capacity Control Register (DSCR)\r
134 */\r
135 /* Pmn Drive Capacity Control (B7 - B0) */\r
136 #define _00_Pm0_HIDRV_OFF       (0x00U) /* Pm0 Normal drive output */\r
137 #define _01_Pm0_HIDRV_ON        (0x01U) /* Pm0 High-drive output */\r
138 #define _00_Pm1_HIDRV_OFF       (0x00U) /* Pm1 Normal drive output */\r
139 #define _02_Pm1_HIDRV_ON        (0x02U) /* Pm1 High-drive output */\r
140 #define _00_Pm2_HIDRV_OFF       (0x00U) /* Pm2 Normal drive output */\r
141 #define _04_Pm2_HIDRV_ON        (0x04U) /* Pm2 High-drive output */\r
142 #define _00_Pm3_HIDRV_OFF       (0x00U) /* Pm3 Normal drive output */\r
143 #define _08_Pm3_HIDRV_ON        (0x08U) /* Pm3 High-drive output */\r
144 #define _00_Pm4_HIDRV_OFF       (0x00U) /* Pm4 Normal drive output */\r
145 #define _10_Pm4_HIDRV_ON        (0x10U) /* Pm4 High-drive output */\r
146 #define _00_Pm5_HIDRV_OFF       (0x00U) /* Pm5 Normal drive output */\r
147 #define _20_Pm5_HIDRV_ON        (0x20U) /* Pm5 High-drive output */\r
148 #define _00_Pm6_HIDRV_OFF       (0x00U) /* Pm6 Normal drive output */\r
149 #define _40_Pm6_HIDRV_ON        (0x40U) /* Pm6 High-drive output */\r
150 #define _00_Pm7_HIDRV_OFF       (0x00U) /* Pm7 Normal drive output */\r
151 #define _80_Pm7_HIDRV_ON        (0x80U) /* Pm7 High-drive output */\r
152 \r
153 \r
154 /***********************************************************************************************************************\r
155 Macro definitions\r
156 ***********************************************************************************************************************/\r
157 \r
158 \r
159 /***********************************************************************************************************************\r
160 Typedef definitions\r
161 ***********************************************************************************************************************/\r
162 \r
163 /***********************************************************************************************************************\r
164 Global functions\r
165 ***********************************************************************************************************************/\r
166 void R_PORT_Create(void);\r
167 \r
168 /* Start user code for function. Do not edit comment generated here */\r
169 /* End user code. Do not edit comment generated here */\r
170 #endif