aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-10-25 18:22:05 +0200
committerlonkaars <loek@pipeframe.xyz>2022-10-25 18:22:05 +0200
commit97800dd398440f50dc48911ad27897c98193c056 (patch)
tree0e6722258fe8f27e8d362548e2b30fb3ee359e4d
parent7a1316483ff8962f581d686f4e812c7ec5a2b6cc (diff)
dummy function in server.h implemented
-rw-r--r--stm32f091/server.c56
-rw-r--r--stm32f091/server.h12
2 files changed, 8 insertions, 60 deletions
diff --git a/stm32f091/server.c b/stm32f091/server.c
index 4840527..de6ea50 100644
--- a/stm32f091/server.c
+++ b/stm32f091/server.c
@@ -3,55 +3,15 @@
#include <stdlib.h>
#include <string.h>
-#include "setup.h"
#include "server.h"
-#include "esp8266.h"
-void ws_server_demo() {
- uint8_t ok[]= "ok\r\n";
- uint8_t hier[]= "hier\r\n";
- //disconnect();//connect();//
+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 -> (ws_esp8622_at_send(data, channel) ?)
- ws_esp8266_StartEsp();
- HAL_UART_Transmit(&huart2, hier,sizeof(hier),1000);
- ws_esp8266_close();
- HAL_UART_Transmit(&huart2, hier,sizeof(hier),1000);
- ws_esp8266_serveruit();
- HAL_UART_Transmit(&huart2, hier,sizeof(hier),1000);
- ws_esp8266_mux();
- HAL_UART_Transmit(&huart2, hier,sizeof(hier),1000);
- ws_esp8266_mode();
- HAL_UART_Transmit(&huart2, hier,sizeof(hier),1000);
-
- ws_esp8266_serveraan();
- HAL_UART_Transmit(&huart2, ok,sizeof(ok),1000);
- uint8_t receive[24]={0};
- uint8_t sendToQTData[]="gelukt";
- uint8_t test[]="test";
- //int ret;
- //ATsendCommand(sendToQTData);
- while (1)
- {
-
- if(receive[0]=='\0')
- {
- HAL_UART_Receive_IT(&huart1, receive, 24);
- }
- else
- {
- HAL_UART_Transmit(&huart2, test,strlen((char*)test),1000);
- HAL_Delay(5000);
-
- // if(receivingMsg(receive, 24)==1)
- // {
- // ret=1;
- ws_esp8266_ATsendCommand(sendToQTData);
- ws_esp8266_close();
- memset(receive,0,24);
- //}
- }
-
-
-
- }
+ return;
}
diff --git a/stm32f091/server.h b/stm32f091/server.h
index e134079..6041ef6 100644
--- a/stm32f091/server.h
+++ b/stm32f091/server.h
@@ -3,11 +3,6 @@
#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
*
@@ -20,10 +15,3 @@
*/
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
-