1 /***********************************************************************************************************************
\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
15 * http://www.renesas.com/disclaimer
\r
17 * Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved.
\r
18 ***********************************************************************************************************************/
\r
20 /***********************************************************************************************************************
\r
21 * File Name : r_cg_port.h
\r
22 * Version : Code Generator for RZ/T1 V1.00.00.09 [02 Mar 2015]
\r
23 * Device(s) : R7S910018CBG
\r
24 * Tool-Chain : GCCARM
\r
25 * Description : This file implements device driver for Port module.
\r
26 * Creation Date: 22/04/2015
\r
27 ***********************************************************************************************************************/
\r
31 /***********************************************************************************************************************
\r
32 Macro definitions (Register bit)
\r
33 ***********************************************************************************************************************/
\r
35 Port Direction Register (PDR)
\r
37 /* Pmn Direction Control (B0 - B15) */
\r
38 #define _Pm0_MODE_NOT_USED (0x0000U) /* Pm0 not used (Hi-z input protection) */
\r
39 #define _Pm0_MODE_INPUT (0x0002U) /* Pm0 as input */
\r
40 #define _Pm0_MODE_OUTPUT (0x0003U) /* Pm0 as output */
\r
41 #define _Pm1_MODE_NOT_USED (0x0000U) /* Pm1 not used (Hi-z input protection) */
\r
42 #define _Pm1_MODE_INPUT (0x0008U) /* Pm1 as input */
\r
43 #define _Pm1_MODE_OUTPUT (0x000CU) /* Pm1 as output */
\r
44 #define _Pm2_MODE_NOT_USED (0x0000U) /* Pm2 not used (Hi-z input protection) */
\r
45 #define _Pm2_MODE_INPUT (0x0020U) /* Pm2 as input */
\r
46 #define _Pm2_MODE_OUTPUT (0x0030U) /* Pm2 as output */
\r
47 #define _Pm3_MODE_NOT_USED (0x0000U) /* Pm3 not used (Hi-z input protection) */
\r
48 #define _Pm3_MODE_INPUT (0x0080U) /* Pm3 as input */
\r
49 #define _Pm3_MODE_OUTPUT (0x00C0U) /* Pm3 as output */
\r
50 #define _Pm4_MODE_NOT_USED (0x0000U) /* Pm4 not used (Hi-z input protection) */
\r
51 #define _Pm4_MODE_INPUT (0x0200U) /* Pm4 as input */
\r
52 #define _Pm4_MODE_OUTPUT (0x0300U) /* Pm4 as output */
\r
53 #define _Pm5_MODE_NOT_USED (0x0000U) /* Pm5 not used (Hi-z input protection) */
\r
54 #define _Pm5_MODE_INPUT (0x0800U) /* Pm5 as input */
\r
55 #define _Pm5_MODE_OUTPUT (0x0C00U) /* Pm5 as output */
\r
56 #define _Pm6_MODE_NOT_USED (0x0000U) /* Pm6 not used (Hi-z input protection) */
\r
57 #define _Pm6_MODE_INPUT (0x2000U) /* Pm6 as input */
\r
58 #define _Pm6_MODE_OUTPUT (0x3000U) /* Pm6 as output */
\r
59 #define _Pm7_MODE_NOT_USED (0x0000U) /* Pm7 not used (Hi-z input protection) */
\r
60 #define _Pm7_MODE_INPUT (0x8000U) /* Pm7 as input */
\r
61 #define _Pm7_MODE_OUTPUT (0xC000U) /* Pm7 as output */
\r
64 Port Output Data Register (PODR)
\r
66 /* Pmn Output Data Store (B0 - B7) */
\r
67 #define _Pm0_OUTPUT_0 (0x00U) /* Output low at B0 */
\r
68 #define _Pm0_OUTPUT_1 (0x01U) /* Output high at B0 */
\r
69 #define _Pm1_OUTPUT_0 (0x00U) /* Output low at B1 */
\r
70 #define _Pm1_OUTPUT_1 (0x02U) /* Output high at B1 */
\r
71 #define _Pm2_OUTPUT_0 (0x00U) /* Output low at B2 */
\r
72 #define _Pm2_OUTPUT_1 (0x04U) /* Output high at B2 */
\r
73 #define _Pm3_OUTPUT_0 (0x00U) /* Output low at B3 */
\r
74 #define _Pm3_OUTPUT_1 (0x08U) /* Output high at B3 */
\r
75 #define _Pm4_OUTPUT_0 (0x00U) /* Output low at B4 */
\r
76 #define _Pm4_OUTPUT_1 (0x10U) /* Output high at B4 */
\r
77 #define _Pm5_OUTPUT_0 (0x00U) /* Output low at B5 */
\r
78 #define _Pm5_OUTPUT_1 (0x20U) /* Output high at B5 */
\r
79 #define _Pm6_OUTPUT_0 (0x00U) /* Output low at B6 */
\r
80 #define _Pm6_OUTPUT_1 (0x40U) /* Output high at B6 */
\r
81 #define _Pm7_OUTPUT_0 (0x00U) /* Output low at B7 */
\r
82 #define _Pm7_OUTPUT_1 (0x80U) /* Output high at B7 */
\r
85 Pull-Up/Pull-Down Control Register (PCR)
\r
87 /* Pmn Input Pull-Up Resistor Control (B0 - B15) */
\r
88 #define _Pm0_PULLUPDOWN_DISABLE (0x0000U) /* Pm0 pull-up resistor and pull-down resistor not connected */
\r
89 #define _Pm0_PULLUPDOWN_PULLDOWN_ON (0x0001U) /* Pm0 pull-down resistor connected */
\r
90 #define _Pm0_PULLUPDOWN_PULLUP_ON (0x0002U) /* Pm0 pull-up resistor connected */
\r
91 #define _Pm1_PULLUPDOWN_DISABLE (0x0000U) /* Pm1 pull-up resistor and pull-down resistor not connected */
\r
92 #define _Pm1_PULLUPDOWN_PULLDOWN_ON (0x0004U) /* Pm1 pull-down resistor connected */
\r
93 #define _Pm1_PULLUPDOWN_PULLUP_ON (0x0008U) /* Pm1 pull-up resistor connected */
\r
94 #define _Pm2_PULLUPDOWN_DISABLE (0x0000U) /* Pm2 pull-up resistor and pull-down resistor not connected */
\r
95 #define _Pm2_PULLUPDOWN_PULLDOWN_ON (0x0010U) /* Pm2 pull-down resistor connected */
\r
96 #define _Pm2_PULLUPDOWN_PULLUP_ON (0x0020U) /* Pm2 pull-up resistor connected */
\r
97 #define _Pm3_PULLUPDOWN_DISABLE (0x0000U) /* Pm3 pull-up resistor and pull-down resistor not connected */
\r
98 #define _Pm3_PULLUPDOWN_PULLDOWN_ON (0x0040U) /* Pm3 pull-down resistor connected */
\r
99 #define _Pm3_PULLUPDOWN_PULLUP_ON (0x0080U) /* Pm3 pull-up resistor connected */
\r
100 #define _Pm4_PULLUPDOWN_DISABLE (0x0000U) /* Pm4 pull-up resistor and pull-down resistor not connected */
\r
101 #define _Pm4_PULLUPDOWN_PULLDOWN_ON (0x0100U) /* Pm4 pull-down resistor connected */
\r
102 #define _Pm4_PULLUPDOWN_PULLUP_ON (0x0200U) /* Pm4 pull-up resistor connected */
\r
103 #define _Pm5_PULLUPDOWN_DISABLE (0x0000U) /* Pm5 pull-up resistor and pull-down resistor not connected */
\r
104 #define _Pm5_PULLUPDOWN_PULLDOWN_ON (0x0400U) /* Pm5 pull-down resistor connected */
\r
105 #define _Pm5_PULLUPDOWN_PULLUP_ON (0x0800U) /* Pm5 pull-up resistor connected */
\r
106 #define _Pm6_PULLUPDOWN_DISABLE (0x0000U) /* Pm6 pull-up resistor and pull-down resistor not connected */
\r
107 #define _Pm6_PULLUPDOWN_PULLDOWN_ON (0x1000U) /* Pm6 pull-down resistor connected */
\r
108 #define _Pm6_PULLUPDOWN_PULLUP_ON (0x2000U) /* Pm6 pull-up resistor connected */
\r
109 #define _Pm7_PULLUPDOWN_DISABLE (0x0000U) /* Pm7 pull-up resistor and pull-down resistor not connected */
\r
110 #define _Pm7_PULLUPDOWN_PULLDOWN_ON (0x4000U) /* Pm7 pull-down resistor connected */
\r
111 #define _Pm7_PULLUPDOWN_PULLUP_ON (0x8000U) /* Pm7 pull-up resistor connected */
\r
114 Drive Capacity Control Register (DSCR)
\r
116 /* P10 Drive Capacity Control (B0) */
\r
117 #define _Pm0_HIDRV_OFF (0x0000U) /* P10 Normal drive output */
\r
118 #define _Pm0_HIDRV_ON (0x0001U) /* P10 High-drive output */
\r
120 /***********************************************************************************************************************
\r
122 ***********************************************************************************************************************/
\r
124 /***********************************************************************************************************************
\r
125 Typedef definitions
\r
126 ***********************************************************************************************************************/
\r
128 /***********************************************************************************************************************
\r
130 ***********************************************************************************************************************/
\r
131 void R_PORT_Create(void);
\r
133 /* Start user code for function. Do not edit comment generated here */
\r
134 /* End user code. Do not edit comment generated here */
\r