Update main.c
This commit is contained in:
parent
c1ed0ae0a6
commit
0b94c99567
1 changed files with 11 additions and 11 deletions
|
@ -13,6 +13,17 @@
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
#include "lwip/sys.h"
|
#include "lwip/sys.h"
|
||||||
|
|
||||||
|
static const char *WIFI_TAG = "wifi station";
|
||||||
|
static const char *SERVER_TAG = "http server";
|
||||||
|
|
||||||
|
int my_hook(struct pbuf *pbuf, struct netif *input_netif)
|
||||||
|
{
|
||||||
|
ESP_LOGI(WIFI_TAG, "TESTING!");
|
||||||
|
return ESP_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LWIP_HOOK_IP4_INPUT(pbuf, input_netif) my_hook(pbuf, input_netif)
|
||||||
|
|
||||||
/* FreeRTOS event group to signal when we are connected*/
|
/* FreeRTOS event group to signal when we are connected*/
|
||||||
static EventGroupHandle_t s_wifi_event_group;
|
static EventGroupHandle_t s_wifi_event_group;
|
||||||
|
|
||||||
|
@ -22,9 +33,6 @@ static EventGroupHandle_t s_wifi_event_group;
|
||||||
#define WIFI_CONNECTED_BIT BIT0
|
#define WIFI_CONNECTED_BIT BIT0
|
||||||
#define WIFI_FAIL_BIT BIT1
|
#define WIFI_FAIL_BIT BIT1
|
||||||
|
|
||||||
static const char *WIFI_TAG = "wifi station";
|
|
||||||
static const char *SERVER_TAG = "http server";
|
|
||||||
|
|
||||||
static int s_retry_num = 0;
|
static int s_retry_num = 0;
|
||||||
|
|
||||||
static void event_handler(void *arg, esp_event_base_t event_base,
|
static void event_handler(void *arg, esp_event_base_t event_base,
|
||||||
|
@ -118,14 +126,6 @@ void wifi_init_sta(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int my_hook(struct pbuf *pbuf, struct netif *input_netif)
|
|
||||||
{
|
|
||||||
ESP_LOGI(WIFI_TAG, "TESTING!");
|
|
||||||
return ESP_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LWIP_HOOK_IP4_INPUT(pbuf, input_netif) my_hook(pbuf, input_netif)
|
|
||||||
|
|
||||||
static esp_err_t hello_get_handler(httpd_req_t *req)
|
static esp_err_t hello_get_handler(httpd_req_t *req)
|
||||||
{
|
{
|
||||||
/* Send response with custom headers and body set as the
|
/* Send response with custom headers and body set as the
|
||||||
|
|
Reference in a new issue