generic_platform: add name

This commit is contained in:
Sebastien Bourdeauducq 2013-02-14 20:02:35 +01:00
parent ed4d65f2be
commit 38c3566717
1 changed files with 4 additions and 1 deletions

View File

@ -163,10 +163,13 @@ class ConstraintManager:
self.request, self.platform_commands, self.io_signals = backup
class GenericPlatform:
def __init__(self, device, io, default_crg_factory=None):
def __init__(self, device, io, default_crg_factory=None, name=None):
self.device = device
self.constraint_manager = ConstraintManager(io)
self.default_crg_factory = default_crg_factory
if name is None:
name = self.__module__.split(".")[-1]
self.name = name
self.sources = []
def request(self, *args, **kwargs):