]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/RX113-RSK_Renesas_e2studio/src/cg_src/r_cg_port.h
FreeRTOS source:
[freertos] / FreeRTOS / Demo / RX113-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 RX113 V1.02.01.02 [28 May 2015]\r
23 * Device(s)    : R5F51138AxFP\r
24 * Tool-Chain   : CCRX\r
25 * Description  : This file implements device driver for Port module.\r
26 * Creation Date: 21/09/2015\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 _02_Pm0_PCH_OPEN_DRAIN  (0x02U) /* P-channel open-drain output */\r
91 #define _00_Pm1_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
92 #define _04_Pm1_NCH_OPEN_DRAIN  (0x04U) /* N-channel open-drain output */\r
93 #define _08_Pm1_PCH_OPEN_DRAIN  (0x08U) /* P-channel open-drain output */\r
94 #define _00_Pm2_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
95 #define _10_Pm2_NCH_OPEN_DRAIN  (0x10U) /* N-channel open-drain output */\r
96 #define _20_Pm2_PCH_OPEN_DRAIN  (0x20U) /* P-channel open-drain output */\r
97 #define _00_Pm3_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
98 #define _40_Pm3_NCH_OPEN_DRAIN  (0x40U) /* N-channel open-drain output */\r
99 #define _80_Pm3_PCH_OPEN_DRAIN  (0x80U) /* P-channel open-drain output */\r
100 \r
101 /*\r
102     Open Drain Control Register 1 (ODR1)\r
103 */\r
104 /* Pmn Output Type Select (Pm4 to Pm7) */\r
105 #define _00_Pm4_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
106 #define _01_Pm4_NCH_OPEN_DRAIN  (0x01U) /* N-channel open-drain output */\r
107 #define _02_Pm4_PCH_OPEN_DRAIN  (0x02U) /* P-channel open-drain output */\r
108 #define _00_Pm5_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
109 #define _04_Pm5_NCH_OPEN_DRAIN  (0x04U) /* N-channel open-drain output */\r
110 #define _08_Pm5_PCH_OPEN_DRAIN  (0x08U) /* P-channel open-drain output */\r
111 #define _00_Pm6_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
112 #define _10_Pm6_NCH_OPEN_DRAIN  (0x10U) /* N-channel open-drain output */\r
113 #define _20_Pm6_PCH_OPEN_DRAIN  (0x20U) /* P-channel open-drain output */\r
114 #define _00_Pm7_CMOS_OUTPUT     (0x00U) /* CMOS output */\r
115 #define _40_Pm7_NCH_OPEN_DRAIN  (0x40U) /* N-channel open-drain output */\r
116 #define _80_Pm7_PCH_OPEN_DRAIN  (0x80U) /* P-channel open-drain output */\r
117 \r
118 /*\r
119     Pull-Up Control Register (PCR)\r
120 */\r
121 /* Pm0 Input Pull-Up Resistor Control ((B7 - B0)) */\r
122 #define _00_Pm0_PULLUP_OFF      (0x00U) /* Pn0 pull-up resistor not connected */\r
123 #define _01_Pm0_PULLUP_ON       (0x01U) /* Pn0 pull-up resistor connected */\r
124 #define _00_Pm1_PULLUP_OFF      (0x00U) /* Pn1 pull-up resistor not connected */\r
125 #define _02_Pm1_PULLUP_ON       (0x02U) /* Pn1 pull-up resistor connected */\r
126 #define _00_Pm2_PULLUP_OFF      (0x00U) /* Pn2 Pull-up resistor not connected */\r
127 #define _04_Pm2_PULLUP_ON       (0x04U) /* Pn2 pull-up resistor connected */\r
128 #define _00_Pm3_PULLUP_OFF      (0x00U) /* Pn3 pull-up resistor not connected */\r
129 #define _08_Pm3_PULLUP_ON       (0x08U) /* Pn3 pull-up resistor connected */\r
130 #define _00_Pm4_PULLUP_OFF      (0x00U) /* Pn4 pull-up resistor not connected */\r
131 #define _10_Pm4_PULLUP_ON       (0x10U) /* Pn4 pull-up resistor connected */\r
132 #define _00_Pm5_PULLUP_OFF      (0x00U) /* Pn5 pull-up resistor not connected */\r
133 #define _20_Pm5_PULLUP_ON       (0x20U) /* Pn5 pull-up resistor connected */\r
134 #define _00_Pm6_PULLUP_OFF      (0x00U) /* Pn6 pull-up resistor not connected */\r
135 #define _40_Pm6_PULLUP_ON       (0x40U) /* Pn6 pull-up resistor connected */\r
136 #define _00_Pm7_PULLUP_OFF      (0x00U) /* Pn7 pull-up resistor not connected */\r
137 #define _80_Pm7_PULLUP_ON       (0x80U) /* Pn7 pull-up resistor connected */\r
138 \r
139 /*\r
140     Port Switching Register A (PSRA)\r
141 */\r
142 /* PB6/PC0 Switching (PSEL6) */\r
143 #define _00_PORT_PSEL6_PB6      (0x00U) /* PB6 general I/O port function is selected */\r
144 #define _40_PORT_PSEL6_PC0      (0x40U) /* PC0 general I/O port function is selected */\r
145 /* PB7/PC1 Switching (PSEL7) */\r
146 #define _00_PORT_PSEL7_PB7      (0x00U) /* PB7 general I/O port function is selected */\r
147 #define _80_PORT_PSEL7_PC1      (0x80U) /* PC1 general I/O port function is selected */\r
148 \r
149 \r
150 /***********************************************************************************************************************\r
151 Macro definitions\r
152 ***********************************************************************************************************************/\r
153 #define _6B_PDR0_DEFAULT         (0x6BU) /* PDR0 default value */\r
154 #define _D8_PDR3_DEFAULT         (0xD8U) /* PDR3 default value */\r
155 #define _A0_PDR4_DEFAULT         (0xA0U) /* PDR4 default value */\r
156 #define _80_PDR5_DEFAULT         (0x80U) /* PDR5 default value */\r
157 #define _F8_PDR9_DEFAULT         (0xF8U) /* PDR9 default value */\r
158 #define _E0_PDRD_DEFAULT         (0xE0U) /* PDRD default value */\r
159 #define _3F_PDRF_DEFAULT         (0x3FU) /* PDRF default value */\r
160 #define _32_PDRJ_DEFAULT         (0x32U) /* PDRJ default value */\r
161 \r
162 \r
163 /***********************************************************************************************************************\r
164 Typedef definitions\r
165 ***********************************************************************************************************************/\r
166 \r
167 /***********************************************************************************************************************\r
168 Global functions\r
169 ***********************************************************************************************************************/\r
170 void R_PORT_Create(void);\r
171 \r
172 /* Start user code for function. Do not edit comment generated here */\r
173 /* End user code. Do not edit comment generated here */\r
174 #endif