Larus glider flight sensor system 3.9.2024
Software-In-The-Loop test and validation system
Loading...
Searching...
No Matches
USB_serial.cpp File Reference

Interface to USB -> RS232 (implementation) More...

#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include <stdint.h>
#include "USB_serial.h"

Go to the source code of this file.

Functions

int set_interface_attribs (int fd, int speed, int parity)
 
void set_blocking (int fd, int should_block)
 
bool open_USB_serial (char *portname)
 
bool write_usb_serial (uint8_t *data, unsigned size)
 

Variables

int fd
 

Detailed Description

Interface to USB -> RS232 (implementation)

Author
Dr. Klaus Schaefer

<Larus Flight Sensor Firmware>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file USB_serial.cpp.

Function Documentation

◆ open_USB_serial()

bool open_USB_serial ( char portname)

Definition at line 91 of file USB_serial.cpp.

References fd, set_blocking(), and set_interface_attribs().

◆ set_blocking()

void set_blocking ( int  fd,
int  should_block 
)

Definition at line 78 of file USB_serial.cpp.

References fd.

Referenced by open_USB_serial().

◆ set_interface_attribs()

int set_interface_attribs ( int  fd,
int  speed,
int  parity 
)

Definition at line 48 of file USB_serial.cpp.

References fd.

Referenced by open_USB_serial().

◆ write_usb_serial()

bool write_usb_serial ( uint8_t data,
unsigned  size 
)

Definition at line 103 of file USB_serial.cpp.

References fd.

Referenced by CAN_send().

Variable Documentation

◆ fd

int fd