+#
+# Protocol output format:
+# put(<startsample>, <endsample>, self.out_proto, <packet>)
+#
+# The <packet> is a list with two entries:
+# [<packet-type>, <packet-data>]
+#
+# Valid packet-type values: T_START, T_DATA, T_PARITY, T_STOP, T_INVALID_START,
+# T_INVALID_STOP, T_PARITY_ERROR
+#
+# The packet-data field has the following format and meaning:
+# - T_START: The data is the (integer) value of the start bit (0 or 1).
+# - T_DATA: The data is the (integer) value of the UART data. Valid values
+# range from 0 to 512 (as the data can be up to 9 bits in size).
+# - T_PARITY: The data is the (integer) value of the parity bit (0 or 1).
+# - T_STOP: The data is the (integer) value of the stop bit (0 or 1).
+# - T_INVALID_START: The data is the (integer) value of the start bit (0 or 1).
+# - T_INVALID_STOP: The data is the (integer) value of the stop bit (0 or 1).
+# - T_PARITY_ERROR: The data is a tuple with two entries. The first one is
+# the expected parity value, the second is the actual parity value.
+#
+# Examples:
+# [T_START, 0]
+# [T_DATA, 65]
+# [T_PARITY, 0]
+# [T_STOP, 1]
+# [T_INVALID_START, 1]
+# [T_INVALID_STOP, 0]
+# [T_PARITY_ERROR, (0, 1)]
+#
+
+import sigrokdecode as srd