examples/basic/uart: document `divisor` parameter.
authorReto Kramer <kramer@acm.org>
Thu, 22 Aug 2019 19:28:40 +0000 (12:28 -0700)
committerwhitequark <whitequark@whitequark.org>
Thu, 22 Aug 2019 19:28:40 +0000 (19:28 +0000)
examples/basic/uart.py

index bb5478e5ae287d5746debc55437554d67286cae6..060d2f9cd466439f32138be3f3b48dc618589669 100644 (file)
@@ -2,6 +2,13 @@ from nmigen import *
 
 
 class UART(Elaboratable):
+    """
+    Parameters
+    ----------
+    divisor : int
+        Set to ``round(clk-rate / baud-rate)``.
+        E.g. ``12e6 / 115200`` = ``104``.
+    """
     def __init__(self, divisor, data_bits=8):
         assert divisor >= 4