aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/server.h
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-10-24 18:12:11 +0200
committerlonkaars <loek@pipeframe.xyz>2022-10-24 18:12:11 +0200
commit183ed1e4c58f0c788db0b56886aad2dc258e9ddb (patch)
tree2497165a5e656077180de365748c45286b0724e4 /stm32f091/server.h
parented1c1efa7aee67d36a37212c13998318f02c4350 (diff)
server port in consts.h + function signature for incoming esp data
Diffstat (limited to 'stm32f091/server.h')
-rw-r--r--stm32f091/server.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/stm32f091/server.h b/stm32f091/server.h
index 6a3501d..e134079 100644
--- a/stm32f091/server.h
+++ b/stm32f091/server.h
@@ -1,6 +1,29 @@
#pragma once
-void ws_server_demo();
+#include <stdlib.h>
+#include <stdint.h>
+
+// void ws_server_demo();
+//
+// /** FreeRTOS task that listens for incoming requests from the esp */
+// void ws_server_listen_task();
+
+/**
+ * @brief +IPD incoming request handler
+ *
+ * this function takes chunks of data from the esp8266 and parses +IPD
+ * commands. when a valid +IPD command is detected, it gets forwarded to
+ * ws_protocol_parse_req_byte.
+ *
+ * @param data pointer to data array
+ * @param size amount of bytes allowed to be read from `data`
+ */
+void ws_server_req_incoming(uint8_t* data, size_t size);
+
+// TODO: server req incoming implementation
+//
+// example +IPD command:
+// +IPD,0,15:last-records 5\n
+//
+// TODO: protocol req response parser
-/** FreeRTOS task that listens for incoming requests from the esp */
-void ws_server_listen_task();