aqhome: Improved serial port handling, added parsers for different msg types.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#define AQH_SERIAL_H
|
||||
|
||||
#include <aqhome/api.h>
|
||||
#include "aqhome/msg.h"
|
||||
|
||||
#include <gwenhywfar/buffer.h>
|
||||
|
||||
@@ -24,7 +25,7 @@ extern "C" {
|
||||
typedef struct AQH_SERIAL AQH_SERIAL;
|
||||
|
||||
|
||||
typedef void (*AQH_SERIAL_PACKETRECEIVED_FN)(AQH_SERIAL *sr, const uint8_t *ptr, uint8_t len);
|
||||
typedef void (*AQH_SERIAL_PACKETRECEIVED_FN)(AQH_SERIAL *sr, AQH_MSG *msg);
|
||||
|
||||
|
||||
|
||||
@@ -44,6 +45,8 @@ AQHOME_API int AQH_Serial_SendPacket(AQH_SERIAL *sr, uint8_t destAddr, const uin
|
||||
|
||||
|
||||
AQHOME_API int AQH_Serial_Loop(AQH_SERIAL *sr);
|
||||
AQHOME_API int AQH_Serial_AddMessageToSend(AQH_SERIAL *sr, AQH_MSG *msg);
|
||||
|
||||
AQHOME_API int AQH_Serial_StartWriting(AQH_SERIAL *sr, const uint8_t *ptr, uint8_t len);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user