Altera SoCAL
16.0
The Altera SoC Abstraction Layer (SoCAL) API Reference Manual
Main Page
Address Space
Data Structures
Files
File List
All
Data Structures
Variables
Typedefs
Groups
alt_tmr.h
1
/***********************************************************************************
2
* *
3
* Copyright 2013-2015 Altera Corporation. All Rights Reserved. *
4
* *
5
* Redistribution and use in source and binary forms, with or without *
6
* modification, are permitted provided that the following conditions are met: *
7
* *
8
* 1. Redistributions of source code must retain the above copyright notice, *
9
* this list of conditions and the following disclaimer. *
10
* *
11
* 2. Redistributions in binary form must reproduce the above copyright notice, *
12
* this list of conditions and the following disclaimer in the documentation *
13
* and/or other materials provided with the distribution. *
14
* *
15
* 3. Neither the name of the copyright holder nor the names of its contributors *
16
* may be used to endorse or promote products derived from this software without *
17
* specific prior written permission. *
18
* *
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" *
20
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE *
21
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
22
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE *
23
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
24
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF *
25
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
26
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN *
27
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) *
28
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
29
* POSSIBILITY OF SUCH DAMAGE. *
30
* *
31
***********************************************************************************/
32
35
#ifndef __ALTERA_ALT_TMR_H__
36
#define __ALTERA_ALT_TMR_H__
37
38
#ifdef __cplusplus
39
extern
"C"
40
{
41
#endif
/* __cplusplus */
42
74
#define ALT_TMR_TMR1LDCOUNT_TMR1LDCOUNT_LSB 0
75
76
#define ALT_TMR_TMR1LDCOUNT_TMR1LDCOUNT_MSB 31
77
78
#define ALT_TMR_TMR1LDCOUNT_TMR1LDCOUNT_WIDTH 32
79
80
#define ALT_TMR_TMR1LDCOUNT_TMR1LDCOUNT_SET_MSK 0xffffffff
81
82
#define ALT_TMR_TMR1LDCOUNT_TMR1LDCOUNT_CLR_MSK 0x00000000
83
84
#define ALT_TMR_TMR1LDCOUNT_TMR1LDCOUNT_RESET 0x0
85
86
#define ALT_TMR_TMR1LDCOUNT_TMR1LDCOUNT_GET(value) (((value) & 0xffffffff) >> 0)
87
88
#define ALT_TMR_TMR1LDCOUNT_TMR1LDCOUNT_SET(value) (((value) << 0) & 0xffffffff)
89
90
#ifndef __ASSEMBLY__
91
101
struct
ALT_TMR_TMR1LDCOUNT_s
102
{
103
uint32_t
timer1loadcount
: 32;
104
};
105
107
typedef
volatile
struct
ALT_TMR_TMR1LDCOUNT_s
ALT_TMR_TMR1LDCOUNT_t
;
108
#endif
/* __ASSEMBLY__ */
109
111
#define ALT_TMR_TMR1LDCOUNT_OFST 0x0
112
113
#define ALT_TMR_TMR1LDCOUNT_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_TMR_TMR1LDCOUNT_OFST))
114
136
#define ALT_TMR_TMR1CURVAL_TMR1CURVAL_LSB 0
137
138
#define ALT_TMR_TMR1CURVAL_TMR1CURVAL_MSB 31
139
140
#define ALT_TMR_TMR1CURVAL_TMR1CURVAL_WIDTH 32
141
142
#define ALT_TMR_TMR1CURVAL_TMR1CURVAL_SET_MSK 0xffffffff
143
144
#define ALT_TMR_TMR1CURVAL_TMR1CURVAL_CLR_MSK 0x00000000
145
146
#define ALT_TMR_TMR1CURVAL_TMR1CURVAL_RESET 0x0
147
148
#define ALT_TMR_TMR1CURVAL_TMR1CURVAL_GET(value) (((value) & 0xffffffff) >> 0)
149
150
#define ALT_TMR_TMR1CURVAL_TMR1CURVAL_SET(value) (((value) << 0) & 0xffffffff)
151
152
#ifndef __ASSEMBLY__
153
163
struct
ALT_TMR_TMR1CURVAL_s
164
{
165
const
uint32_t
timer1currentval
: 32;
166
};
167
169
typedef
volatile
struct
ALT_TMR_TMR1CURVAL_s
ALT_TMR_TMR1CURVAL_t
;
170
#endif
/* __ASSEMBLY__ */
171
173
#define ALT_TMR_TMR1CURVAL_OFST 0x4
174
175
#define ALT_TMR_TMR1CURVAL_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_TMR_TMR1CURVAL_OFST))
176
214
#define ALT_TMR_TMR1CTLREG_TMR1_EN_E_DISD 0x0
215
220
#define ALT_TMR_TMR1CTLREG_TMR1_EN_E_END 0x1
221
223
#define ALT_TMR_TMR1CTLREG_TMR1_EN_LSB 0
224
225
#define ALT_TMR_TMR1CTLREG_TMR1_EN_MSB 0
226
227
#define ALT_TMR_TMR1CTLREG_TMR1_EN_WIDTH 1
228
229
#define ALT_TMR_TMR1CTLREG_TMR1_EN_SET_MSK 0x00000001
230
231
#define ALT_TMR_TMR1CTLREG_TMR1_EN_CLR_MSK 0xfffffffe
232
233
#define ALT_TMR_TMR1CTLREG_TMR1_EN_RESET 0x0
234
235
#define ALT_TMR_TMR1CTLREG_TMR1_EN_GET(value) (((value) & 0x00000001) >> 0)
236
237
#define ALT_TMR_TMR1CTLREG_TMR1_EN_SET(value) (((value) << 0) & 0x00000001)
238
262
#define ALT_TMR_TMR1CTLREG_TMR1_MOD_E_FREERUN 0x0
263
268
#define ALT_TMR_TMR1CTLREG_TMR1_MOD_E_USEDEF 0x1
269
271
#define ALT_TMR_TMR1CTLREG_TMR1_MOD_LSB 1
272
273
#define ALT_TMR_TMR1CTLREG_TMR1_MOD_MSB 1
274
275
#define ALT_TMR_TMR1CTLREG_TMR1_MOD_WIDTH 1
276
277
#define ALT_TMR_TMR1CTLREG_TMR1_MOD_SET_MSK 0x00000002
278
279
#define ALT_TMR_TMR1CTLREG_TMR1_MOD_CLR_MSK 0xfffffffd
280
281
#define ALT_TMR_TMR1CTLREG_TMR1_MOD_RESET 0x0
282
283
#define ALT_TMR_TMR1CTLREG_TMR1_MOD_GET(value) (((value) & 0x00000002) >> 1)
284
285
#define ALT_TMR_TMR1CTLREG_TMR1_MOD_SET(value) (((value) << 1) & 0x00000002)
286
307
#define ALT_TMR_TMR1CTLREG_TMR1_INT_MSK_E_NOTMSKED 0x0
308
313
#define ALT_TMR_TMR1CTLREG_TMR1_INT_MSK_E_MSKED 0x1
314
316
#define ALT_TMR_TMR1CTLREG_TMR1_INT_MSK_LSB 2
317
318
#define ALT_TMR_TMR1CTLREG_TMR1_INT_MSK_MSB 2
319
320
#define ALT_TMR_TMR1CTLREG_TMR1_INT_MSK_WIDTH 1
321
322
#define ALT_TMR_TMR1CTLREG_TMR1_INT_MSK_SET_MSK 0x00000004
323
324
#define ALT_TMR_TMR1CTLREG_TMR1_INT_MSK_CLR_MSK 0xfffffffb
325
326
#define ALT_TMR_TMR1CTLREG_TMR1_INT_MSK_RESET 0x0
327
328
#define ALT_TMR_TMR1CTLREG_TMR1_INT_MSK_GET(value) (((value) & 0x00000004) >> 2)
329
330
#define ALT_TMR_TMR1CTLREG_TMR1_INT_MSK_SET(value) (((value) << 2) & 0x00000004)
331
332
#ifndef __ASSEMBLY__
333
343
struct
ALT_TMR_TMR1CTLREG_s
344
{
345
uint32_t
timer1_enable
: 1;
346
uint32_t
timer1_mode
: 1;
347
uint32_t
timer1_interrupt_mask
: 1;
348
uint32_t : 29;
349
};
350
352
typedef
volatile
struct
ALT_TMR_TMR1CTLREG_s
ALT_TMR_TMR1CTLREG_t
;
353
#endif
/* __ASSEMBLY__ */
354
356
#define ALT_TMR_TMR1CTLREG_OFST 0x8
357
358
#define ALT_TMR_TMR1CTLREG_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_TMR_TMR1CTLREG_OFST))
359
382
#define ALT_TMR_TMR1EOI_TMR1EOI_LSB 0
383
384
#define ALT_TMR_TMR1EOI_TMR1EOI_MSB 0
385
386
#define ALT_TMR_TMR1EOI_TMR1EOI_WIDTH 1
387
388
#define ALT_TMR_TMR1EOI_TMR1EOI_SET_MSK 0x00000001
389
390
#define ALT_TMR_TMR1EOI_TMR1EOI_CLR_MSK 0xfffffffe
391
392
#define ALT_TMR_TMR1EOI_TMR1EOI_RESET 0x0
393
394
#define ALT_TMR_TMR1EOI_TMR1EOI_GET(value) (((value) & 0x00000001) >> 0)
395
396
#define ALT_TMR_TMR1EOI_TMR1EOI_SET(value) (((value) << 0) & 0x00000001)
397
398
#ifndef __ASSEMBLY__
399
409
struct
ALT_TMR_TMR1EOI_s
410
{
411
const
uint32_t
timer1eoi
: 1;
412
uint32_t : 31;
413
};
414
416
typedef
volatile
struct
ALT_TMR_TMR1EOI_s
ALT_TMR_TMR1EOI_t
;
417
#endif
/* __ASSEMBLY__ */
418
420
#define ALT_TMR_TMR1EOI_OFST 0xc
421
422
#define ALT_TMR_TMR1EOI_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_TMR_TMR1EOI_OFST))
423
459
#define ALT_TMR_TMR1INTSTAT_TMR1INTSTAT_E_INACT 0x0
460
465
#define ALT_TMR_TMR1INTSTAT_TMR1INTSTAT_E_ACT 0x1
466
468
#define ALT_TMR_TMR1INTSTAT_TMR1INTSTAT_LSB 0
469
470
#define ALT_TMR_TMR1INTSTAT_TMR1INTSTAT_MSB 0
471
472
#define ALT_TMR_TMR1INTSTAT_TMR1INTSTAT_WIDTH 1
473
474
#define ALT_TMR_TMR1INTSTAT_TMR1INTSTAT_SET_MSK 0x00000001
475
476
#define ALT_TMR_TMR1INTSTAT_TMR1INTSTAT_CLR_MSK 0xfffffffe
477
478
#define ALT_TMR_TMR1INTSTAT_TMR1INTSTAT_RESET 0x0
479
480
#define ALT_TMR_TMR1INTSTAT_TMR1INTSTAT_GET(value) (((value) & 0x00000001) >> 0)
481
482
#define ALT_TMR_TMR1INTSTAT_TMR1INTSTAT_SET(value) (((value) << 0) & 0x00000001)
483
484
#ifndef __ASSEMBLY__
485
495
struct
ALT_TMR_TMR1INTSTAT_s
496
{
497
const
uint32_t
timer1intstat
: 1;
498
uint32_t : 31;
499
};
500
502
typedef
volatile
struct
ALT_TMR_TMR1INTSTAT_s
ALT_TMR_TMR1INTSTAT_t
;
503
#endif
/* __ASSEMBLY__ */
504
506
#define ALT_TMR_TMR1INTSTAT_OFST 0x10
507
508
#define ALT_TMR_TMR1INTSTAT_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_TMR_TMR1INTSTAT_OFST))
509
547
#define ALT_TMR_TMRSINTSTAT_TMRSINTSTAT_E_INACT 0x0
548
553
#define ALT_TMR_TMRSINTSTAT_TMRSINTSTAT_E_ACT 0x1
554
556
#define ALT_TMR_TMRSINTSTAT_TMRSINTSTAT_LSB 0
557
558
#define ALT_TMR_TMRSINTSTAT_TMRSINTSTAT_MSB 0
559
560
#define ALT_TMR_TMRSINTSTAT_TMRSINTSTAT_WIDTH 1
561
562
#define ALT_TMR_TMRSINTSTAT_TMRSINTSTAT_SET_MSK 0x00000001
563
564
#define ALT_TMR_TMRSINTSTAT_TMRSINTSTAT_CLR_MSK 0xfffffffe
565
566
#define ALT_TMR_TMRSINTSTAT_TMRSINTSTAT_RESET 0x0
567
568
#define ALT_TMR_TMRSINTSTAT_TMRSINTSTAT_GET(value) (((value) & 0x00000001) >> 0)
569
570
#define ALT_TMR_TMRSINTSTAT_TMRSINTSTAT_SET(value) (((value) << 0) & 0x00000001)
571
572
#ifndef __ASSEMBLY__
573
583
struct
ALT_TMR_TMRSINTSTAT_s
584
{
585
const
uint32_t
timersintstat
: 1;
586
uint32_t : 31;
587
};
588
590
typedef
volatile
struct
ALT_TMR_TMRSINTSTAT_s
ALT_TMR_TMRSINTSTAT_t
;
591
#endif
/* __ASSEMBLY__ */
592
594
#define ALT_TMR_TMRSINTSTAT_OFST 0xa0
595
596
#define ALT_TMR_TMRSINTSTAT_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_TMR_TMRSINTSTAT_OFST))
597
623
#define ALT_TMR_TMRSEOI_TMRSEOI_LSB 0
624
625
#define ALT_TMR_TMRSEOI_TMRSEOI_MSB 0
626
627
#define ALT_TMR_TMRSEOI_TMRSEOI_WIDTH 1
628
629
#define ALT_TMR_TMRSEOI_TMRSEOI_SET_MSK 0x00000001
630
631
#define ALT_TMR_TMRSEOI_TMRSEOI_CLR_MSK 0xfffffffe
632
633
#define ALT_TMR_TMRSEOI_TMRSEOI_RESET 0x0
634
635
#define ALT_TMR_TMRSEOI_TMRSEOI_GET(value) (((value) & 0x00000001) >> 0)
636
637
#define ALT_TMR_TMRSEOI_TMRSEOI_SET(value) (((value) << 0) & 0x00000001)
638
639
#ifndef __ASSEMBLY__
640
650
struct
ALT_TMR_TMRSEOI_s
651
{
652
const
uint32_t
timerseoi
: 1;
653
uint32_t : 31;
654
};
655
657
typedef
volatile
struct
ALT_TMR_TMRSEOI_s
ALT_TMR_TMRSEOI_t
;
658
#endif
/* __ASSEMBLY__ */
659
661
#define ALT_TMR_TMRSEOI_OFST 0xa4
662
663
#define ALT_TMR_TMRSEOI_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_TMR_TMRSEOI_OFST))
664
702
#define ALT_TMR_TMRSRAWINTSTAT_TMRSRAWINTSTAT_E_INACT 0x0
703
708
#define ALT_TMR_TMRSRAWINTSTAT_TMRSRAWINTSTAT_E_ACT 0x1
709
711
#define ALT_TMR_TMRSRAWINTSTAT_TMRSRAWINTSTAT_LSB 0
712
713
#define ALT_TMR_TMRSRAWINTSTAT_TMRSRAWINTSTAT_MSB 0
714
715
#define ALT_TMR_TMRSRAWINTSTAT_TMRSRAWINTSTAT_WIDTH 1
716
717
#define ALT_TMR_TMRSRAWINTSTAT_TMRSRAWINTSTAT_SET_MSK 0x00000001
718
719
#define ALT_TMR_TMRSRAWINTSTAT_TMRSRAWINTSTAT_CLR_MSK 0xfffffffe
720
721
#define ALT_TMR_TMRSRAWINTSTAT_TMRSRAWINTSTAT_RESET 0x0
722
723
#define ALT_TMR_TMRSRAWINTSTAT_TMRSRAWINTSTAT_GET(value) (((value) & 0x00000001) >> 0)
724
725
#define ALT_TMR_TMRSRAWINTSTAT_TMRSRAWINTSTAT_SET(value) (((value) << 0) & 0x00000001)
726
727
#ifndef __ASSEMBLY__
728
738
struct
ALT_TMR_TMRSRAWINTSTAT_s
739
{
740
const
uint32_t
timersrawintstat
: 1;
741
uint32_t : 31;
742
};
743
745
typedef
volatile
struct
ALT_TMR_TMRSRAWINTSTAT_s
ALT_TMR_TMRSRAWINTSTAT_t
;
746
#endif
/* __ASSEMBLY__ */
747
749
#define ALT_TMR_TMRSRAWINTSTAT_OFST 0xa8
750
751
#define ALT_TMR_TMRSRAWINTSTAT_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_TMR_TMRSRAWINTSTAT_OFST))
752
772
#define ALT_TMR_TMRSCOMPVER_TMRSCOMPVER_LSB 0
773
774
#define ALT_TMR_TMRSCOMPVER_TMRSCOMPVER_MSB 31
775
776
#define ALT_TMR_TMRSCOMPVER_TMRSCOMPVER_WIDTH 32
777
778
#define ALT_TMR_TMRSCOMPVER_TMRSCOMPVER_SET_MSK 0xffffffff
779
780
#define ALT_TMR_TMRSCOMPVER_TMRSCOMPVER_CLR_MSK 0x00000000
781
782
#define ALT_TMR_TMRSCOMPVER_TMRSCOMPVER_RESET 0x3230352a
783
784
#define ALT_TMR_TMRSCOMPVER_TMRSCOMPVER_GET(value) (((value) & 0xffffffff) >> 0)
785
786
#define ALT_TMR_TMRSCOMPVER_TMRSCOMPVER_SET(value) (((value) << 0) & 0xffffffff)
787
788
#ifndef __ASSEMBLY__
789
799
struct
ALT_TMR_TMRSCOMPVER_s
800
{
801
const
uint32_t
timerscompversion
: 32;
802
};
803
805
typedef
volatile
struct
ALT_TMR_TMRSCOMPVER_s
ALT_TMR_TMRSCOMPVER_t
;
806
#endif
/* __ASSEMBLY__ */
807
809
#define ALT_TMR_TMRSCOMPVER_OFST 0xac
810
811
#define ALT_TMR_TMRSCOMPVER_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_TMR_TMRSCOMPVER_OFST))
812
813
#ifndef __ASSEMBLY__
814
824
struct
ALT_TMR_s
825
{
826
volatile
ALT_TMR_TMR1LDCOUNT_t
timer1loadcount
;
827
volatile
ALT_TMR_TMR1CURVAL_t
timer1currentval
;
828
volatile
ALT_TMR_TMR1CTLREG_t
timer1controlreg
;
829
volatile
ALT_TMR_TMR1EOI_t
timer1eoi
;
830
volatile
ALT_TMR_TMR1INTSTAT_t
timer1intstat
;
831
volatile
uint32_t
_pad_0x14_0x9f
[35];
832
volatile
ALT_TMR_TMRSINTSTAT_t
timersintstat
;
833
volatile
ALT_TMR_TMRSEOI_t
timerseoi
;
834
volatile
ALT_TMR_TMRSRAWINTSTAT_t
timersrawintstat
;
835
volatile
ALT_TMR_TMRSCOMPVER_t
timerscompversion
;
836
volatile
uint32_t
_pad_0xb0_0x100
[20];
837
};
838
840
typedef
volatile
struct
ALT_TMR_s
ALT_TMR_t
;
842
struct
ALT_TMR_raw_s
843
{
844
volatile
uint32_t
timer1loadcount
;
845
volatile
uint32_t
timer1currentval
;
846
volatile
uint32_t
timer1controlreg
;
847
volatile
uint32_t
timer1eoi
;
848
volatile
uint32_t
timer1intstat
;
849
volatile
uint32_t
_pad_0x14_0x9f
[35];
850
volatile
uint32_t
timersintstat
;
851
volatile
uint32_t
timerseoi
;
852
volatile
uint32_t
timersrawintstat
;
853
volatile
uint32_t
timerscompversion
;
854
volatile
uint32_t
_pad_0xb0_0x100
[20];
855
};
856
858
typedef
volatile
struct
ALT_TMR_raw_s
ALT_TMR_raw_t
;
859
#endif
/* __ASSEMBLY__ */
860
862
#ifdef __cplusplus
863
}
864
#endif
/* __cplusplus */
865
#endif
/* __ALTERA_ALT_TMR_H__ */
866
include
soc_cv_av
socal
alt_tmr.h
Generated on Tue Sep 8 2015 13:28:44 for Altera SoCAL by
1.8.2