diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 64b4bbf..0000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "ESP8266_RTOS_SDK"] - path = ESP8266_RTOS_SDK - url = https://github.com/windowsair/ESP8266_RTOS_SDK.git -[submodule "components/corsacOTA"] - path = components/corsacOTA - url = https://github.com/windowsair/corsacOTA.git diff --git a/components/dap_proxy/DAP_handle.c b/components/dap_proxy/DAP_handle.c index 510d7a6..a179ee2 100644 --- a/components/dap_proxy/DAP_handle.c +++ b/components/dap_proxy/DAP_handle.c @@ -46,6 +46,7 @@ typedef struct int kRestartDAPHandle = NO_SIGNAL; +TaskHandle_t kDAPTaskHandle = NULL; static DapPacket_t DAPDataProcessed; @@ -103,11 +104,13 @@ void handle_dap_data_request(usbip_stage2_header *header, uint32_t length) // always send constant size buf -> cuz we don't care about the IN packet size // and to unify the style, we set aside the length of the section xRingbufferSend(dap_dataIN_handle, data_in - sizeof(uint32_t), DAP_HANDLE_SIZE, portMAX_DELAY); + xTaskNotifyGive(kDAPTaskHandle); #else send_stage2_submit_data_fast(header, NULL, 0); xRingbufferSend(dap_dataIN_handle, data_in, DAP_HANDLE_SIZE, portMAX_DELAY); + xTaskNotifyGive(kDAPTaskHandle); #endif @@ -150,6 +153,7 @@ void DAP_Thread(void *argument) dap_dataIN_handle = xRingbufferCreate(DAP_HANDLE_SIZE * DAP_BUFFER_NUM, RINGBUF_TYPE_BYTEBUF); dap_dataOUT_handle = xRingbufferCreate(DAP_HANDLE_SIZE * DAP_BUFFER_NUM, RINGBUF_TYPE_BYTEBUF); data_response_mux = xSemaphoreCreateMutex(); + kDAPTaskHandle = xTaskGetCurrentTaskHandle(); size_t packetSize; int resLength; DapPacket_t *item; diff --git a/components/dap_proxy/tcp_server.c b/components/dap_proxy/tcp_server.c index c6ec15a..1e1a76a 100644 --- a/components/dap_proxy/tcp_server.c +++ b/components/dap_proxy/tcp_server.c @@ -21,6 +21,7 @@ #include "lwip/err.h" #include "lwip/sockets.h" +extern TaskHandle_t kDAPTaskHandle; extern int kRestartDAPHandle; int kSock = -1; @@ -141,6 +142,8 @@ cleanup: el_process_buffer_free(); kRestartDAPHandle = RESET_HANDLE; + if (kDAPTaskHandle) + xTaskNotifyGive(kDAPTaskHandle); //shutdown(listen_sock, 0); //close(listen_sock);