X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fuart%2F__init__.py;h=d40a7c9cd8f9edd5f3c7db528439c3b5d369f541;hp=a8b73039916b505ad0e0b46aecb281943833d7e8;hb=35b380b1156434b73d4a976c68f5ab3604c8510a;hpb=3091f4e048d5baab17863b49f34f7a5b5149d709 diff --git a/decoders/uart/__init__.py b/decoders/uart/__init__.py index a8b7303..d40a7c9 100644 --- a/decoders/uart/__init__.py +++ b/decoders/uart/__init__.py @@ -19,13 +19,11 @@ ## ''' -UART protocol decoder. - -Universal Asynchronous Receiver Transmitter (UART) is a simple serial +UART (Universal Asynchronous Receiver Transmitter) is a simple serial communication protocol which allows two devices to talk to each other. This decoder should work on all "UART-like" async protocols with one -start bit (0), 7-9 databits, an (optional) parity bit, and one or more +start bit (0), 5-9 databits, an (optional) parity bit, and one or more stop bits (1), in this order. It can be run on one signal line (RX or TX) only, or on two lines (RX + TX). @@ -38,26 +36,6 @@ the correct place where to probe). Once the data is in digital form and matches the "UART" description above, this protocol decoder can work with it though, no matter whether the source was on TTL UART levels, or RS232, or others. - -Protocol output format: - -UART packet: -[, , ] - -This is the list of s and their respective : - - 'STARTBIT': The data is the (integer) value of the start bit (0/1). - - '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). - - 'PARITYBIT': The data is the (integer) value of the parity bit (0/1). - - 'STOPBIT': The data is the (integer) value of the stop bit (0 or 1). - - 'INVALID STARTBIT': The data is the (integer) value of the start bit (0/1). - - 'INVALID STOPBIT': The data is the (integer) value of the stop bit (0/1). - - '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. - - TODO: Frame error? - -The field is 0 for RX packets, 1 for TX packets. ''' from .pd import * -