@@ -190,294 +190,27 @@ typedef union {
190
190
uint32_t val ;
191
191
} rtc_i2c_data_reg_t ;
192
192
193
- /** Type of i2c_cmd0 register
194
- * i2c commond0 register
193
+ /** Type of i2c_cmd register
194
+ * i2c command register
195
195
*/
196
196
typedef union {
197
197
struct {
198
- /** i2c_command0 : R/W; bitpos: [13:0]; default: 2307;
199
- * command0
200
- */
201
- uint32_t i2c_command0 :14 ;
202
- uint32_t reserved_14 :17 ;
203
- /** i2c_command0_done : RO; bitpos: [31]; default: 0;
198
+ /** i2c_command : R/W; bitpos: [13:0]; default: 2307;
199
+ * command
200
+ */
201
+ uint32_t i2c_byte_num :8 ;
202
+ uint32_t i2c_ack_en :1 ;
203
+ uint32_t i2c_ack_exp :1 ;
204
+ uint32_t i2c_ack_val :1 ;
205
+ uint32_t i2c_op_code :3 ;
206
+ uint32_t reserved14 :17 ;
207
+ /** i2c_command_done : RO; bitpos: [31]; default: 0;
204
208
* command0_done
205
209
*/
206
- uint32_t i2c_command0_done :1 ;
207
- };
208
- uint32_t val ;
209
- } rtc_i2c_cmd0_reg_t ;
210
-
211
- /** Type of i2c_cmd1 register
212
- * i2c commond1 register
213
- */
214
- typedef union {
215
- struct {
216
- /** i2c_command1 : R/W; bitpos: [13:0]; default: 6401;
217
- * command1
218
- */
219
- uint32_t i2c_command1 :14 ;
220
- uint32_t reserved_14 :17 ;
221
- /** i2c_command1_done : RO; bitpos: [31]; default: 0;
222
- * command1_done
223
- */
224
- uint32_t i2c_command1_done :1 ;
225
- };
226
- uint32_t val ;
227
- } rtc_i2c_cmd1_reg_t ;
228
-
229
- /** Type of i2c_cmd2 register
230
- * i2c commond2 register
231
- */
232
- typedef union {
233
- struct {
234
- /** i2c_command2 : R/W; bitpos: [13:0]; default: 2306;
235
- * command2
236
- */
237
- uint32_t i2c_command2 :14 ;
238
- uint32_t reserved_14 :17 ;
239
- /** i2c_command2_done : RO; bitpos: [31]; default: 0;
240
- * command2_done
241
- */
242
- uint32_t i2c_command2_done :1 ;
243
- };
244
- uint32_t val ;
245
- } rtc_i2c_cmd2_reg_t ;
246
-
247
- /** Type of i2c_cmd3 register
248
- * i2c commond3 register
249
- */
250
- typedef union {
251
- struct {
252
- /** i2c_command3 : R/W; bitpos: [13:0]; default: 257;
253
- * command3
254
- */
255
- uint32_t i2c_command3 :14 ;
256
- uint32_t reserved_14 :17 ;
257
- /** i2c_command3_done : RO; bitpos: [31]; default: 0;
258
- * command3_done
259
- */
260
- uint32_t i2c_command3_done :1 ;
261
- };
262
- uint32_t val ;
263
- } rtc_i2c_cmd3_reg_t ;
264
-
265
- /** Type of i2c_cmd4 register
266
- * i2c commond4 register
267
- */
268
- typedef union {
269
- struct {
270
- /** i2c_command4 : R/W; bitpos: [13:0]; default: 2305;
271
- * command4
272
- */
273
- uint32_t i2c_command4 :14 ;
274
- uint32_t reserved_14 :17 ;
275
- /** i2c_command4_done : RO; bitpos: [31]; default: 0;
276
- * command4_done
277
- */
278
- uint32_t i2c_command4_done :1 ;
279
- };
280
- uint32_t val ;
281
- } rtc_i2c_cmd4_reg_t ;
282
-
283
- /** Type of i2c_cmd5 register
284
- * i2c commond5_register
285
- */
286
- typedef union {
287
- struct {
288
- /** i2c_command5 : R/W; bitpos: [13:0]; default: 5889;
289
- * command5
290
- */
291
- uint32_t i2c_command5 :14 ;
292
- uint32_t reserved_14 :17 ;
293
- /** i2c_command5_done : RO; bitpos: [31]; default: 0;
294
- * command5_done
295
- */
296
- uint32_t i2c_command5_done :1 ;
297
- };
298
- uint32_t val ;
299
- } rtc_i2c_cmd5_reg_t ;
300
-
301
- /** Type of i2c_cmd6 register
302
- * i2c commond6 register
303
- */
304
- typedef union {
305
- struct {
306
- /** i2c_command6 : R/W; bitpos: [13:0]; default: 6401;
307
- * command6
308
- */
309
- uint32_t i2c_command6 :14 ;
310
- uint32_t reserved_14 :17 ;
311
- /** i2c_command6_done : RO; bitpos: [31]; default: 0;
312
- * command6_done
313
- */
314
- uint32_t i2c_command6_done :1 ;
315
- };
316
- uint32_t val ;
317
- } rtc_i2c_cmd6_reg_t ;
318
-
319
- /** Type of i2c_cmd7 register
320
- * i2c commond7 register
321
- */
322
- typedef union {
323
- struct {
324
- /** i2c_command7 : R/W; bitpos: [13:0]; default: 2308;
325
- * command7
326
- */
327
- uint32_t i2c_command7 :14 ;
328
- uint32_t reserved_14 :17 ;
329
- /** i2c_command7_done : RO; bitpos: [31]; default: 0;
330
- * command7_done
331
- */
332
- uint32_t i2c_command7_done :1 ;
333
- };
334
- uint32_t val ;
335
- } rtc_i2c_cmd7_reg_t ;
336
-
337
- /** Type of i2c_cmd8 register
338
- * i2c commond8 register
339
- */
340
- typedef union {
341
- struct {
342
- /** i2c_command8 : R/W; bitpos: [13:0]; default: 6401;
343
- * command8
344
- */
345
- uint32_t i2c_command8 :14 ;
346
- uint32_t reserved_14 :17 ;
347
- /** i2c_command8_done : RO; bitpos: [31]; default: 0;
348
- * command8_done
349
- */
350
- uint32_t i2c_command8_done :1 ;
351
- };
352
- uint32_t val ;
353
- } rtc_i2c_cmd8_reg_t ;
354
-
355
- /** Type of i2c_cmd9 register
356
- * i2c commond9 register
357
- */
358
- typedef union {
359
- struct {
360
- /** i2c_command9 : R/W; bitpos: [13:0]; default: 2307;
361
- * command9
362
- */
363
- uint32_t i2c_command9 :14 ;
364
- uint32_t reserved_14 :17 ;
365
- /** i2c_command9_done : RO; bitpos: [31]; default: 0;
366
- * command9_done
367
- */
368
- uint32_t i2c_command9_done :1 ;
210
+ uint32_t i2c_command_done :1 ;
369
211
};
370
212
uint32_t val ;
371
- } rtc_i2c_cmd9_reg_t ;
372
-
373
- /** Type of i2c_cmd10 register
374
- * i2c commond10 register
375
- */
376
- typedef union {
377
- struct {
378
- /** i2c_command10 : R/W; bitpos: [13:0]; default: 257;
379
- * command10
380
- */
381
- uint32_t i2c_command10 :14 ;
382
- uint32_t reserved_14 :17 ;
383
- /** i2c_command10_done : RO; bitpos: [31]; default: 0;
384
- * command10_done
385
- */
386
- uint32_t i2c_command10_done :1 ;
387
- };
388
- uint32_t val ;
389
- } rtc_i2c_cmd10_reg_t ;
390
-
391
- /** Type of i2c_cmd11 register
392
- * i2c commond11 register
393
- */
394
- typedef union {
395
- struct {
396
- /** i2c_command11 : R/W; bitpos: [13:0]; default: 2305;
397
- * command11
398
- */
399
- uint32_t i2c_command11 :14 ;
400
- uint32_t reserved_14 :17 ;
401
- /** i2c_command11_done : RO; bitpos: [31]; default: 0;
402
- * command11_done
403
- */
404
- uint32_t i2c_command11_done :1 ;
405
- };
406
- uint32_t val ;
407
- } rtc_i2c_cmd11_reg_t ;
408
-
409
- /** Type of i2c_cmd12 register
410
- * i2c commond12 register
411
- */
412
- typedef union {
413
- struct {
414
- /** i2c_command12 : R/W; bitpos: [13:0]; default: 5889;
415
- * command12
416
- */
417
- uint32_t i2c_command12 :14 ;
418
- uint32_t reserved_14 :17 ;
419
- /** i2c_command12_done : RO; bitpos: [31]; default: 0;
420
- * command12_done
421
- */
422
- uint32_t i2c_command12_done :1 ;
423
- };
424
- uint32_t val ;
425
- } rtc_i2c_cmd12_reg_t ;
426
-
427
- /** Type of i2c_cmd13 register
428
- * i2c commond13 register
429
- */
430
- typedef union {
431
- struct {
432
- /** i2c_command13 : R/W; bitpos: [13:0]; default: 6401;
433
- * command13
434
- */
435
- uint32_t i2c_command13 :14 ;
436
- uint32_t reserved_14 :17 ;
437
- /** i2c_command13_done : RO; bitpos: [31]; default: 0;
438
- * command13_done
439
- */
440
- uint32_t i2c_command13_done :1 ;
441
- };
442
- uint32_t val ;
443
- } rtc_i2c_cmd13_reg_t ;
444
-
445
- /** Type of i2c_cmd14 register
446
- * i2c commond14 register
447
- */
448
- typedef union {
449
- struct {
450
- /** i2c_command14 : R/W; bitpos: [13:0]; default: 0;
451
- * command14
452
- */
453
- uint32_t i2c_command14 :14 ;
454
- uint32_t reserved_14 :17 ;
455
- /** i2c_command14_done : RO; bitpos: [31]; default: 0;
456
- * command14_done
457
- */
458
- uint32_t i2c_command14_done :1 ;
459
- };
460
- uint32_t val ;
461
- } rtc_i2c_cmd14_reg_t ;
462
-
463
- /** Type of i2c_cmd15 register
464
- * i2c commond15 register
465
- */
466
- typedef union {
467
- struct {
468
- /** i2c_command15 : R/W; bitpos: [13:0]; default: 0;
469
- * command15
470
- */
471
- uint32_t i2c_command15 :14 ;
472
- uint32_t reserved_14 :17 ;
473
- /** i2c_command15_done : RO; bitpos: [31]; default: 0;
474
- * command15_done
475
- */
476
- uint32_t i2c_command15_done :1 ;
477
- };
478
- uint32_t val ;
479
- } rtc_i2c_cmd15_reg_t ;
480
-
213
+ } rtc_i2c_cmd_reg_t ;
481
214
482
215
/** Group: status register */
483
216
/** Type of i2c_status register
@@ -750,29 +483,15 @@ typedef struct {
750
483
volatile rtc_i2c_int_st_reg_t i2c_int_st ;
751
484
volatile rtc_i2c_int_ena_reg_t i2c_int_ena ;
752
485
volatile rtc_i2c_data_reg_t i2c_data ;
753
- volatile rtc_i2c_cmd0_reg_t i2c_cmd0 ;
754
- volatile rtc_i2c_cmd1_reg_t i2c_cmd1 ;
755
- volatile rtc_i2c_cmd2_reg_t i2c_cmd2 ;
756
- volatile rtc_i2c_cmd3_reg_t i2c_cmd3 ;
757
- volatile rtc_i2c_cmd4_reg_t i2c_cmd4 ;
758
- volatile rtc_i2c_cmd5_reg_t i2c_cmd5 ;
759
- volatile rtc_i2c_cmd6_reg_t i2c_cmd6 ;
760
- volatile rtc_i2c_cmd7_reg_t i2c_cmd7 ;
761
- volatile rtc_i2c_cmd8_reg_t i2c_cmd8 ;
762
- volatile rtc_i2c_cmd9_reg_t i2c_cmd9 ;
763
- volatile rtc_i2c_cmd10_reg_t i2c_cmd10 ;
764
- volatile rtc_i2c_cmd11_reg_t i2c_cmd11 ;
765
- volatile rtc_i2c_cmd12_reg_t i2c_cmd12 ;
766
- volatile rtc_i2c_cmd13_reg_t i2c_cmd13 ;
767
- volatile rtc_i2c_cmd14_reg_t i2c_cmd14 ;
768
- volatile rtc_i2c_cmd15_reg_t i2c_cmd15 ;
486
+ volatile rtc_i2c_cmd_reg_t i2c_cmd [16 ];
769
487
uint32_t reserved_078 [33 ];
770
488
volatile rtc_i2c_date_reg_t i2c_date ;
771
- } rtc_dev_t ;
489
+ } rtc_i2c_dev_t ;
490
+ extern rtc_i2c_dev_t RTC_I2C ;
772
491
773
492
774
493
#ifndef __cplusplus
775
- _Static_assert (sizeof (rtc_dev_t ) == 0x100 , "Invalid size of rtc_dev_t structure" );
494
+ _Static_assert (sizeof (rtc_i2c_dev_t ) == 0x100 , "Invalid size of rtc_i2c_dev_t structure" );
776
495
#endif
777
496
778
497
#ifdef __cplusplus
0 commit comments