# Path: IoTPy/errors.py
# class IoTPy_APIError(Exception):
#     pass


from IoTPy.errors import IoTPy_APIError
from six import string_types
import collections
        prototype = T(**default_values)
    else:
        prototype = T(*default_values)
    T.__new__.__defaults__ = tuple(prototype)
    return T

CAP_RESERVED = 0x0
CAP_GPIO     = 0x1
CAP_ADC      = 0x2
CAP_PWM      = 0x4
CAP_SPI      = 0x8
CAP_UART     = 0x10
CAP_I2C      = 0x20

"""
named tuple Pin for storing pinID, capabilities and extra info such us PWM bank or ADC pin no and similar.
"""
Pin = namedtuple_with_defaults('Pin','pinID, capabilities, extra', [None, CAP_GPIO, None])

class IoPinout(dict):
    """
    A dictionary consisting of integer or basestring keys and named tuple Pin
    """
    def __init__(self, *args, **kw):
        super(IoPinout,self).__init__(*args, **kw)
        for key in self:
            if not (isinstance(key, int) or isinstance(key, string_types)) or not isinstance(self[key], Pin):
                raise IoTPy_APIError("IoPinout must consist of integer or string keys and Pin values.")

    def __delitem__(self, key):

# Path: IoTPy/errors.py
# class IoTPy_APIError(Exception):
#     pass


# Path: IoTPy/pinmaps.py
from IoTPy.errors import IoTPy_APIError
from six import string_types
import collections

        prototype = T(**default_values)
    else:
        prototype = T(*default_values)
    T.__new__.__defaults__ = tuple(prototype)
    return T

CAP_RESERVED = 0x0
CAP_GPIO     = 0x1
CAP_ADC      = 0x2
CAP_PWM      = 0x4
CAP_SPI      = 0x8
CAP_UART     = 0x10
CAP_I2C      = 0x20

"""
named tuple Pin for storing pinID, capabilities and extra info such us PWM bank or ADC pin no and similar.
"""
Pin = namedtuple_with_defaults('Pin','pinID, capabilities, extra', [None, CAP_GPIO, None])

class IoPinout(dict):
    """
    A dictionary consisting of integer or basestring keys and named tuple Pin
    """
    def __init__(self, *args, **kw):
        super(IoPinout,self).__init__(*args, **kw)
        for key in self:
            if not (isinstance(key, int) or isinstance(key, string_types)) or not isinstance(self[key], Pin):
                raise IoTPy_APIError("IoPinout must consist of integer or string keys and Pin values.")

    def __delitem__(self, key):

        raise IoTPy_APIError("IoPinout can not be modified.")