xwdtps.c File Reference
#include "xwdtps.h"
Detailed Description
Contains the implementation of interface functions of the XWdtPs driver. See xwdtps.h for a description of the driver.
MODIFICATION HISTORY:
Ver Who Date Changes
----- ------ -------- ---------------------------------------------
1.00a ecm/jz 01/15/10 First release
1.02a sg 07/15/12 Removed code/APIs related to External Signal
Length functionality for CR 658287
Removed APIs XWdtPs_SetExternalSignalLength,
XWdtPs_GetExternalSignalLength
Function Documentation
int XWdtPs_CfgInitialize |
( |
XWdtPs * |
InstancePtr, |
|
|
XWdtPs_Config * |
ConfigPtr, |
|
|
u32 |
EffectiveAddress | |
|
) |
| | |
Initialize a specific watchdog timer instance/driver. This function must be called before other functions of the driver are called.
- Parameters:
-
| InstancePtr | is a pointer to the XWdtPs instance. |
| ConfigPtr | is the config structure. |
| EffectiveAddress | is the base address for the device. It could be a virtual address if address translation is supported in the system, otherwise it is the physical address. |
- Returns:
- XST_SUCCESS if initialization was successful.
- XST_DEVICE_IS_STARTED if the device has already been started.
- Note:
- None.
void XWdtPs_DisableOutput |
( |
XWdtPs * |
InstancePtr, |
|
|
u8 |
Signal | |
|
) |
| | |
Disables the indicated signal/output. Performs a read/modify/write cycle to update the value correctly.
- Parameters:
-
| InstancePtr | is a pointer to the XWdtPs instance. |
| Signal | is the desired signal/output. Valid Signal Values are XWDTPS_RESET_SIGNAL and XWDTPS_IRQ_SIGNAL Only one of them can be specified at a time. |
- Returns:
- None.
- Note:
- None.
void XWdtPs_EnableOutput |
( |
XWdtPs * |
InstancePtr, |
|
|
u8 |
Signal | |
|
) |
| | |
Enables the indicated signal/output. Performs a read/modify/write cycle to update the value correctly.
- Parameters:
-
| InstancePtr | is a pointer to the XWdtPs instance. |
| Signal | is the desired signal/output. Valid Signal Values are XWDTPS_RESET_SIGNAL and XWDTPS_IRQ_SIGNAL. Only one of them can be specified at a time. |
- Returns:
- None.
- Note:
- None.
u32 XWdtPs_GetControlValue |
( |
XWdtPs * |
InstancePtr, |
|
|
u8 |
Control | |
|
) |
| | |
Returns the current control setting for the indicated signal/output. The register referenced is the Counter Control Register (XWDTPS_CCR_OFFSET)
- Parameters:
-
| InstancePtr | is a pointer to the XWdtPs instance. |
| Control | is the desired signal/output. Valid Control Values are XWDTPS_CLK_PRESCALE and XWDTPS_COUNTER_RESET. Only one of them can be specified at a time. |
- Returns:
- The contents of the requested control field in the Counter Control Register (XWDTPS_CCR_OFFSET). If the Control is XWDTPS_CLK_PRESCALE then use the defintions XWDTEPB_CCR_PSCALE_XXXX. If the Control is XWDTPS_COUNTER_RESET then the values are 0x0 to 0xFFF. This is the Counter Restart value in the CCR register.
- Note:
- None.
void XWdtPs_SetControlValue |
( |
XWdtPs * |
InstancePtr, |
|
|
u8 |
Control, |
|
|
u32 |
Value | |
|
) |
| | |
Updates the current control setting for the indicated signal/output with the provided value.
Performs a read/modify/write cycle to update the value correctly. The register referenced is the Counter Control Register (XWDTPS_CCR_OFFSET)
- Parameters:
-
| InstancePtr | is a pointer to the XWdtPs instance. |
| Control | is the desired signal/output. Valid Control Values are XWDTPS_CLK_PRESCALE and XWDTPS_COUNTER_RESET. Only one of them can be specified at a time. |
| Value | is the desired control value. If the Control is XWDTPS_CLK_PRESCALE then use the defintions XWDTEPB_CCR_PSCALE_XXXX. If the Control is XWDTPS_COUNTER_RESET then the valid values are 0x0 to 0xFFF, this sets the counter restart value of the CCR register. |
- Returns:
- None.
- Note:
- None.
void XWdtPs_Start |
( |
XWdtPs * |
InstancePtr |
) |
|
Start the watchdog timer of the device.
- Parameters:
-
| InstancePtr | is a pointer to the XWdtPs instance. |
- Returns:
- None.
- Note:
- None.
void XWdtPs_Stop |
( |
XWdtPs * |
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.
- Parameters:
-
| InstancePtr | is a pointer to the XWdtPs instance. |
- Returns:
- None.
- Note:
- None.
Copyright © 1995-2014 Xilinx, Inc. All rights reserved.