aqhome, aqhome-apps: cleanup, removed unneeded files.

This commit is contained in:
Martin Preuss
2025-03-14 21:22:48 +01:00
parent 31d8cb10df
commit 7e745c98e6
194 changed files with 292 additions and 17295 deletions

38
aqhome/ipc2/tty_object.h Normal file
View File

@@ -0,0 +1,38 @@
/****************************************************************************
* This file is part of the project Gwenhywfar.
* Gwenhywfar (c) by 2023 Martin Preuss, all rights reserved.
*
* The license for this file can be found in the file COPYING which you
* should have received along with this file.
****************************************************************************/
#ifndef AQH_TTYOBJECT_H
#define AQH_TTYOBJECT_H
#include <aqhome/events2/object.h>
#include <termios.h>
/**
* Create Tty object for given filedescriptor and in given mode (read or write)
*
* @return object created
* @param eventLoop event loop to assign the new object to
* @param fd filedescriptor (e.g. created by calls to open or socket)
* @param fdMode AQH_FDOBJECT_FDMODE_READ or AQH_FDOBJECT_FDMODE_WRITE
*/
AQHOME_API AQH_OBJECT *AQH_TtyObject_new(AQH_EVENT_LOOP *eventLoop, int fd, int fdMode);
/**
* Open given device and setup TTY parameters for it.
*
* @return filedescriptor for the openened and initialized device
* @param device path to device to open (e.g. "/dev/ttyUSB0")
* @param initialTermiosState var to store initial state of the device (if given)
*/
AQHOME_API int AQH_TtyObject_OpenAndInitDevice(const char *device, struct termios *initialTermiosState);
#endif