projects
/
nmigen-boards.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8018f05
)
resources: allow UARTResource without control signals to have no role.
author
whitequark
<whitequark@whitequark.org>
Mon, 22 Jun 2020 15:07:54 +0000
(15:07 +0000)
committer
whitequark
<whitequark@whitequark.org>
Mon, 22 Jun 2020 15:07:54 +0000
(15:07 +0000)
nmigen_boards/resources/interface.py
patch
|
blob
|
history
diff --git
a/nmigen_boards/resources/interface.py
b/nmigen_boards/resources/interface.py
index 97489e202500b7d1b2a12c91f6f46954c0834df8..848e1b8a98ab96749d1e4e244d4d4262a851fe0a 100644
(file)
--- a/
nmigen_boards/resources/interface.py
+++ b/
nmigen_boards/resources/interface.py
@@
-6,7
+6,8
@@
__all__ = ["UARTResource", "IrDAResource", "SPIResource"]
def UARTResource(*args, rx, tx, rts=None, cts=None, dtr=None, dsr=None, dcd=None, ri=None,
conn=None, attrs=None, role=None):
- assert role in ("dce", "dte")
+ if any(line is not None for line in (rts, cts, dtr, dsr, dcd, ri)):
+ assert role in ("dce", "dte")
if role == "dte":
dce_to_dte = "i"
dte_to_dce = "o"