From 15b34952c44f19e6e31d81096c6ee43b6f1a201d Mon Sep 17 00:00:00 2001 From: kutayboz Date: Mon, 12 Jun 2023 00:16:46 +0300 Subject: Working MQTT publishing --- include/serial.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/serial.h') diff --git a/include/serial.h b/include/serial.h index ccf0c6e..033fd54 100644 --- a/include/serial.h +++ b/include/serial.h @@ -1,9 +1,11 @@ #ifndef __INCLUDE_SERIAL__ #define __INCLUDE_SERIAL__ +typedef enum { SUCCESS, ERROR_READ, ERROR_TIMEOUT } SERIAL_RETURN_CODE; + int openSerialPort(char pathToPort[]); -int querySerialPort(char **output, int serialPort, char *input, - int timeoutSeconds); +SERIAL_RETURN_CODE querySerialPort(char **output, int serialPort, char *input, + int timeoutSeconds, char *lastLineSubStr); #endif -- cgit v1.3