Altera HWLIB
16.0
The Altera HW Manager API Reference Manual
Main Page
Address Space
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
alt_globaltmr.h
Go to the documentation of this file.
1
5
/******************************************************************************
6
*
7
* Copyright 2013 Altera Corporation. All Rights Reserved.
8
*
9
* Redistribution and use in source and binary forms, with or without
10
* modification, are permitted provided that the following conditions are met:
11
*
12
* 1. Redistributions of source code must retain the above copyright notice,
13
* this list of conditions and the following disclaimer.
14
*
15
* 2. Redistributions in binary form must reproduce the above copyright notice,
16
* this list of conditions and the following disclaimer in the documentation
17
* and/or other materials provided with the distribution.
18
*
19
* 3. Neither the name of the copyright holder nor the names of its contributors
20
* may be used to endorse or promote products derived from this software without
21
* specific prior written permission.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
* POSSIBILITY OF SUCH DAMAGE.
34
*
35
******************************************************************************/
36
37
/*
38
* $Id: //depot/embedded/rel/15.0/ip/hps/altera_hps/hwlib/include/alt_globaltmr.h#1 $
39
*/
40
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 Sep 8 2015 13:35:04 for Altera HWLIB by
1.8.2