Hardware Libraries
20.1
Stratix 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_watchdog.h
1
/******************************************************************************
2
*
3
* Copyright 2013,2017 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/main/embedded/ip/hps/armv8/hwlib/include/alt_watchdog.h#1 $
35
*/
36
37
#ifndef __ALT_WDOG_H__
38
#define __ALT_WDOG_H__
39
40
#include "hwlib.h"
41
42
#ifdef __cplusplus
43
extern
"C"
{
44
#endif
/* __cplusplus */
45
80
/******************************************************************************/
81
86
typedef
enum
ALT_WDOG_TIMER_e
{
87
/* OSC1 Clock Group */
93
ALT_WDOG0
,
94
100
ALT_WDOG1
,
101
107
ALT_WDOG2
,
108
114
ALT_WDOG3
,
115
124
ALT_WDOG0_INIT
,
125
134
ALT_WDOG1_INIT
,
135
144
ALT_WDOG2_INIT
,
145
154
ALT_WDOG3_INIT
155
156
}
ALT_WDOG_TIMER_t
;
157
158
/******************************************************************************/
163
typedef
enum
ALT_WDOG_TIMEOUT_e
{
167
ALT_WDOG_USER0_OR_64K
,
168
172
ALT_WDOG_USER1_OR_128K
,
173
177
ALT_WDOG_USER2_OR_256K
,
178
182
ALT_WDOG_USER3_OR_512K
,
183
187
ALT_WDOG_USER4_OR_1M
,
188
192
ALT_WDOG_USER5_OR_2M
,
193
197
ALT_WDOG_USER6_OR_4M
,
198
202
ALT_WDOG_USER7_OR_8M
,
203
207
ALT_WDOG_USER8_OR_16M
,
208
212
ALT_WDOG_USER9_OR_32M
,
213
217
ALT_WDOG_USER10_OR_64M
,
218
222
ALT_WDOG_USER11_OR_128M
,
223
227
ALT_WDOG_USER12_OR_256M
,
228
232
ALT_WDOG_USER13_OR_512M
,
233
238
ALT_WDOG_USER14_OR_1G
,
239
243
ALT_WDOG_USER15_OR_2G
244
}
ALT_WDOG_TIMEOUT_t
;
245
246
/******************************************************************************/
251
typedef
enum
ALT_WDOG_RESET_TYPE_e
{
255
ALT_WDOG_UNKNOWN
,
256
263
ALT_WDOG_WARM_RESET
,
264
271
ALT_WDOG_INT_THEN_RESET
272
273
}
ALT_WDOG_RESET_TYPE_t
;
274
275
/******************************************************************************/
283
/******************************************************************************/
290
ALT_STATUS_CODE
alt_wdog_init
(
void
);
291
292
/******************************************************************************/
299
ALT_STATUS_CODE
alt_wdog_uninit
(
void
);
300
301
/******************************************************************************/
313
ALT_STATUS_CODE
alt_wdog_stop
(
ALT_WDOG_TIMER_t
tmr_id);
314
315
/******************************************************************************/
326
ALT_STATUS_CODE
alt_wdog_start
(
ALT_WDOG_TIMER_t
tmr_id);
327
328
/******************************************************************************/
338
bool
alt_wdog_tmr_is_enabled
(
ALT_WDOG_TIMER_t
tmr_id);
339
340
/******************************************************************************/
356
ALT_STATUS_CODE
alt_wdog_reset
(
ALT_WDOG_TIMER_t
tmr_id);
357
359
/******************************************************************************/
368
/******************************************************************************/
390
ALT_STATUS_CODE
alt_wdog_counter_set
(
ALT_WDOG_TIMER_t
tmr_id,
ALT_WDOG_TIMEOUT_t
val);
391
392
/******************************************************************************/
402
uint32_t
alt_wdog_counter_get_current
(
ALT_WDOG_TIMER_t
tmr_id);
403
404
/******************************************************************************/
415
uint32_t
alt_wdog_counter_get_curtime_millisecs
(
ALT_WDOG_TIMER_t
tmr_id);
416
417
/******************************************************************************/
431
uint32_t
alt_wdog_counter_get_init
(
ALT_WDOG_TIMER_t
tmr_id);
432
433
/******************************************************************************/
447
uint64_t
alt_wdog_counter_get_inittime_nanosecs
(
ALT_WDOG_TIMER_t
tmr_id);
448
449
/******************************************************************************/
463
uint32_t
alt_wdog_counter_get_inittime_millisecs
(
ALT_WDOG_TIMER_t
tmr_id);
464
465
/******************************************************************************/
477
uint32_t
alt_wdog_counter_get_max
(
ALT_WDOG_TIMER_t
tmr_id);
478
479
/******************************************************************************/
491
uint64_t
alt_wdog_counter_get_max_nanosecs
(
ALT_WDOG_TIMER_t
tmr_id);
492
493
494
/******************************************************************************/
506
uint32_t
alt_wdog_counter_get_max_millisecs
(
ALT_WDOG_TIMER_t
tmr_id);
507
509
/******************************************************************************/
518
/******************************************************************************/
519
520
/******************************************************************************/
532
bool
alt_wdog_int_is_pending
(
ALT_WDOG_TIMER_t
tmr_id);
533
534
/******************************************************************************/
544
bool
alt_wdog_int_is_enabled
(
ALT_WDOG_TIMER_t
tmr_id);
545
546
/******************************************************************************/
557
ALT_STATUS_CODE
alt_wdog_int_clear
(
ALT_WDOG_TIMER_t
tmr_id);
558
559
/******************************************************************************/
571
bool
alt_wdog_int_if_pending_clear
(
ALT_WDOG_TIMER_t
tmr_id);
572
573
/******************************************************************************/
595
ALT_STATUS_CODE
alt_wdog_response_mode_set
(
ALT_WDOG_TIMER_t
tmr_id,
596
ALT_WDOG_RESET_TYPE_t
type);
597
598
/******************************************************************************/
610
ALT_WDOG_RESET_TYPE_t
alt_wdog_response_mode_get
(
ALT_WDOG_TIMER_t
tmr_id);
611
612
613
/******************************************************************************/
624
uint32_t
alt_wdog_compcode_get
(
ALT_WDOG_TIMER_t
tmr_id);
625
626
/******************************************************************************/
636
uint32_t
alt_wdog_ver_get
(
ALT_WDOG_TIMER_t
tmr_id);
637
638
639
/******************************************************************************/
640
643
#ifdef __cplusplus
644
}
645
#endif
/* __cplusplus */
646
#endif
/* __ALT_WDOG_H__ */
include
alt_watchdog.h
Generated on Tue Oct 27 2020 08:52:48 for Hardware Libraries by
1.8.2