r_ioport.h 21 KB

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