""" Description of a site type """

from collections import namedtuple
import enum


class SitePinDirection(enum.Enum):
    IN = "IN"
    OUT = "OUT"


SiteTypePin = namedtuple('SiteTypePin', 'name direction')


class SiteType(object):
    def __init__(self, site_type):
        self.type = site_type['type']
        self.site_pins = {}
        for site_pin, site_pin_info in site_type['site_pins'].items():
            self.site_pins[site_pin] = SiteTypePin(
                name=site_pin,
                direction=SitePinDirection(site_pin_info['direction']),
            )

    def get_site_pins(self):
        return self.site_pins.keys()

    def get_site_pin(self, site_pin):
        return self.site_pins[site_pin]

""" Description of a site type """

from collections import namedtuple
import enum


class SitePinDirection(enum.Enum):
    IN = "IN"
    OUT = "OUT"
    INOUT = "INOUT"


SiteTypePin = namedtuple('SiteTypePin', 'name direction')


class SiteType(object):
    def __init__(self, site_type):
        self.type = site_type['type']
        self.site_pins = {}
        for site_pin, site_pin_info in site_type['site_pins'].items():
            self.site_pins[site_pin] = SiteTypePin(
                name=site_pin,
                direction=SitePinDirection(site_pin_info['direction']),
            )

    def get_site_pins(self):
        return self.site_pins.keys()

    def get_site_pin(self, site_pin):
        return self.site_pins[site_pin]

Add INOUT to direction enum.
prjxray: Add INOUT to direction enum.

INOUT is found on the PS7 interface on the Zynq.

Signed-off-by: Tim 'mithro' Ansell <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@mith.ro>
