XilinxProcessorIPLib/drivers/wdttb/examples/xwdttb_gwdt_selftest_example.c
int GWdtTbSelfTestExample(u16 DeviceId)
{
        int Status;
        XWdtTb_Config *Config;

        /*
         * Initialize the WDTTB driver so that it's ready to use look up
         * configuration in the config table, then initialize it.
         */
        Config = XWdtTb_LookupConfig(DeviceId);
        if (NULL == Config)
        {
                return XST_FAILURE;
        }
        /*
         * Initialize the watchdog timer and window WDT driver so that
         * it is ready to use.
         */
        Status = XWdtTb_CfgInitialize(&GWatchdog, Config,
                        Config->BaseAddr);
        if (Status != XST_SUCCESS)
        {
                return XST_FAILURE;
        }
        /*
         * Perform a self-test to ensure that the hardware was built
         * correctly
         */
        Status = XWdtTb_SelfTest(&GWatchdog);
        if (Status != XST_SUCCESS)
        {
                return XST_FAILURE;
        }
        /* Reset all the Register of GWDT */
        Status =XWdtTb_Stop(&GWatchdog);
        if (Status != XST_SUCCESS)
        {
                return XST_FAILURE;
        }

        return XST_SUCCESS;
}
/*****************************************************************************/
/**
 * This function does a minimal test on Generic watchdog timer device and
 * driver as a design example. The purpose of this function is to illustrate
 * how to use the XwdtTb component.
 *
 * @param        DeviceId is the XPAR_<WDTTB_instance>_DEVICE_ID value from
 *               xparameters.h.
 *
 * @return
 *               - XST_SUCCESS if successful.
 *               - XST_FAILURE if unsuccessful.
 *
 * @note         None.
 *
 ****************************************************************************/
This function does a minimal test on Generic watchdog timer device and
driver as a design example. The purpose of this function is to illustrate
how to use the XwdtTb component.

@param        DeviceId is the XPAR__DEVICE_ID value from
xparameters.h.

@return
- XST_SUCCESS if successful.
- XST_FAILURE if unsuccessful.

@note         None.
This function does a minimal test on Generic watchdog timer device and driver as a design example . The purpose of this function is to illustrate how to use the XwdtTb component . @param DeviceId is the XPAR__DEVICE_ID value from xparameters . h . @return - XST_SUCCESS if successful . - XST_FAILURE if unsuccessful . @note None .
int GWdtTbSelfTestExample(u16 DeviceId)
{
        int Status;
        XWdtTb_Config *Config;
        Config = XWdtTb_LookupConfig(DeviceId);
        if (NULL == Config)
        {
                return XST_FAILURE;
        }
        Status = XWdtTb_CfgInitialize(&GWatchdog, Config,
                        Config->BaseAddr);
        if (Status != XST_SUCCESS)
        {
                return XST_FAILURE;
        }
        Status = XWdtTb_SelfTest(&GWatchdog);
        if (Status != XST_SUCCESS)
        {
                return XST_FAILURE;
        }
        Status =XWdtTb_Stop(&GWatchdog);
        if (Status != XST_SUCCESS)
        {
                return XST_FAILURE;
        }
        return XST_SUCCESS;
}
int GWdtTbSelfTestExample ( u16 DeviceId ) { int Status ; XWdtTb_Config * Config ; Config = XWdtTb_LookupConfig ( DeviceId ) ; if ( NULL == Config ) { return XST_FAILURE ; } Status = XWdtTb_CfgInitialize ( & GWatchdog , Config , Config -> BaseAddr ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Status = XWdtTb_SelfTest ( & GWatchdog ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Status = XWdtTb_Stop ( & GWatchdog ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } return XST_SUCCESS ; }
This function does a minimal test on Generic watchdog timer device and
 driver as a design example.
This function does a minimal test on Generic watchdog timer device and driver as a design example .
/*
         * Initialize the WDTTB driver so that it's ready to use look up
         * configuration in the config table, then initialize it.
         */ /*
         * Initialize the watchdog timer and window WDT driver so that
         * it is ready to use.
         */ /*
         * Perform a self-test to ensure that the hardware was built
         * correctly
         */ /* Reset all the Register of GWDT */