Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
serial.c File Reference

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>
Include dependency graph for serial.c:

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_nameUART 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.

Definition at line 41 of file serial.c.

Variable Documentation

◆ fd

int fd = -1

Shared UART descriptor used by legacy receive/transmit integration code.

Definition at line 39 of file serial.c.