1 /*********************************************************************************************************************** 2 * Copyright [2020-2022] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved. 3 * 4 * This software and documentation are supplied by Renesas Electronics America Inc. and may only be used with products 5 * of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized. Renesas products are 6 * sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for the selection and use 7 * of Renesas products and Renesas assumes no liability. No license, express or implied, to any intellectual property 8 * right is granted by Renesas. This software is protected under all applicable laws, including copyright laws. Renesas 9 * reserves the right to change or discontinue this software and/or this documentation. THE SOFTWARE AND DOCUMENTATION 10 * IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND TO THE FULLEST EXTENT 11 * PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY, INCLUDING WARRANTIES 12 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE SOFTWARE OR 13 * DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH. TO THE MAXIMUM 14 * EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR DOCUMENTATION 15 * (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER, INCLUDING, 16 * WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY LOST PROFITS, 17 * OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY 18 * OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS. 19 **********************************************************************************************************************/ 20 21 /*******************************************************************************************************************//** 22 * @addtogroup IOPORT 23 * @{ 24 **********************************************************************************************************************/ 25 26 #ifndef R_IOPORT_H 27 #define R_IOPORT_H 28 29 /*********************************************************************************************************************** 30 * Includes 31 **********************************************************************************************************************/ 32 #include "bsp_api.h" 33 34 /* Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */ 35 FSP_HEADER 36 37 #include "r_ioport_api.h" 38 #include "r_ioport_cfg.h" 39 40 /*********************************************************************************************************************** 41 * Macro definitions 42 **********************************************************************************************************************/ 43 44 /*********************************************************************************************************************** 45 * Typedef definitions 46 **********************************************************************************************************************/ 47 48 /** IOPORT private control block. DO NOT MODIFY. Initialization occurs when R_IOPORT_Open() is called. */ 49 typedef struct st_ioport_instance_ctrl 50 { 51 uint32_t open; 52 void const * p_context; 53 } ioport_instance_ctrl_t; 54 55 /* This typedef is here temporarily. See SWFLEX-144 for details. */ 56 /** Superset list of all possible IO port pins. */ 57 typedef enum e_ioport_port_pin_t 58 { 59 IOPORT_PORT_00_PIN_00 = 0x0000, ///< IO port 0 pin 0 60 IOPORT_PORT_00_PIN_01 = 0x0001, ///< IO port 0 pin 1 61 IOPORT_PORT_00_PIN_02 = 0x0002, ///< IO port 0 pin 2 62 IOPORT_PORT_00_PIN_03 = 0x0003, ///< IO port 0 pin 3 63 IOPORT_PORT_00_PIN_04 = 0x0004, ///< IO port 0 pin 4 64 IOPORT_PORT_00_PIN_05 = 0x0005, ///< IO port 0 pin 5 65 IOPORT_PORT_00_PIN_06 = 0x0006, ///< IO port 0 pin 6 66 IOPORT_PORT_00_PIN_07 = 0x0007, ///< IO port 0 pin 7 67 IOPORT_PORT_00_PIN_08 = 0x0008, ///< IO port 0 pin 8 68 IOPORT_PORT_00_PIN_09 = 0x0009, ///< IO port 0 pin 9 69 IOPORT_PORT_00_PIN_10 = 0x000A, ///< IO port 0 pin 10 70 IOPORT_PORT_00_PIN_11 = 0x000B, ///< IO port 0 pin 11 71 IOPORT_PORT_00_PIN_12 = 0x000C, ///< IO port 0 pin 12 72 IOPORT_PORT_00_PIN_13 = 0x000D, ///< IO port 0 pin 13 73 IOPORT_PORT_00_PIN_14 = 0x000E, ///< IO port 0 pin 14 74 IOPORT_PORT_00_PIN_15 = 0x000F, ///< IO port 0 pin 15 75 76 IOPORT_PORT_01_PIN_00 = 0x0100, ///< IO port 1 pin 0 77 IOPORT_PORT_01_PIN_01 = 0x0101, ///< IO port 1 pin 1 78 IOPORT_PORT_01_PIN_02 = 0x0102, ///< IO port 1 pin 2 79 IOPORT_PORT_01_PIN_03 = 0x0103, ///< IO port 1 pin 3 80 IOPORT_PORT_01_PIN_04 = 0x0104, ///< IO port 1 pin 4 81 IOPORT_PORT_01_PIN_05 = 0x0105, ///< IO port 1 pin 5 82 IOPORT_PORT_01_PIN_06 = 0x0106, ///< IO port 1 pin 6 83 IOPORT_PORT_01_PIN_07 = 0x0107, ///< IO port 1 pin 7 84 IOPORT_PORT_01_PIN_08 = 0x0108, ///< IO port 1 pin 8 85 IOPORT_PORT_01_PIN_09 = 0x0109, ///< IO port 1 pin 9 86 IOPORT_PORT_01_PIN_10 = 0x010A, ///< IO port 1 pin 10 87 IOPORT_PORT_01_PIN_11 = 0x010B, ///< IO port 1 pin 11 88 IOPORT_PORT_01_PIN_12 = 0x010C, ///< IO port 1 pin 12 89 IOPORT_PORT_01_PIN_13 = 0x010D, ///< IO port 1 pin 13 90 IOPORT_PORT_01_PIN_14 = 0x010E, ///< IO port 1 pin 14 91 IOPORT_PORT_01_PIN_15 = 0x010F, ///< IO port 1 pin 15 92 93 IOPORT_PORT_02_PIN_00 = 0x0200, ///< IO port 2 pin 0 94 IOPORT_PORT_02_PIN_01 = 0x0201, ///< IO port 2 pin 1 95 IOPORT_PORT_02_PIN_02 = 0x0202, ///< IO port 2 pin 2 96 IOPORT_PORT_02_PIN_03 = 0x0203, ///< IO port 2 pin 3 97 IOPORT_PORT_02_PIN_04 = 0x0204, ///< IO port 2 pin 4 98 IOPORT_PORT_02_PIN_05 = 0x0205, ///< IO port 2 pin 5 99 IOPORT_PORT_02_PIN_06 = 0x0206, ///< IO port 2 pin 6 100 IOPORT_PORT_02_PIN_07 = 0x0207, ///< IO port 2 pin 7 101 IOPORT_PORT_02_PIN_08 = 0x0208, ///< IO port 2 pin 8 102 IOPORT_PORT_02_PIN_09 = 0x0209, ///< IO port 2 pin 9 103 IOPORT_PORT_02_PIN_10 = 0x020A, ///< IO port 2 pin 10 104 IOPORT_PORT_02_PIN_11 = 0x020B, ///< IO port 2 pin 11 105 IOPORT_PORT_02_PIN_12 = 0x020C, ///< IO port 2 pin 12 106 IOPORT_PORT_02_PIN_13 = 0x020D, ///< IO port 2 pin 13 107 IOPORT_PORT_02_PIN_14 = 0x020E, ///< IO port 2 pin 14 108 IOPORT_PORT_02_PIN_15 = 0x020F, ///< IO port 2 pin 15 109 110 IOPORT_PORT_03_PIN_00 = 0x0300, ///< IO port 3 pin 0 111 IOPORT_PORT_03_PIN_01 = 0x0301, ///< IO port 3 pin 1 112 IOPORT_PORT_03_PIN_02 = 0x0302, ///< IO port 3 pin 2 113 IOPORT_PORT_03_PIN_03 = 0x0303, ///< IO port 3 pin 3 114 IOPORT_PORT_03_PIN_04 = 0x0304, ///< IO port 3 pin 4 115 IOPORT_PORT_03_PIN_05 = 0x0305, ///< IO port 3 pin 5 116 IOPORT_PORT_03_PIN_06 = 0x0306, ///< IO port 3 pin 6 117 IOPORT_PORT_03_PIN_07 = 0x0307, ///< IO port 3 pin 7 118 IOPORT_PORT_03_PIN_08 = 0x0308, ///< IO port 3 pin 8 119 IOPORT_PORT_03_PIN_09 = 0x0309, ///< IO port 3 pin 9 120 IOPORT_PORT_03_PIN_10 = 0x030A, ///< IO port 3 pin 10 121 IOPORT_PORT_03_PIN_11 = 0x030B, ///< IO port 3 pin 11 122 IOPORT_PORT_03_PIN_12 = 0x030C, ///< IO port 3 pin 12 123 IOPORT_PORT_03_PIN_13 = 0x030D, ///< IO port 3 pin 13 124 IOPORT_PORT_03_PIN_14 = 0x030E, ///< IO port 3 pin 14 125 IOPORT_PORT_03_PIN_15 = 0x030F, ///< IO port 3 pin 15 126 127 IOPORT_PORT_04_PIN_00 = 0x0400, ///< IO port 4 pin 0 128 IOPORT_PORT_04_PIN_01 = 0x0401, ///< IO port 4 pin 1 129 IOPORT_PORT_04_PIN_02 = 0x0402, ///< IO port 4 pin 2 130 IOPORT_PORT_04_PIN_03 = 0x0403, ///< IO port 4 pin 3 131 IOPORT_PORT_04_PIN_04 = 0x0404, ///< IO port 4 pin 4 132 IOPORT_PORT_04_PIN_05 = 0x0405, ///< IO port 4 pin 5 133 IOPORT_PORT_04_PIN_06 = 0x0406, ///< IO port 4 pin 6 134 IOPORT_PORT_04_PIN_07 = 0x0407, ///< IO port 4 pin 7 135 IOPORT_PORT_04_PIN_08 = 0x0408, ///< IO port 4 pin 8 136 IOPORT_PORT_04_PIN_09 = 0x0409, ///< IO port 4 pin 9 137 IOPORT_PORT_04_PIN_10 = 0x040A, ///< IO port 4 pin 10 138 IOPORT_PORT_04_PIN_11 = 0x040B, ///< IO port 4 pin 11 139 IOPORT_PORT_04_PIN_12 = 0x040C, ///< IO port 4 pin 12 140 IOPORT_PORT_04_PIN_13 = 0x040D, ///< IO port 4 pin 13 141 IOPORT_PORT_04_PIN_14 = 0x040E, ///< IO port 4 pin 14 142 IOPORT_PORT_04_PIN_15 = 0x040F, ///< IO port 4 pin 15 143 144 IOPORT_PORT_05_PIN_00 = 0x0500, ///< IO port 5 pin 0 145 IOPORT_PORT_05_PIN_01 = 0x0501, ///< IO port 5 pin 1 146 IOPORT_PORT_05_PIN_02 = 0x0502, ///< IO port 5 pin 2 147 IOPORT_PORT_05_PIN_03 = 0x0503, ///< IO port 5 pin 3 148 IOPORT_PORT_05_PIN_04 = 0x0504, ///< IO port 5 pin 4 149 IOPORT_PORT_05_PIN_05 = 0x0505, ///< IO port 5 pin 5 150 IOPORT_PORT_05_PIN_06 = 0x0506, ///< IO port 5 pin 6 151 IOPORT_PORT_05_PIN_07 = 0x0507, ///< IO port 5 pin 7 152 IOPORT_PORT_05_PIN_08 = 0x0508, ///< IO port 5 pin 8 153 IOPORT_PORT_05_PIN_09 = 0x0509, ///< IO port 5 pin 9 154 IOPORT_PORT_05_PIN_10 = 0x050A, ///< IO port 5 pin 10 155 IOPORT_PORT_05_PIN_11 = 0x050B, ///< IO port 5 pin 11 156 IOPORT_PORT_05_PIN_12 = 0x050C, ///< IO port 5 pin 12 157 IOPORT_PORT_05_PIN_13 = 0x050D, ///< IO port 5 pin 13 158 IOPORT_PORT_05_PIN_14 = 0x050E, ///< IO port 5 pin 14 159 IOPORT_PORT_05_PIN_15 = 0x050F, ///< IO port 5 pin 15 160 161 IOPORT_PORT_06_PIN_00 = 0x0600, ///< IO port 6 pin 0 162 IOPORT_PORT_06_PIN_01 = 0x0601, ///< IO port 6 pin 1 163 IOPORT_PORT_06_PIN_02 = 0x0602, ///< IO port 6 pin 2 164 IOPORT_PORT_06_PIN_03 = 0x0603, ///< IO port 6 pin 3 165 IOPORT_PORT_06_PIN_04 = 0x0604, ///< IO port 6 pin 4 166 IOPORT_PORT_06_PIN_05 = 0x0605, ///< IO port 6 pin 5 167 IOPORT_PORT_06_PIN_06 = 0x0606, ///< IO port 6 pin 6 168 IOPORT_PORT_06_PIN_07 = 0x0607, ///< IO port 6 pin 7 169 IOPORT_PORT_06_PIN_08 = 0x0608, ///< IO port 6 pin 8 170 IOPORT_PORT_06_PIN_09 = 0x0609, ///< IO port 6 pin 9 171 IOPORT_PORT_06_PIN_10 = 0x060A, ///< IO port 6 pin 10 172 IOPORT_PORT_06_PIN_11 = 0x060B, ///< IO port 6 pin 11 173 IOPORT_PORT_06_PIN_12 = 0x060C, ///< IO port 6 pin 12 174 IOPORT_PORT_06_PIN_13 = 0x060D, ///< IO port 6 pin 13 175 IOPORT_PORT_06_PIN_14 = 0x060E, ///< IO port 6 pin 14 176 IOPORT_PORT_06_PIN_15 = 0x060F, ///< IO port 6 pin 15 177 178 IOPORT_PORT_07_PIN_00 = 0x0700, ///< IO port 7 pin 0 179 IOPORT_PORT_07_PIN_01 = 0x0701, ///< IO port 7 pin 1 180 IOPORT_PORT_07_PIN_02 = 0x0702, ///< IO port 7 pin 2 181 IOPORT_PORT_07_PIN_03 = 0x0703, ///< IO port 7 pin 3 182 IOPORT_PORT_07_PIN_04 = 0x0704, ///< IO port 7 pin 4 183 IOPORT_PORT_07_PIN_05 = 0x0705, ///< IO port 7 pin 5 184 IOPORT_PORT_07_PIN_06 = 0x0706, ///< IO port 7 pin 6 185 IOPORT_PORT_07_PIN_07 = 0x0707, ///< IO port 7 pin 7 186 IOPORT_PORT_07_PIN_08 = 0x0708, ///< IO port 7 pin 8 187 IOPORT_PORT_07_PIN_09 = 0x0709, ///< IO port 7 pin 9 188 IOPORT_PORT_07_PIN_10 = 0x070A, ///< IO port 7 pin 10 189 IOPORT_PORT_07_PIN_11 = 0x070B, ///< IO port 7 pin 11 190 IOPORT_PORT_07_PIN_12 = 0x070C, ///< IO port 7 pin 12 191 IOPORT_PORT_07_PIN_13 = 0x070D, ///< IO port 7 pin 13 192 IOPORT_PORT_07_PIN_14 = 0x070E, ///< IO port 7 pin 14 193 IOPORT_PORT_07_PIN_15 = 0x070F, ///< IO port 7 pin 15 194 195 IOPORT_PORT_08_PIN_00 = 0x0800, ///< IO port 8 pin 0 196 IOPORT_PORT_08_PIN_01 = 0x0801, ///< IO port 8 pin 1 197 IOPORT_PORT_08_PIN_02 = 0x0802, ///< IO port 8 pin 2 198 IOPORT_PORT_08_PIN_03 = 0x0803, ///< IO port 8 pin 3 199 IOPORT_PORT_08_PIN_04 = 0x0804, ///< IO port 8 pin 4 200 IOPORT_PORT_08_PIN_05 = 0x0805, ///< IO port 8 pin 5 201 IOPORT_PORT_08_PIN_06 = 0x0806, ///< IO port 8 pin 6 202 IOPORT_PORT_08_PIN_07 = 0x0807, ///< IO port 8 pin 7 203 IOPORT_PORT_08_PIN_08 = 0x0808, ///< IO port 8 pin 8 204 IOPORT_PORT_08_PIN_09 = 0x0809, ///< IO port 8 pin 9 205 IOPORT_PORT_08_PIN_10 = 0x080A, ///< IO port 8 pin 10 206 IOPORT_PORT_08_PIN_11 = 0x080B, ///< IO port 8 pin 11 207 IOPORT_PORT_08_PIN_12 = 0x080C, ///< IO port 8 pin 12 208 IOPORT_PORT_08_PIN_13 = 0x080D, ///< IO port 8 pin 13 209 IOPORT_PORT_08_PIN_14 = 0x080E, ///< IO port 8 pin 14 210 IOPORT_PORT_08_PIN_15 = 0x080F, ///< IO port 8 pin 15 211 212 IOPORT_PORT_09_PIN_00 = 0x0900, ///< IO port 9 pin 0 213 IOPORT_PORT_09_PIN_01 = 0x0901, ///< IO port 9 pin 1 214 IOPORT_PORT_09_PIN_02 = 0x0902, ///< IO port 9 pin 2 215 IOPORT_PORT_09_PIN_03 = 0x0903, ///< IO port 9 pin 3 216 IOPORT_PORT_09_PIN_04 = 0x0904, ///< IO port 9 pin 4 217 IOPORT_PORT_09_PIN_05 = 0x0905, ///< IO port 9 pin 5 218 IOPORT_PORT_09_PIN_06 = 0x0906, ///< IO port 9 pin 6 219 IOPORT_PORT_09_PIN_07 = 0x0907, ///< IO port 9 pin 7 220 IOPORT_PORT_09_PIN_08 = 0x0908, ///< IO port 9 pin 8 221 IOPORT_PORT_09_PIN_09 = 0x0909, ///< IO port 9 pin 9 222 IOPORT_PORT_09_PIN_10 = 0x090A, ///< IO port 9 pin 10 223 IOPORT_PORT_09_PIN_11 = 0x090B, ///< IO port 9 pin 11 224 IOPORT_PORT_09_PIN_12 = 0x090C, ///< IO port 9 pin 12 225 IOPORT_PORT_09_PIN_13 = 0x090D, ///< IO port 9 pin 13 226 IOPORT_PORT_09_PIN_14 = 0x090E, ///< IO port 9 pin 14 227 IOPORT_PORT_09_PIN_15 = 0x090F, ///< IO port 9 pin 15 228 229 IOPORT_PORT_10_PIN_00 = 0x0A00, ///< IO port 10 pin 0 230 IOPORT_PORT_10_PIN_01 = 0x0A01, ///< IO port 10 pin 1 231 IOPORT_PORT_10_PIN_02 = 0x0A02, ///< IO port 10 pin 2 232 IOPORT_PORT_10_PIN_03 = 0x0A03, ///< IO port 10 pin 3 233 IOPORT_PORT_10_PIN_04 = 0x0A04, ///< IO port 10 pin 4 234 IOPORT_PORT_10_PIN_05 = 0x0A05, ///< IO port 10 pin 5 235 IOPORT_PORT_10_PIN_06 = 0x0A06, ///< IO port 10 pin 6 236 IOPORT_PORT_10_PIN_07 = 0x0A07, ///< IO port 10 pin 7 237 IOPORT_PORT_10_PIN_08 = 0x0A08, ///< IO port 10 pin 8 238 IOPORT_PORT_10_PIN_09 = 0x0A09, ///< IO port 10 pin 9 239 IOPORT_PORT_10_PIN_10 = 0x0A0A, ///< IO port 10 pin 10 240 IOPORT_PORT_10_PIN_11 = 0x0A0B, ///< IO port 10 pin 11 241 IOPORT_PORT_10_PIN_12 = 0x0A0C, ///< IO port 10 pin 12 242 IOPORT_PORT_10_PIN_13 = 0x0A0D, ///< IO port 10 pin 13 243 IOPORT_PORT_10_PIN_14 = 0x0A0E, ///< IO port 10 pin 14 244 IOPORT_PORT_10_PIN_15 = 0x0A0F, ///< IO port 10 pin 15 245 246 IOPORT_PORT_11_PIN_00 = 0x0B00, ///< IO port 11 pin 0 247 IOPORT_PORT_11_PIN_01 = 0x0B01, ///< IO port 11 pin 1 248 IOPORT_PORT_11_PIN_02 = 0x0B02, ///< IO port 11 pin 2 249 IOPORT_PORT_11_PIN_03 = 0x0B03, ///< IO port 11 pin 3 250 IOPORT_PORT_11_PIN_04 = 0x0B04, ///< IO port 11 pin 4 251 IOPORT_PORT_11_PIN_05 = 0x0B05, ///< IO port 11 pin 5 252 IOPORT_PORT_11_PIN_06 = 0x0B06, ///< IO port 11 pin 6 253 IOPORT_PORT_11_PIN_07 = 0x0B07, ///< IO port 11 pin 7 254 IOPORT_PORT_11_PIN_08 = 0x0B08, ///< IO port 11 pin 8 255 IOPORT_PORT_11_PIN_09 = 0x0B09, ///< IO port 11 pin 9 256 IOPORT_PORT_11_PIN_10 = 0x0B0A, ///< IO port 11 pin 10 257 IOPORT_PORT_11_PIN_11 = 0x0B0B, ///< IO port 11 pin 11 258 IOPORT_PORT_11_PIN_12 = 0x0B0C, ///< IO port 11 pin 12 259 IOPORT_PORT_11_PIN_13 = 0x0B0D, ///< IO port 11 pin 13 260 IOPORT_PORT_11_PIN_14 = 0x0B0E, ///< IO port 11 pin 14 261 IOPORT_PORT_11_PIN_15 = 0x0B0F, ///< IO port 11 pin 15 262 263 IOPORT_PORT_12_PIN_00 = 0x0C00, ///< IO port 12 pin 0 264 IOPORT_PORT_12_PIN_01 = 0x0C01, ///< IO port 12 pin 1 265 IOPORT_PORT_12_PIN_02 = 0x0C02, ///< IO port 12 pin 2 266 IOPORT_PORT_12_PIN_03 = 0x0C03, ///< IO port 12 pin 3 267 IOPORT_PORT_12_PIN_04 = 0x0C04, ///< IO port 12 pin 4 268 IOPORT_PORT_12_PIN_05 = 0x0C05, ///< IO port 12 pin 5 269 IOPORT_PORT_12_PIN_06 = 0x0C06, ///< IO port 12 pin 6 270 IOPORT_PORT_12_PIN_07 = 0x0C07, ///< IO port 12 pin 7 271 IOPORT_PORT_12_PIN_08 = 0x0C08, ///< IO port 12 pin 8 272 IOPORT_PORT_12_PIN_09 = 0x0C09, ///< IO port 12 pin 9 273 IOPORT_PORT_12_PIN_10 = 0x0C0A, ///< IO port 12 pin 10 274 IOPORT_PORT_12_PIN_11 = 0x0C0B, ///< IO port 12 pin 11 275 IOPORT_PORT_12_PIN_12 = 0x0C0C, ///< IO port 12 pin 12 276 IOPORT_PORT_12_PIN_13 = 0x0C0D, ///< IO port 12 pin 13 277 IOPORT_PORT_12_PIN_14 = 0x0C0E, ///< IO port 12 pin 14 278 IOPORT_PORT_12_PIN_15 = 0x0C0F, ///< IO port 12 pin 15 279 280 IOPORT_PORT_13_PIN_00 = 0x0D00, ///< IO port 13 pin 0 281 IOPORT_PORT_13_PIN_01 = 0x0D01, ///< IO port 13 pin 1 282 IOPORT_PORT_13_PIN_02 = 0x0D02, ///< IO port 13 pin 2 283 IOPORT_PORT_13_PIN_03 = 0x0D03, ///< IO port 13 pin 3 284 IOPORT_PORT_13_PIN_04 = 0x0D04, ///< IO port 13 pin 4 285 IOPORT_PORT_13_PIN_05 = 0x0D05, ///< IO port 13 pin 5 286 IOPORT_PORT_13_PIN_06 = 0x0D06, ///< IO port 13 pin 6 287 IOPORT_PORT_13_PIN_07 = 0x0D07, ///< IO port 13 pin 7 288 IOPORT_PORT_13_PIN_08 = 0x0D08, ///< IO port 13 pin 8 289 IOPORT_PORT_13_PIN_09 = 0x0D09, ///< IO port 13 pin 9 290 IOPORT_PORT_13_PIN_10 = 0x0D0A, ///< IO port 13 pin 10 291 IOPORT_PORT_13_PIN_11 = 0x0D0B, ///< IO port 13 pin 11 292 IOPORT_PORT_13_PIN_12 = 0x0D0C, ///< IO port 13 pin 12 293 IOPORT_PORT_13_PIN_13 = 0x0D0D, ///< IO port 13 pin 13 294 IOPORT_PORT_13_PIN_14 = 0x0D0E, ///< IO port 13 pin 14 295 IOPORT_PORT_13_PIN_15 = 0x0D0F, ///< IO port 13 pin 15 296 297 IOPORT_PORT_14_PIN_00 = 0x0E00, ///< IO port 14 pin 0 298 IOPORT_PORT_14_PIN_01 = 0x0E01, ///< IO port 14 pin 1 299 IOPORT_PORT_14_PIN_02 = 0x0E02, ///< IO port 14 pin 2 300 IOPORT_PORT_14_PIN_03 = 0x0E03, ///< IO port 14 pin 3 301 IOPORT_PORT_14_PIN_04 = 0x0E04, ///< IO port 14 pin 4 302 IOPORT_PORT_14_PIN_05 = 0x0E05, ///< IO port 14 pin 5 303 IOPORT_PORT_14_PIN_06 = 0x0E06, ///< IO port 14 pin 6 304 IOPORT_PORT_14_PIN_07 = 0x0E07, ///< IO port 14 pin 7 305 IOPORT_PORT_14_PIN_08 = 0x0E08, ///< IO port 14 pin 8 306 IOPORT_PORT_14_PIN_09 = 0x0E09, ///< IO port 14 pin 9 307 IOPORT_PORT_14_PIN_10 = 0x0E0A, ///< IO port 14 pin 10 308 IOPORT_PORT_14_PIN_11 = 0x0E0B, ///< IO port 14 pin 11 309 IOPORT_PORT_14_PIN_12 = 0x0E0C, ///< IO port 14 pin 12 310 IOPORT_PORT_14_PIN_13 = 0x0E0D, ///< IO port 14 pin 13 311 IOPORT_PORT_14_PIN_14 = 0x0E0E, ///< IO port 14 pin 14 312 IOPORT_PORT_14_PIN_15 = 0x0E0F, ///< IO port 14 pin 15 313 } ioport_port_pin_t; 314 315 /********************************************************************************************************************** 316 * Exported global variables 317 **********************************************************************************************************************/ 318 319 /** @cond INC_HEADER_DEFS_SEC */ 320 /** Filled in Interface API structure for this Instance. */ 321 extern const ioport_api_t g_ioport_on_ioport; 322 323 /** @endcond */ 324 325 /*********************************************************************************************************************** 326 * Public APIs 327 **********************************************************************************************************************/ 328 329 fsp_err_t R_IOPORT_Open(ioport_ctrl_t * const p_ctrl, const ioport_cfg_t * p_cfg); 330 fsp_err_t R_IOPORT_Close(ioport_ctrl_t * const p_ctrl); 331 fsp_err_t R_IOPORT_PinsCfg(ioport_ctrl_t * const p_ctrl, const ioport_cfg_t * p_cfg); 332 fsp_err_t R_IOPORT_PinCfg(ioport_ctrl_t * const p_ctrl, bsp_io_port_pin_t pin, uint32_t cfg); 333 fsp_err_t R_IOPORT_PinEventInputRead(ioport_ctrl_t * const p_ctrl, bsp_io_port_pin_t pin, bsp_io_level_t * p_pin_event); 334 fsp_err_t R_IOPORT_PinEventOutputWrite(ioport_ctrl_t * const p_ctrl, bsp_io_port_pin_t pin, bsp_io_level_t pin_value); 335 fsp_err_t R_IOPORT_PinRead(ioport_ctrl_t * const p_ctrl, bsp_io_port_pin_t pin, bsp_io_level_t * p_pin_value); 336 fsp_err_t R_IOPORT_PinWrite(ioport_ctrl_t * const p_ctrl, bsp_io_port_pin_t pin, bsp_io_level_t level); 337 fsp_err_t R_IOPORT_PortDirectionSet(ioport_ctrl_t * const p_ctrl, 338 bsp_io_port_t port, 339 ioport_size_t direction_values, 340 ioport_size_t mask); 341 fsp_err_t R_IOPORT_PortEventInputRead(ioport_ctrl_t * const p_ctrl, bsp_io_port_t port, ioport_size_t * event_data); 342 fsp_err_t R_IOPORT_PortEventOutputWrite(ioport_ctrl_t * const p_ctrl, 343 bsp_io_port_t port, 344 ioport_size_t event_data, 345 ioport_size_t mask_value); 346 fsp_err_t R_IOPORT_PortRead(ioport_ctrl_t * const p_ctrl, bsp_io_port_t port, ioport_size_t * p_port_value); 347 fsp_err_t R_IOPORT_PortWrite(ioport_ctrl_t * const p_ctrl, bsp_io_port_t port, ioport_size_t value, ioport_size_t mask); 348 fsp_err_t R_IOPORT_EthernetModeCfg(ioport_ctrl_t * const p_ctrl, 349 ioport_ethernet_channel_t channel, 350 ioport_ethernet_mode_t mode); 351 352 /*******************************************************************************************************************//** 353 * @} (end defgroup IOPORT) 354 **********************************************************************************************************************/ 355 356 /* Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */ 357 FSP_FOOTER 358 359 #endif // R_IOPORT_H 360