summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bg96.h9
-rw-r--r--include/serial.h6
2 files changed, 9 insertions, 6 deletions
diff --git a/include/bg96.h b/include/bg96.h
index 116b4ab..b304479 100644
--- a/include/bg96.h
+++ b/include/bg96.h
@@ -5,12 +5,13 @@ int powerOn(char *pathToPort, char *pathToChip, int statusPin, int pwrKeyPin);
int powerOff(char *pathToPort, char *pathToChip, int statusPin, int pwrKeyPin);
-int setupPublicConnection(char *pathToPort);
+int cfgPublicNetwork(char *pathToPort);
-int waitForConnection(char *pathToPort, int waitTimeSeconds);
+int waitForNetwork(char *pathToPort, int waitTimeSeconds);
-int tcpipInit(char *pathToPort);
+int mqttDisc(char *pathToPort);
-int tcpipClose(char *pathToPort);
+int mqttConn(char *pathToPort, char *hostURL, int hostPort, char *username,
+ char *password);
#endif
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