Hardware Libraries
20.1
Arria 10 SoC Hardware Manager
Main Page
Address Space
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
alt_globaltmr.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* Copyright 2013 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
33
/*
34
* $Id: //acds/rel/20.1/embedded/ip/hps/altera_hps/hwlib/include/alt_globaltmr.h#1 $
35
*/
36
41
#ifndef __ALT_GBLTMR_H__
42
#define __ALT_GBLTMR_H__
43
44
#include <stdint.h>
45
#include <stdbool.h>
46
#include "hwlib.h"
47
48
#ifdef __cplusplus
49
extern
"C"
50
{
51
#endif
/* __cplusplus */
52
53
54
/******************************************************************************/
65
/******************************************************************************/
69
ALT_STATUS_CODE
alt_globaltmr_uninit
(
void
);
70
71
/******************************************************************************/
75
ALT_STATUS_CODE
alt_globaltmr_init
(
void
);
76
77
/******************************************************************************/
89
ALT_STATUS_CODE
alt_globaltmr_stop
(
void
);
90
91
/******************************************************************************/
104
ALT_STATUS_CODE
alt_globaltmr_start
(
void
);
105
106
/******************************************************************************/
123
ALT_STATUS_CODE
alt_globaltmr_get
(uint32_t* highword, uint32_t* lowword);
124
125
/******************************************************************************/
136
uint64_t
alt_globaltmr_get64
(
void
);
137
138
/******************************************************************************/
149
uint32_t
alt_globaltmr_counter_get_low32
(
void
);
150
151
/******************************************************************************/
160
uint32_t
alt_globaltmr_counter_get_hi32
(
void
);
161
162
/******************************************************************************/
181
ALT_STATUS_CODE
alt_globaltmr_comp_set
(uint32_t highword, uint32_t loword);
182
183
/******************************************************************************/
200
ALT_STATUS_CODE
alt_globaltmr_comp_set64
(uint64_t compval);
201
202
/******************************************************************************/
223
ALT_STATUS_CODE
alt_globaltmr_comp_get
(uint32_t *highword, uint32_t *lowword);
224
225
/******************************************************************************/
242
uint64_t
alt_globaltmr_comp_get64
(
void
);
243
244
245
/******************************************************************************/
254
ALT_STATUS_CODE
alt_globaltmr_comp_mode_start
(
void
);
255
256
/******************************************************************************/
265
ALT_STATUS_CODE
alt_globaltmr_comp_mode_stop
(
void
);
266
267
/******************************************************************************/
276
bool
alt_globaltmr_is_comp_mode
(
void
);
277
278
279
/******************************************************************************/
287
uint32_t
alt_globaltmr_prescaler_get
(
void
);
288
289
290
/******************************************************************************/
303
ALT_STATUS_CODE
alt_globaltmr_prescaler_set
(uint32_t val);
304
305
/******************************************************************************/
323
ALT_STATUS_CODE
alt_globaltmr_autoinc_set
(uint32_t inc);
324
325
/******************************************************************************/
336
uint32_t
alt_globaltmr_autoinc_get
(
void
);
337
338
/******************************************************************************/
347
ALT_STATUS_CODE
alt_globaltmr_autoinc_mode_start
(
void
);
348
349
/******************************************************************************/
358
ALT_STATUS_CODE
alt_globaltmr_autoinc_mode_stop
(
void
);
359
360
/******************************************************************************/
368
bool
alt_globaltmr_is_autoinc_mode
(
void
);
369
370
/******************************************************************************/
382
uint32_t
alt_globaltmr_maxcounter_get
(
void
);
383
384
/******************************************************************************/
394
ALT_STATUS_CODE
alt_globaltmr_int_disable
(
void
);
395
396
/******************************************************************************/
397
398
#if 0
399
410
ALT_STATUS_CODE
alt_globaltmr_int_enable
(
void
);
411
412
#else
413
425
ALT_STATUS_CODE
alt_globaltmr_int_enable
(
void
);
426
427
#endif
428
429
/******************************************************************************/
444
bool
alt_globaltmr_int_is_enabled
(
void
);
445
446
/******************************************************************************/
457
ALT_STATUS_CODE
alt_globaltmr_int_clear_pending
(
void
);
458
459
/******************************************************************************/
471
bool
alt_globaltmr_int_is_pending
(
void
);
472
473
/******************************************************************************/
485
bool
alt_globaltmr_int_if_pending_clear
(
void
);
486
491
#ifdef __cplusplus
492
}
493
#endif
/* __cplusplus */
494
#endif
/* __ALT_GBLTMR_H__ */
include
alt_globaltmr.h
Generated on Tue Oct 27 2020 08:37:28 for Hardware Libraries by
1.8.2