aqhome: Improved serial port handling, added parsers for different msg types.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "aqhome/serial.h"
|
||||
|
||||
#include <termios.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
|
||||
@@ -22,14 +23,14 @@ struct AQH_SERIAL {
|
||||
char *deviceName;
|
||||
int fd;
|
||||
uint8_t address;
|
||||
int intendedAttnState;
|
||||
|
||||
uint8_t readBuffer[AQH_SERIAL_BUFFERSIZE];
|
||||
uint8_t bytesToRead;
|
||||
uint8_t readPos;
|
||||
AQH_MSG *currentlyReceivedMsg;
|
||||
|
||||
uint8_t writeBuffer[AQH_SERIAL_BUFFERSIZE];
|
||||
uint8_t bytesToWrite;
|
||||
uint8_t writePos;
|
||||
AQH_MSG_LIST *receivedMessageList;
|
||||
AQH_MSG_LIST *sendMessageList;
|
||||
|
||||
struct termios previousOptions;
|
||||
|
||||
AQH_SERIAL_PACKETRECEIVED_FN packetReceivedFn;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user