API Reference: Libraries

Top

# vxbW83627wdtK

#### NAME

> vxbW83627wdtK - Driver for the watchdog

#### ROUTINES

> vxbW83627wdtDrvRegister( ) - register template driver
> W83627wdtInstInit( ) - first level initialization routine of device
> W83627wdtInstInit2( ) - second level initialization routine of device
> W83627wdtInstConnect( ) - third level initialization routine of device
> W83627wdtWDTCount( ) - Reload counter with new value
> W83627wdtWDTCountGet( ) - Get current WDT value
> W83627wdtWDTMode( ) - Set time unit for WDT
> W83627wdtWDTDisable( ) - Disable WDT module
> W83627wdtWDTEnable( ) - Enable WDT module

#### DESCRIPTION

> This driver provides support for the Winbond W83627 watchdog.
> There are functions available to run/reload/stop and set time base unit.

API Reference: Routines

Top

# vxbW83627wdtDrvRegister( )

#### NAME

> vxbW83627wdtDrvRegister( ) - register template driver

#### DESCRIPTION

> This routine registers the template driver with the VxBus subsystem.

> This routine contains the first instructions of the device driver that are ever executed within a VxWorks system. This function registers the driver with VxBus by providing pointers to the data structures listed previously. Once this step is complete, VxWorks is able to associate this driver with appropriate hardware within the system to form an instance.

#### RETURNS

> N/A

#### ERRNO

> Not Available

#### SEE ALSO

> vxbW83627wdtK

API Reference: Routines

Top

# W83627wdtInstInit( )

#### NAME

> W83627wdtInstInit( ) - first level initialization routine of device

#### DESCRIPTION

> This is the function called to perform the first level initialization of the template device.

#### NOTE

> This routine is called early during system initialization, and *MUST NOT* make calls to OS facilities such as memory allocation and I/O.

#### RETURNS

> N/A

#### ERRNO

> Not Available

#### SEE ALSO

> vxbW83627wdtK

API Reference: Routines

Top

# W83627wdtInstInit2( )

#### NAME

> W83627wdtInstInit2( ) - second level initialization routine of device

#### DESCRIPTION

> This routine performs the second level initialization of the device.

#### NOTE

> This routine is called later during system initialization. OS features such as memory allocation are available at this time.

#### RETURNS

> N/A

#### ERRNO

> Not Available

#### SEE ALSO

> vxbW83627wdtK

API Reference: Routines

Top

# W83627wdtInstConnect( )

#### NAME

> W83627wdtInstConnect( ) - third level initialization routine of device

#### DESCRIPTION

> This is the function called to perform the third level initialization of the device.

#### RETURNS

> N/A

#### ERRNO

> Not Available

#### SEE ALSO

> vxbW83627wdtK

API Reference: Routines

Top

# W83627wdtWDTCount( )

#### NAME

> W83627wdtWDTCount( ) - Reload counter with new value

#### SYNOPSIS

STATUS W83627wdtWDTCount (VXB_DEVICE_ID pInst, UINT8 uDelay)

#### DESCRIPTION

> Reload WDT counter with new value, in case of zero value force the WDT trigger

#### PARAMETERS

> pInst - device identifier
> uDelay - delay value

#### RETURNS

> OK, or ERROR

#### ERRNO

> Not Available

#### SEE ALSO

> vxbW83627wdtK

API Reference: Routines

Top

# W83627wdtWDTCountGet( )

#### NAME

> W83627wdtWDTCountGet( ) - Get current WDT value

#### SYNOPSIS

STATUS W83627wdtWDTCountGet (VXB_DEVICE_ID pInst, UINT8* pDelay)

#### DESCRIPTION

> Obtain current value of WDT counter

#### PARAMETERS

> pInst - device identifier
> pDelay - delay value

#### RETURNS

> OK, or ERROR

#### ERRNO

> Not Available

#### SEE ALSO

> vxbW83627wdtK

API Reference: Routines

Top

# W83627wdtWDTMode( )

#### NAME

> W83627wdtWDTMode( ) - Set time unit for WDT

#### SYNOPSIS

STATUS W83627wdtWDTMode (VXB_DEVICE_ID pInst, BOOL fMode)

#### DESCRIPTION

> Set Watchdog time unit, depends on function parameter "fMode":
> TRUE = seconds
> FALSE = minutes

#### PARAMETERS

> pInst - device identifier
> fMode - Sec/Min mode selector

#### RETURNS

> OK, or ERROR

#### ERRNO

> Not Available

#### SEE ALSO

> vxbW83627wdtK

API Reference: Routines

Top

# W83627wdtWDTDisable( )

#### NAME

> W83627wdtWDTDisable( ) - Disable WDT module

#### SYNOPSIS

STATUS W83627wdtWDTDisable (XB_DEVICE_ID pInst)

#### DESCRIPTION

> Disable watchdog to control target, but it may be utilized as a countdown counter

#### PARAMETERS

> pInst - device identifier

#### RETURNS

> OK, or ERROR

#### ERRNO

> Not Available

#### SEE ALSO

> vxbW83627wdtK

API Reference: Routines

Top

# W83627wdtWDTEnable( )

#### NAME

> W83627wdtWDTEnable( ) - Enable WDT module

#### SYNOPSIS

STATUS W83627wdtWDTEnable (XB_DEVICE_ID pInst)

#### DESCRIPTION

> Enable watchdog to control target, but it should be enabled in BIOS too.
> (only BIOS afford to route WDT output to CPU reset)
> To prevent undesirable reset this routine updates WDT counter with maximum value (0xFF)

#### PARAMETERS

> pInst - device identifier

#### RETURNS

> OK, or ERROR

#### ERRNO

> Not Available

#### SEE ALSO

> vxbW83627wdtK