# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _pyupm_ds1307
else:
    import _pyupm_ds1307

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)



def getVersion():
    return _pyupm_ds1307.getVersion()
DS1307_I2C_BUS = _pyupm_ds1307.DS1307_I2C_BUS
DS1307_I2C_ADDR = _pyupm_ds1307.DS1307_I2C_ADDR
DS1307_DAY_MON = _pyupm_ds1307.DS1307_DAY_MON
DS1307_DAY_TUE = _pyupm_ds1307.DS1307_DAY_TUE
DS1307_DAY_WED = _pyupm_ds1307.DS1307_DAY_WED
DS1307_DAY_THU = _pyupm_ds1307.DS1307_DAY_THU
DS1307_DAY_FRI = _pyupm_ds1307.DS1307_DAY_FRI
DS1307_DAY_SAT = _pyupm_ds1307.DS1307_DAY_SAT
DS1307_DAY_SUN = _pyupm_ds1307.DS1307_DAY_SUN
class DS1307(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _pyupm_ds1307.DS1307_swiginit(self, _pyupm_ds1307.new_DS1307(*args))

    def loadTime(self):
        return _pyupm_ds1307.DS1307_loadTime(self)

    def setTime(self):
        return _pyupm_ds1307.DS1307_setTime(self)

    def enableClock(self):
        return _pyupm_ds1307.DS1307_enableClock(self)

    def disableClock(self):
        return _pyupm_ds1307.DS1307_disableClock(self)

    def writeBytes(self, reg, buffer, len):
        return _pyupm_ds1307.DS1307_writeBytes(self, reg, buffer, len)

    def readBytes(self, reg, buffer, len):
        return _pyupm_ds1307.DS1307_readBytes(self, reg, buffer, len)

    def bcdToDec(self, val):
        return _pyupm_ds1307.DS1307_bcdToDec(self, val)

    def decToBcd(self, val):
        return _pyupm_ds1307.DS1307_decToBcd(self, val)
    seconds = property(_pyupm_ds1307.DS1307_seconds_get, _pyupm_ds1307.DS1307_seconds_set)
    minutes = property(_pyupm_ds1307.DS1307_minutes_get, _pyupm_ds1307.DS1307_minutes_set)
    hours = property(_pyupm_ds1307.DS1307_hours_get, _pyupm_ds1307.DS1307_hours_set)
    dayOfWeek = property(_pyupm_ds1307.DS1307_dayOfWeek_get, _pyupm_ds1307.DS1307_dayOfWeek_set)
    dayOfMonth = property(_pyupm_ds1307.DS1307_dayOfMonth_get, _pyupm_ds1307.DS1307_dayOfMonth_set)
    month = property(_pyupm_ds1307.DS1307_month_get, _pyupm_ds1307.DS1307_month_set)
    year = property(_pyupm_ds1307.DS1307_year_get, _pyupm_ds1307.DS1307_year_set)
    amPmMode = property(_pyupm_ds1307.DS1307_amPmMode_get, _pyupm_ds1307.DS1307_amPmMode_set)
    pm = property(_pyupm_ds1307.DS1307_pm_get, _pyupm_ds1307.DS1307_pm_set)
    __swig_destroy__ = _pyupm_ds1307.delete_DS1307

# Register DS1307 in _pyupm_ds1307:
_pyupm_ds1307.DS1307_swigregister(DS1307)



