Files
aqhomecontrol/aqhome/serial_p.h

40 lines
827 B
C

/****************************************************************************
* This file is part of the project AqHome.
* AqHome (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_SERIAL_P_H
#define AQH_SERIAL_P_H
#include "aqhome/serial.h"
#include <inttypes.h>
#define AQH_SERIAL_BUFFERSIZE 32
struct AQH_SERIAL {
char *deviceName;
int fd;
uint8_t address;
uint8_t readBuffer[AQH_SERIAL_BUFFERSIZE];
uint8_t bytesToRead;
uint8_t readPos;
uint8_t writeBuffer[AQH_SERIAL_BUFFERSIZE];
uint8_t bytesToWrite;
uint8_t writePos;
AQH_SERIAL_PACKETRECEIVED_FN packetReceivedFn;
};
#endif