Configure USHER's non-blocking flight-controller UART. More...
#include <errno.h>#include <fcntl.h>#include <stdio.h>#include <string.h>#include <termios.h>#include <unistd.h>
Go to the source code of this file.
Functions | |
| int | serial_init (const char *port_name) |
| Configure the shared non-blocking USHER UART descriptor. | |
Variables | |
| int | fd = -1 |
Detailed Description
Configure USHER's non-blocking flight-controller UART.
This module owns only the receive-side descriptor setup. Transmit buffering and concurrent writers are handled by serial_tx.c. Raw 8-bit mode is necessary because USHER frames are binary and can contain bytes that terminal line discipline would otherwise translate or consume.
Definition in file serial.c.
Function Documentation
◆ serial_init()
| int serial_init | ( | const char * | port_name | ) |
Configure the shared non-blocking USHER UART descriptor.
- Parameters
-
port_name UART device path.
- Returns
- 0 on success or a negative setup error.
The descriptor is set to raw 115200-bit/s 8-bit mode so line discipline cannot translate binary USHER framing bytes. This module owns descriptor setup only; concurrent transmission must use serial_tx.h.