AqHome: Added a test for sending/receiving asynchronously.

This commit is contained in:
Martin Preuss
2023-01-25 21:47:06 +01:00
parent 3ae1fbbe0d
commit 68ce45428f
4 changed files with 273 additions and 3 deletions

View File

@@ -14,10 +14,24 @@
#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;
};