UART init
Block to initialize a UART channel
Description
The block initializes a UART channel with the communication settings as specified by the parameters.
Parameters
- Channel
- Select the UART channel
- Baudrate
- Select the UART baudrate
- Databits
- Select the number of databits to use.
- Parity
- Select the desired parity.
- Stopbits
- Select the number of stopbits to use.
- Transmit buffer size
- Configure the number of bytes the transmit buffer can hold. When the block to transmit a byte is called faster
than the byte can be physically transmitted via the UART interface, it will be placed in this buffer. Once the
previous byte transmission completes, the next byte in the buffer will automatically be transmitted. Note that
the buffer is allocated on the heap.
- Receive buffer size
- Configure the number of bytes the receptoin buffer can hold. Each time a byte is received it is stored in the
buffer. When the block to receive a byte is called, it will read the next byte from the buffer. Note that
the buffer is allocated on the heap.
- Use status output
- Enables/disables the status output port of the block.
Output
If this output has a value of 0, the UART driver could not be initialized. This happens if no space could be allocated
on the heap for the transmit and/or receive buffer. Use the 'Get free heap' block to verify that enough space is available
on the heap.
The used datatype is boolean.