1 /*
2 * Copyright (c) 2020 - 2024 Renesas Electronics Corporation and/or its affiliates
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6 
7 /**********************************************************************************************************************
8  * File Name    : riic_iodefine.h
9  * Version      : 1.00
10  * Description  : IO define file for riic.
11  *********************************************************************************************************************/
12 
13 /* ================================================================================================================= */
14 /* ================                              Device Specific Cluster Section                              ====== */
15 /* ================================================================================================================= */
16 
17 /* ================================================================================================================= */
18 /* ================                            Device Specific Peripheral Section                             ====== */
19 /* ================================================================================================================= */
20 
21 #ifndef RIIC_IODEFINE_H
22 #define RIIC_IODEFINE_H
23 
24 typedef struct
25 {
26     union
27     {
28         __IOM uint8_t ICCR1;
29         struct
30         {
31             __IM uint8_t  SDAI   : 1;
32             __IM uint8_t  SCLI   : 1;
33             __IOM uint8_t SDAO   : 1;
34             __IOM uint8_t SCLO   : 1;
35             __IOM uint8_t SOWP   : 1;
36             __IOM uint8_t CLO    : 1;
37             __IOM uint8_t IICRST : 1;
38             __IOM uint8_t ICE    : 1;
39         } ICCR1_b;
40     };
41     union
42     {
43         __IOM uint8_t ICCR2;
44         struct
45         {
46             uint8_t           : 1;
47             __IOM uint8_t ST  : 1;
48             __IOM uint8_t RS  : 1;
49             __IOM uint8_t SP  : 1;
50             uint8_t           : 1;
51             __IM uint8_t TRS  : 1;
52             __IM uint8_t MST  : 1;
53             __IM uint8_t BBSY : 1;
54         } ICCR2_b;
55     };
56     union
57     {
58         __IOM uint8_t ICMR1;
59         struct
60         {
61             __IOM uint8_t BC   : 3;
62             __IOM uint8_t BCWP : 1;
63             __IOM uint8_t CKS  : 3;
64             uint8_t            : 1;
65         } ICMR1_b;
66     };
67     union
68     {
69         __IOM uint8_t ICMR2;
70         struct
71         {
72             __IOM uint8_t TMOS : 1;
73             __IOM uint8_t TMOL : 1;
74             __IOM uint8_t TMOH : 1;
75             uint8_t            : 1;
76             __IOM uint8_t SDDL : 3;
77             __IOM uint8_t DLCS : 1;
78         } ICMR2_b;
79     };
80     union
81     {
82         __IOM uint8_t ICMR3;
83         struct
84         {
85             __IOM uint8_t NF    : 2;
86             __IM uint8_t  ACKBR : 1;
87             __IOM uint8_t ACKBT : 1;
88             __OM uint8_t  ACKWP : 1;
89             __IOM uint8_t RDRFS : 1;
90             __IOM uint8_t WAIT  : 1;
91             __IOM uint8_t SMBE  : 1;
92         } ICMR3_b;
93     };
94     union
95     {
96         __IOM uint8_t ICFER;
97         struct
98         {
99             __IOM uint8_t TMOE  : 1;
100             __IOM uint8_t MALE  : 1;
101             __IOM uint8_t NALE  : 1;
102             __IOM uint8_t SALE  : 1;
103             __IOM uint8_t NACKE : 1;
104             __IOM uint8_t NFE   : 1;
105             __IOM uint8_t SCLE  : 1;
106             __IOM uint8_t FMPE  : 1;
107         } ICFER_b;
108     };
109     union
110     {
111         __IOM uint8_t ICSER;
112         struct
113         {
114             __IOM uint8_t SAR0 : 1;
115             __IOM uint8_t SAR1 : 1;
116             __IOM uint8_t SAR2 : 1;
117             __IOM uint8_t GCE  : 1;
118             uint8_t            : 1;
119             __IOM uint8_t DIDE : 1;
120             uint8_t            : 1;
121             __IOM uint8_t HOAE : 1;
122         } ICSER_b;
123     };
124     union
125     {
126         __IOM uint8_t ICIER;
127         struct
128         {
129             __IOM uint8_t TMOIE : 1;
130             __IOM uint8_t ALIE  : 1;
131             __IOM uint8_t STIE  : 1;
132             __IOM uint8_t SPIE  : 1;
133             __IOM uint8_t NAKIE : 1;
134             __IOM uint8_t RIE   : 1;
135             __IOM uint8_t TEIE  : 1;
136             __IOM uint8_t TIE   : 1;
137         } ICIER_b;
138     };
139     union
140     {
141         __IOM uint8_t ICSR1;
142         struct
143         {
144             __IOM uint8_t AAS0 : 1;
145             __IOM uint8_t AAS1 : 1;
146             __IOM uint8_t AAS2 : 1;
147             __IOM uint8_t GCA  : 1;
148             uint8_t            : 1;
149             __IOM uint8_t DID  : 1;
150             uint8_t            : 1;
151             __IOM uint8_t HOA  : 1;
152         } ICSR1_b;
153     };
154     union
155     {
156         __IOM uint8_t ICSR2;
157         struct
158         {
159             __IOM uint8_t TMOF  : 1;
160             __IOM uint8_t AL    : 1;
161             __IOM uint8_t START : 1;
162             __IOM uint8_t STOP  : 1;
163             __IOM uint8_t NACKF : 1;
164             __IOM uint8_t RDRF  : 1;
165             __IOM uint8_t TEND  : 1;
166             __IM uint8_t  TDRE  : 1;
167         } ICSR2_b;
168     };
169     union
170     {
171         __IOM uint8_t ICSAR0;
172         struct
173         {
174             __IOM uint8_t SVA0 : 1;
175             __IOM uint8_t SVA  : 7;
176         } ICSAR0_b;
177     };
178     union
179     {
180         __IOM uint8_t ICSARU0;
181         struct
182         {
183             __IOM uint8_t FS  : 1;
184             __IOM uint8_t SVA : 2;
185             uint8_t           : 5;
186         } ICSARU0_b;
187     };
188     union
189     {
190         __IOM uint8_t ICSAR1;
191         struct
192         {
193             __IOM uint8_t SVA0 : 1;
194             __IOM uint8_t SVA  : 7;
195         } ICSAR1_b;
196     };
197     union
198     {
199         __IOM uint8_t ICSARU1;
200         struct
201         {
202             __IOM uint8_t FS  : 1;
203             __IOM uint8_t SVA : 2;
204             uint8_t           : 5;
205         } ICSARU1_b;
206     };
207     union
208     {
209         __IOM uint8_t ICSAR2;
210         struct
211         {
212             __IOM uint8_t SVA0 : 1;
213             __IOM uint8_t SVA  : 7;
214         } ICSAR2_b;
215     };
216     union
217     {
218         __IOM uint8_t ICSARU2;
219         struct
220         {
221             __IOM uint8_t FS  : 1;
222             __IOM uint8_t SVA : 2;
223             uint8_t           : 5;
224         } ICSARU2_b;
225     };
226     union
227     {
228         __IOM uint8_t ICBRL;
229         struct
230         {
231             __IOM uint8_t BRL : 5;
232             uint8_t           : 3;
233         } ICBRL_b;
234     };
235     union
236     {
237         __IOM uint8_t ICBRH;
238         struct
239         {
240             __IOM uint8_t BRH : 5;
241             uint8_t           : 3;
242         } ICBRH_b;
243     };
244     union
245     {
246         __IOM uint8_t ICDRT;
247         struct
248         {
249             __IOM uint8_t DRT : 8;
250         } ICDRT_b;
251     };
252     union
253     {
254         __IM uint8_t ICDRR;
255         struct
256         {
257             __IM uint8_t DRR : 8;
258         } ICDRR_b;
259     };
260 } R_RIIC0_Type;
261 
262 /* =========================================================================================================================== */
263 /* ================                          Device Specific Peripheral Address Map                           ================ */
264 /* =========================================================================================================================== */
265 
266 #define R_RIIC0_BASE    0x40090000
267 #define R_RIIC1_BASE    0x40090400
268 #define R_RIIC2_BASE    0x40090800
269 #define R_RIIC3_BASE    0x40090C00
270 
271 /* =========================================================================================================================== */
272 /* ================                                  Peripheral declaration                                   ================ */
273 /* =========================================================================================================================== */
274 
275 #define R_RIIC0    ((R_RIIC0_Type *) R_RIIC0_BASE)
276 #define R_RIIC1    ((R_RIIC0_Type *) R_RIIC1_BASE)
277 #define R_RIIC2    ((R_RIIC0_Type *) R_RIIC2_BASE)
278 #define R_RIIC3    ((R_RIIC0_Type *) R_RIIC3_BASE)
279 
280 #endif                                 /* RIIC_IODEFINE_H */
281