-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhw_i2c.h
728 lines (666 loc) · 30.4 KB
/
hw_i2c.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
/******************************************************************************
* Filename: hw_i2c_h
* Revised: 2017-01-31 09:37:48 +0100 (Tue, 31 Jan 2017)
* Revision: 48345
*
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1) Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2) Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3) Neither the name of the ORGANIZATION nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#ifndef __HW_I2C_H__
#define __HW_I2C_H__
//*****************************************************************************
//
// This section defines the register offsets of
// I2C component
//
//*****************************************************************************
// Slave Own Address
#define I2C_O_SOAR 0x00000000
// Slave Status
#define I2C_O_SSTAT 0x00000004
// Slave Control
#define I2C_O_SCTL 0x00000004
// Slave Data
#define I2C_O_SDR 0x00000008
// Slave Interrupt Mask
#define I2C_O_SIMR 0x0000000C
// Slave Raw Interrupt Status
#define I2C_O_SRIS 0x00000010
// Slave Masked Interrupt Status
#define I2C_O_SMIS 0x00000014
// Slave Interrupt Clear
#define I2C_O_SICR 0x00000018
// Master Salve Address
#define I2C_O_MSA 0x00000800
// Master Status
#define I2C_O_MSTAT 0x00000804
// Master Control
#define I2C_O_MCTRL 0x00000804
// Master Data
#define I2C_O_MDR 0x00000808
// I2C Master Timer Period
#define I2C_O_MTPR 0x0000080C
// Master Interrupt Mask
#define I2C_O_MIMR 0x00000810
// Master Raw Interrupt Status
#define I2C_O_MRIS 0x00000814
// Master Masked Interrupt Status
#define I2C_O_MMIS 0x00000818
// Master Interrupt Clear
#define I2C_O_MICR 0x0000081C
// Master Configuration
#define I2C_O_MCR 0x00000820
//*****************************************************************************
//
// Register: I2C_O_SOAR
//
//*****************************************************************************
// Field: [6:0] OAR
//
// I2C slave own address
// This field specifies bits a6 through a0 of the slave address.
#define I2C_SOAR_OAR_W 7
#define I2C_SOAR_OAR_M 0x0000007F
#define I2C_SOAR_OAR_S 0
//*****************************************************************************
//
// Register: I2C_O_SSTAT
//
//*****************************************************************************
// Field: [2] FBR
//
// First byte received
//
// 0: The first byte has not been received.
// 1: The first byte following the slave's own address has been received.
//
// This bit is only valid when the RREQ bit is set and is automatically cleared
// when data has been read from the SDR register.
// Note: This bit is not used for slave transmit operations.
#define I2C_SSTAT_FBR 0x00000004
#define I2C_SSTAT_FBR_BITN 2
#define I2C_SSTAT_FBR_M 0x00000004
#define I2C_SSTAT_FBR_S 2
// Field: [1] TREQ
//
// Transmit request
//
// 0: No outstanding transmit request.
// 1: The I2C controller has been addressed as a slave transmitter and is using
// clock stretching to delay the master until data has been written to the SDR
// register.
#define I2C_SSTAT_TREQ 0x00000002
#define I2C_SSTAT_TREQ_BITN 1
#define I2C_SSTAT_TREQ_M 0x00000002
#define I2C_SSTAT_TREQ_S 1
// Field: [0] RREQ
//
// Receive request
//
// 0: No outstanding receive data
// 1: The I2C controller has outstanding receive data from the I2C master and
// is using clock stretching to delay the master until data has been read from
// the SDR register.
#define I2C_SSTAT_RREQ 0x00000001
#define I2C_SSTAT_RREQ_BITN 0
#define I2C_SSTAT_RREQ_M 0x00000001
#define I2C_SSTAT_RREQ_S 0
//*****************************************************************************
//
// Register: I2C_O_SCTL
//
//*****************************************************************************
// Field: [0] DA
//
// Device active
//
// 0: Disables the I2C slave operation
// 1: Enables the I2C slave operation
#define I2C_SCTL_DA 0x00000001
#define I2C_SCTL_DA_BITN 0
#define I2C_SCTL_DA_M 0x00000001
#define I2C_SCTL_DA_S 0
//*****************************************************************************
//
// Register: I2C_O_SDR
//
//*****************************************************************************
// Field: [7:0] DATA
//
// Data for transfer
// This field contains the data for transfer during a slave receive or transmit
// operation. When written the register data is used as transmit data. When
// read, this register returns the last data received.
// Data is stored until next update, either by a system write for transmit or
// by an external master for receive.
#define I2C_SDR_DATA_W 8
#define I2C_SDR_DATA_M 0x000000FF
#define I2C_SDR_DATA_S 0
//*****************************************************************************
//
// Register: I2C_O_SIMR
//
//*****************************************************************************
// Field: [2] STOPIM
//
// Stop condition interrupt mask
//
// 0: The SRIS.STOPRIS interrupt is suppressed and not sent to the interrupt
// controller.
// 1: The SRIS.STOPRIS interrupt is enabled and sent to the interrupt
// controller.
// ENUMs:
// EN Enable Interrupt
// DIS Disable Interrupt
#define I2C_SIMR_STOPIM 0x00000004
#define I2C_SIMR_STOPIM_BITN 2
#define I2C_SIMR_STOPIM_M 0x00000004
#define I2C_SIMR_STOPIM_S 2
#define I2C_SIMR_STOPIM_EN 0x00000004
#define I2C_SIMR_STOPIM_DIS 0x00000000
// Field: [1] STARTIM
//
// Start condition interrupt mask
//
// 0: The SRIS.STARTRIS interrupt is suppressed and not sent to the interrupt
// controller.
// 1: The SRIS.STARTRIS interrupt is enabled and sent to the interrupt
// controller.
// ENUMs:
// EN Enable Interrupt
// DIS Disable Interrupt
#define I2C_SIMR_STARTIM 0x00000002
#define I2C_SIMR_STARTIM_BITN 1
#define I2C_SIMR_STARTIM_M 0x00000002
#define I2C_SIMR_STARTIM_S 1
#define I2C_SIMR_STARTIM_EN 0x00000002
#define I2C_SIMR_STARTIM_DIS 0x00000000
// Field: [0] DATAIM
//
// Data interrupt mask
//
// 0: The SRIS.DATARIS interrupt is suppressed and not sent to the interrupt
// controller.
// 1: The SRIS.DATARIS interrupt is enabled and sent to the interrupt
// controller.
#define I2C_SIMR_DATAIM 0x00000001
#define I2C_SIMR_DATAIM_BITN 0
#define I2C_SIMR_DATAIM_M 0x00000001
#define I2C_SIMR_DATAIM_S 0
//*****************************************************************************
//
// Register: I2C_O_SRIS
//
//*****************************************************************************
// Field: [2] STOPRIS
//
// Stop condition raw interrupt status
//
// 0: No interrupt
// 1: A Stop condition interrupt is pending.
//
// This bit is cleared by writing a 1 to SICR.STOPIC.
#define I2C_SRIS_STOPRIS 0x00000004
#define I2C_SRIS_STOPRIS_BITN 2
#define I2C_SRIS_STOPRIS_M 0x00000004
#define I2C_SRIS_STOPRIS_S 2
// Field: [1] STARTRIS
//
// Start condition raw interrupt status
//
// 0: No interrupt
// 1: A Start condition interrupt is pending.
//
// This bit is cleared by writing a 1 to SICR.STARTIC.
#define I2C_SRIS_STARTRIS 0x00000002
#define I2C_SRIS_STARTRIS_BITN 1
#define I2C_SRIS_STARTRIS_M 0x00000002
#define I2C_SRIS_STARTRIS_S 1
// Field: [0] DATARIS
//
// Data raw interrupt status
//
// 0: No interrupt
// 1: A data received or data requested interrupt is pending.
//
// This bit is cleared by writing a 1 to the SICR.DATAIC.
#define I2C_SRIS_DATARIS 0x00000001
#define I2C_SRIS_DATARIS_BITN 0
#define I2C_SRIS_DATARIS_M 0x00000001
#define I2C_SRIS_DATARIS_S 0
//*****************************************************************************
//
// Register: I2C_O_SMIS
//
//*****************************************************************************
// Field: [2] STOPMIS
//
// Stop condition masked interrupt status
//
// 0: An interrupt has not occurred or is masked/disabled.
// 1: An unmasked Stop condition interrupt is pending.
//
// This bit is cleared by writing a 1 to the SICR.STOPIC.
#define I2C_SMIS_STOPMIS 0x00000004
#define I2C_SMIS_STOPMIS_BITN 2
#define I2C_SMIS_STOPMIS_M 0x00000004
#define I2C_SMIS_STOPMIS_S 2
// Field: [1] STARTMIS
//
// Start condition masked interrupt status
//
// 0: An interrupt has not occurred or is masked/disabled.
// 1: An unmasked Start condition interrupt is pending.
//
// This bit is cleared by writing a 1 to the SICR.STARTIC.
#define I2C_SMIS_STARTMIS 0x00000002
#define I2C_SMIS_STARTMIS_BITN 1
#define I2C_SMIS_STARTMIS_M 0x00000002
#define I2C_SMIS_STARTMIS_S 1
// Field: [0] DATAMIS
//
// Data masked interrupt status
//
// 0: An interrupt has not occurred or is masked/disabled.
// 1: An unmasked data received or data requested interrupt is pending.
//
// This bit is cleared by writing a 1 to the SICR.DATAIC.
#define I2C_SMIS_DATAMIS 0x00000001
#define I2C_SMIS_DATAMIS_BITN 0
#define I2C_SMIS_DATAMIS_M 0x00000001
#define I2C_SMIS_DATAMIS_S 0
//*****************************************************************************
//
// Register: I2C_O_SICR
//
//*****************************************************************************
// Field: [2] STOPIC
//
// Stop condition interrupt clear
//
// Writing 1 to this bit clears SRIS.STOPRIS and SMIS.STOPMIS.
#define I2C_SICR_STOPIC 0x00000004
#define I2C_SICR_STOPIC_BITN 2
#define I2C_SICR_STOPIC_M 0x00000004
#define I2C_SICR_STOPIC_S 2
// Field: [1] STARTIC
//
// Start condition interrupt clear
//
// Writing 1 to this bit clears SRIS.STARTRIS SMIS.STARTMIS.
#define I2C_SICR_STARTIC 0x00000002
#define I2C_SICR_STARTIC_BITN 1
#define I2C_SICR_STARTIC_M 0x00000002
#define I2C_SICR_STARTIC_S 1
// Field: [0] DATAIC
//
// Data interrupt clear
//
// Writing 1 to this bit clears SRIS.DATARIS SMIS.DATAMIS.
#define I2C_SICR_DATAIC 0x00000001
#define I2C_SICR_DATAIC_BITN 0
#define I2C_SICR_DATAIC_M 0x00000001
#define I2C_SICR_DATAIC_S 0
//*****************************************************************************
//
// Register: I2C_O_MSA
//
//*****************************************************************************
// Field: [7:1] SA
//
// I2C master slave address
// Defines which slave is addressed for the transaction in master mode
#define I2C_MSA_SA_W 7
#define I2C_MSA_SA_M 0x000000FE
#define I2C_MSA_SA_S 1
// Field: [0] RS
//
// Receive or Send
// This bit-field specifies if the next operation is a receive (high) or a
// transmit/send (low) from the addressed slave SA.
// ENUMs:
// RX Receive data from slave
// TX Transmit/send data to slave
#define I2C_MSA_RS 0x00000001
#define I2C_MSA_RS_BITN 0
#define I2C_MSA_RS_M 0x00000001
#define I2C_MSA_RS_S 0
#define I2C_MSA_RS_RX 0x00000001
#define I2C_MSA_RS_TX 0x00000000
//*****************************************************************************
//
// Register: I2C_O_MSTAT
//
//*****************************************************************************
// Field: [6] BUSBSY
//
// Bus busy
//
// 0: The I2C bus is idle.
// 1: The I2C bus is busy.
//
// The bit changes based on the MCTRL.START and MCTRL.STOP conditions.
#define I2C_MSTAT_BUSBSY 0x00000040
#define I2C_MSTAT_BUSBSY_BITN 6
#define I2C_MSTAT_BUSBSY_M 0x00000040
#define I2C_MSTAT_BUSBSY_S 6
// Field: [5] IDLE
//
// I2C idle
//
// 0: The I2C controller is not idle.
// 1: The I2C controller is idle.
#define I2C_MSTAT_IDLE 0x00000020
#define I2C_MSTAT_IDLE_BITN 5
#define I2C_MSTAT_IDLE_M 0x00000020
#define I2C_MSTAT_IDLE_S 5
// Field: [4] ARBLST
//
// Arbitration lost
//
// 0: The I2C controller won arbitration.
// 1: The I2C controller lost arbitration.
#define I2C_MSTAT_ARBLST 0x00000010
#define I2C_MSTAT_ARBLST_BITN 4
#define I2C_MSTAT_ARBLST_M 0x00000010
#define I2C_MSTAT_ARBLST_S 4
// Field: [3] DATACK_N
//
// Data Was Not Acknowledge
//
// 0: The transmitted data was acknowledged.
// 1: The transmitted data was not acknowledged.
#define I2C_MSTAT_DATACK_N 0x00000008
#define I2C_MSTAT_DATACK_N_BITN 3
#define I2C_MSTAT_DATACK_N_M 0x00000008
#define I2C_MSTAT_DATACK_N_S 3
// Field: [2] ADRACK_N
//
// Address Was Not Acknowledge
//
// 0: The transmitted address was acknowledged.
// 1: The transmitted address was not acknowledged.
#define I2C_MSTAT_ADRACK_N 0x00000004
#define I2C_MSTAT_ADRACK_N_BITN 2
#define I2C_MSTAT_ADRACK_N_M 0x00000004
#define I2C_MSTAT_ADRACK_N_S 2
// Field: [1] ERR
//
// Error
//
// 0: No error was detected on the last operation.
// 1: An error occurred on the last operation.
#define I2C_MSTAT_ERR 0x00000002
#define I2C_MSTAT_ERR_BITN 1
#define I2C_MSTAT_ERR_M 0x00000002
#define I2C_MSTAT_ERR_S 1
// Field: [0] BUSY
//
// I2C busy
//
// 0: The controller is idle.
// 1: The controller is busy.
//
// When this bit-field is set, the other status bits are not valid.
//
// Note: The I2C controller requires four SYSBUS clock cycles to assert the
// BUSY status after I2C master operation has been initiated through MCTRL
// register.
// Hence after programming MCTRL register, application is requested to wait for
// four SYSBUS clock cycles before issuing a controller status inquiry through
// MSTAT register.
// Any prior inquiry would result in wrong status being reported.
#define I2C_MSTAT_BUSY 0x00000001
#define I2C_MSTAT_BUSY_BITN 0
#define I2C_MSTAT_BUSY_M 0x00000001
#define I2C_MSTAT_BUSY_S 0
//*****************************************************************************
//
// Register: I2C_O_MCTRL
//
//*****************************************************************************
// Field: [3] ACK
//
// Data acknowledge enable
//
// 0: The received data byte is not acknowledged automatically by the master.
// 1: The received data byte is acknowledged automatically by the master.
//
// This bit-field must be cleared when the I2C bus controller requires no
// further data to be transmitted from the slave transmitter.
// ENUMs:
// EN Enable acknowledge
// DIS Disable acknowledge
#define I2C_MCTRL_ACK 0x00000008
#define I2C_MCTRL_ACK_BITN 3
#define I2C_MCTRL_ACK_M 0x00000008
#define I2C_MCTRL_ACK_S 3
#define I2C_MCTRL_ACK_EN 0x00000008
#define I2C_MCTRL_ACK_DIS 0x00000000
// Field: [2] STOP
//
// This bit-field determines if the cycle stops at the end of the data cycle or
// continues on to a repeated START condition.
//
// 0: The controller does not generate the Stop condition.
// 1: The controller generates the Stop condition.
// ENUMs:
// EN Enable STOP
// DIS Disable STOP
#define I2C_MCTRL_STOP 0x00000004
#define I2C_MCTRL_STOP_BITN 2
#define I2C_MCTRL_STOP_M 0x00000004
#define I2C_MCTRL_STOP_S 2
#define I2C_MCTRL_STOP_EN 0x00000004
#define I2C_MCTRL_STOP_DIS 0x00000000
// Field: [1] START
//
// This bit-field generates the Start or Repeated Start condition.
//
// 0: The controller does not generate the Start condition.
// 1: The controller generates the Start condition.
// ENUMs:
// EN Enable START
// DIS Disable START
#define I2C_MCTRL_START 0x00000002
#define I2C_MCTRL_START_BITN 1
#define I2C_MCTRL_START_M 0x00000002
#define I2C_MCTRL_START_S 1
#define I2C_MCTRL_START_EN 0x00000002
#define I2C_MCTRL_START_DIS 0x00000000
// Field: [0] RUN
//
// I2C master enable
//
// 0: The master is disabled.
// 1: The master is enabled to transmit or receive data.
// ENUMs:
// EN Enable Master
// DIS Disable Master
#define I2C_MCTRL_RUN 0x00000001
#define I2C_MCTRL_RUN_BITN 0
#define I2C_MCTRL_RUN_M 0x00000001
#define I2C_MCTRL_RUN_S 0
#define I2C_MCTRL_RUN_EN 0x00000001
#define I2C_MCTRL_RUN_DIS 0x00000000
//*****************************************************************************
//
// Register: I2C_O_MDR
//
//*****************************************************************************
// Field: [7:0] DATA
//
// When Read: Last RX Data is returned
// When Written: Data is transferred during TX transaction
#define I2C_MDR_DATA_W 8
#define I2C_MDR_DATA_M 0x000000FF
#define I2C_MDR_DATA_S 0
//*****************************************************************************
//
// Register: I2C_O_MTPR
//
//*****************************************************************************
// Field: [7] TPR_7
//
// Must be set to 0 to set TPR. If set to 1, a write to TPR will be ignored.
#define I2C_MTPR_TPR_7 0x00000080
#define I2C_MTPR_TPR_7_BITN 7
#define I2C_MTPR_TPR_7_M 0x00000080
#define I2C_MTPR_TPR_7_S 7
// Field: [6:0] TPR
//
// SCL clock period
// This field specifies the period of the SCL clock.
// SCL_PRD = 2*(1+TPR)*(SCL_LP + SCL_HP)*CLK_PRD
// where:
// SCL_PRD is the SCL line period (I2C clock).
// TPR is the timer period register value (range of 1 to 127)
// SCL_LP is the SCL low period (fixed at 6).
// SCL_HP is the SCL high period (fixed at 4).
// CLK_PRD is the system clock period in ns.
#define I2C_MTPR_TPR_W 7
#define I2C_MTPR_TPR_M 0x0000007F
#define I2C_MTPR_TPR_S 0
//*****************************************************************************
//
// Register: I2C_O_MIMR
//
//*****************************************************************************
// Field: [0] IM
//
// Interrupt mask
//
// 0: The MRIS.RIS interrupt is suppressed and not sent to the interrupt
// controller.
// 1: The master interrupt is sent to the interrupt controller when the
// MRIS.RIS is set.
// ENUMs:
// EN Enable Interrupt
// DIS Disable Interrupt
#define I2C_MIMR_IM 0x00000001
#define I2C_MIMR_IM_BITN 0
#define I2C_MIMR_IM_M 0x00000001
#define I2C_MIMR_IM_S 0
#define I2C_MIMR_IM_EN 0x00000001
#define I2C_MIMR_IM_DIS 0x00000000
//*****************************************************************************
//
// Register: I2C_O_MRIS
//
//*****************************************************************************
// Field: [0] RIS
//
// Raw interrupt status
//
// 0: No interrupt
// 1: A master interrupt is pending.
//
// This bit is cleared by writing 1 to the MICR.IC bit .
#define I2C_MRIS_RIS 0x00000001
#define I2C_MRIS_RIS_BITN 0
#define I2C_MRIS_RIS_M 0x00000001
#define I2C_MRIS_RIS_S 0
//*****************************************************************************
//
// Register: I2C_O_MMIS
//
//*****************************************************************************
// Field: [0] MIS
//
// Masked interrupt status
//
// 0: An interrupt has not occurred or is masked.
// 1: A master interrupt is pending.
//
// This bit is cleared by writing 1 to the MICR.IC bit .
#define I2C_MMIS_MIS 0x00000001
#define I2C_MMIS_MIS_BITN 0
#define I2C_MMIS_MIS_M 0x00000001
#define I2C_MMIS_MIS_S 0
//*****************************************************************************
//
// Register: I2C_O_MICR
//
//*****************************************************************************
// Field: [0] IC
//
// Interrupt clear
// Writing 1 to this bit clears MRIS.RIS and MMIS.MIS .
//
// Reading this register returns no meaningful data.
#define I2C_MICR_IC 0x00000001
#define I2C_MICR_IC_BITN 0
#define I2C_MICR_IC_M 0x00000001
#define I2C_MICR_IC_S 0
//*****************************************************************************
//
// Register: I2C_O_MCR
//
//*****************************************************************************
// Field: [5] SFE
//
// I2C slave function enable
// ENUMs:
// EN Slave mode is enabled.
// DIS Slave mode is disabled.
#define I2C_MCR_SFE 0x00000020
#define I2C_MCR_SFE_BITN 5
#define I2C_MCR_SFE_M 0x00000020
#define I2C_MCR_SFE_S 5
#define I2C_MCR_SFE_EN 0x00000020
#define I2C_MCR_SFE_DIS 0x00000000
// Field: [4] MFE
//
// I2C master function enable
// ENUMs:
// EN Master mode is enabled.
// DIS Master mode is disabled.
#define I2C_MCR_MFE 0x00000010
#define I2C_MCR_MFE_BITN 4
#define I2C_MCR_MFE_M 0x00000010
#define I2C_MCR_MFE_S 4
#define I2C_MCR_MFE_EN 0x00000010
#define I2C_MCR_MFE_DIS 0x00000000
// Field: [0] LPBK
//
// I2C loopback
//
// 0: Normal operation
// 1: Loopback operation (test mode)
// ENUMs:
// EN Enable Test Mode
// DIS Disable Test Mode
#define I2C_MCR_LPBK 0x00000001
#define I2C_MCR_LPBK_BITN 0
#define I2C_MCR_LPBK_M 0x00000001
#define I2C_MCR_LPBK_S 0
#define I2C_MCR_LPBK_EN 0x00000001
#define I2C_MCR_LPBK_DIS 0x00000000
#endif // __I2C__