#include "xil_types.h"
#include "xil_assert.h"
#include "xstatus.h"
#include "xwdttb_l.h"
Classes | |
struct | XWdtTb_Config |
struct | XWdtTb |
Defines | |
#define | XWDTTB_H |
Functions | |
int | XWdtTb_Initialize (XWdtTb *InstancePtr, u16 DeviceId) |
void | XWdtTb_Start (XWdtTb *InstancePtr) |
int | XWdtTb_Stop (XWdtTb *InstancePtr) |
int | XWdtTb_IsWdtExpired (XWdtTb *InstancePtr) |
void | XWdtTb_RestartWdt (XWdtTb *InstancePtr) |
u32 | XWdtTb_GetTbValue (XWdtTb *InstancePtr) |
XWdtTb_Config * | XWdtTb_LookupConfig (u16 DeviceId) |
int | XWdtTb_SelfTest (XWdtTb *InstancePtr) |
#define XWDTTB_H |
u32 XWdtTb_GetTbValue | ( | XWdtTb * | InstancePtr | ) |
Returns the current contents of the timebase.
InstancePtr | is a pointer to the XWdtTb instance to be worked on. |
int XWdtTb_Initialize | ( | XWdtTb * | InstancePtr, | |
u16 | DeviceId | |||
) |
Initialize a specific watchdog timer/timebase instance/driver. This function must be called before other functions of the driver are called.
InstancePtr | is a pointer to the XWdtTb instance to be worked on. | |
DeviceId | is the unique id of the device controlled by this XWdtTb instance. Passing in a device id associates the generic XWdtTb instance to a specific device, as chosen by the caller or application developer. |
int XWdtTb_IsWdtExpired | ( | XWdtTb * | InstancePtr | ) |
Check if the watchdog timer has expired. This function is used for polled mode and it is also used to check if the last reset was caused by the watchdog timer.
InstancePtr | is a pointer to the XWdtTb instance to be worked on. |
XWdtTb_Config* XWdtTb_LookupConfig | ( | u16 | DeviceId | ) |
void XWdtTb_RestartWdt | ( | XWdtTb * | InstancePtr | ) |
Restart the watchdog timer. An application needs to call this function periodically to keep the timer from asserting the reset output.
InstancePtr | is a pointer to the XWdtTb instance to be worked on. |
int XWdtTb_SelfTest | ( | XWdtTb * | InstancePtr | ) |
Run a self-test on the timebase. This test verifies that the timebase is incrementing. The watchdog timer is not tested due to the time required to wait for the watchdog timer to expire. The time consumed by this test is dependant on the system clock and the configuration of the dividers in for the input clock of the timebase.
InstancePtr | is a pointer to the XWdtTb instance to be worked on. |
void XWdtTb_Start | ( | XWdtTb * | InstancePtr | ) |
Start the watchdog timer of the device.
InstancePtr | is a pointer to the XWdtTb instance to be worked on. |
int XWdtTb_Stop | ( | XWdtTb * | InstancePtr | ) |
Disable the watchdog timer.
It is the caller's responsibility to disconnect the interrupt handler of the watchdog timer from the interrupt source, typically an interrupt controller, and disable the interrupt in the interrupt controller.
InstancePtr | is a pointer to the XWdtTb instance to be worked on. |
The hardware configuration controls this functionality. If it is not allowed by the hardware the failure will be returned and the timer will continue without interruption.
Copyright © 1995-2014 Xilinx, Inc. All rights reserved.