<< Previous | Next >>

VdReleaseWd

int VdReleaseWd( int ndog );

Description

Deactivates a virtual watchdog and makes it available for VdGetFreeWd().

Parameters

ndog
Handle returned by VdGetFreeWd()

Return value

0: ndog out of range.
1: Success.

Library

VDRIVER.LIB

Example

// VdReleaseWd virtual watchdog example
main() {
   int wd;         //
handle for a virtual watchdog
   unsigned long tm;
   tm = SEC_TIMER;
   wd = VdGetFreeWd(255);        //
wd activated, 9 virtual watchdogs
                                 // now available. wd must be hit
                                 //
at least every 15.875 seconds
   while(SEC_TIMER - tm < 60) {  // let it run for a minute
      VdHitWd(wd);               // reset counter back to 255
   }

   VdReleaseWd(wd)               // now 10 virtual watchdogs available
}


Dynamic C Functions << Previous | Next >> rabbit.com