def __init__(self): WatchdogBase.__init__(self) self._librt = ctypes.CDLL('librt.so.1', use_errno=True) self._clock_gettime = self._librt.clock_gettime self._clock_gettime.argtypes = [ ctypes.c_int, ctypes.POINTER(_timespec) ]
def __init__(self): WatchdogBase.__init__(self) self.watchdog, self.wdt_main_dev_name = self._get_wdt() self.status_path = "/sys/class/watchdog/%s/status" % self.wdt_main_dev_name self.state_path = "/sys/class/watchdog/%s/state" % self.wdt_main_dev_name self.timeout_path = "/sys/class/watchdog/%s/timeout" % self.wdt_main_dev_name # Set default value self._disable() self.armed = False self.timeout = self._gettimeout(self.timeout_path)
def __init__(self): WatchdogBase.__init__(self) self._api_common = Common() # Init cpld reg path self.setreg_path = os.path.join(PLATFORM_CPLD_PATH, SETREG_FILE) self.getreg_path = os.path.join(PLATFORM_CPLD_PATH, GETREG_FILE) # Set default value self._disable() self.armed = False self.timeout = self._gettimeout()