mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
components: lwip/tcpip_adapter/freertos/esp32
Replace os_printf with printf
This commit is contained in:
@@ -69,7 +69,7 @@ enum dyc_dhcps_flags{
|
||||
#define DHCPS_DEBUG 0
|
||||
#define DHCPS_LOG printf
|
||||
|
||||
#define DYC_DHCP_CRASH //os_printf
|
||||
#define DYC_DHCP_CRASH //printf
|
||||
|
||||
|
||||
#define MAX_STATION_NUM 8
|
||||
@@ -376,7 +376,7 @@ u32_t magic_cookie_temp = magic_cookie;
|
||||
|
||||
//extern bool system_get_string_from_flash(void *flash_str, void* ram_str,uint8 ram_str_len);
|
||||
//system_get_string_from_flash((void *)(&magic_cookie), (void *)(&magic_cookie_temp),4);
|
||||
//os_printf("ck_tmp3:%08X\n",magic_cookie_temp);
|
||||
//printf("ck_tmp3:%08X\n",magic_cookie_temp);
|
||||
|
||||
//memcpy((char *) m->options, &magic_cookie, sizeof(magic_cookie));
|
||||
memcpy((char *) m->options, &magic_cookie_temp, sizeof(magic_cookie_temp));
|
||||
@@ -698,7 +698,7 @@ static s16_t parse_msg(struct dhcps_msg *m, u16_t len)
|
||||
//u32 magic_cookie_temp = magic_cookie;
|
||||
//extern bool system_get_string_from_flash(void *flash_str, void* ram_str,uint8 ram_str_len);
|
||||
//system_get_string_from_flash((void *)(&magic_cookie), (void *)(&magic_cookie_temp),4);
|
||||
//os_printf("ck_tmp4:%08X\n",magic_cookie_temp);
|
||||
//printf("ck_tmp4:%08X\n",magic_cookie_temp);
|
||||
|
||||
if(memcmp((char *)m->options,
|
||||
&magic_cookie,
|
||||
@@ -726,7 +726,7 @@ static s16_t parse_msg(struct dhcps_msg *m, u16_t len)
|
||||
for (pback_node = plist; pback_node != NULL;pback_node = pback_node->pnext) {
|
||||
pdhcps_pool = pback_node->pnode;
|
||||
if (memcmp(pdhcps_pool->mac, m->chaddr, sizeof(pdhcps_pool->mac)) == 0){
|
||||
// os_printf("the same device request ip\n");
|
||||
// printf("the same device request ip\n");
|
||||
if (memcmp(&pdhcps_pool->ip.addr, m->ciaddr, sizeof(pdhcps_pool->ip.addr)) == 0) {
|
||||
renew = true;
|
||||
}
|
||||
@@ -736,7 +736,7 @@ static s16_t parse_msg(struct dhcps_msg *m, u16_t len)
|
||||
goto POOL_CHECK;
|
||||
} else if (pdhcps_pool->ip.addr == client_address_plus.addr){
|
||||
// client_address.addr = client_address_plus.addr;
|
||||
// os_printf("the ip addr has been request\n");
|
||||
// printf("the ip addr has been request\n");
|
||||
addr_tmp.addr = htonl(client_address_plus.addr);
|
||||
addr_tmp.addr++;
|
||||
client_address_plus.addr = htonl(addr_tmp.addr);
|
||||
@@ -967,7 +967,7 @@ static void wifi_softap_init_dhcps_lease(u32_t ip)
|
||||
dhcps_lease.start_ip.addr = htonl(dhcps_lease.start_ip.addr);
|
||||
dhcps_lease.end_ip.addr= htonl(dhcps_lease.end_ip.addr);
|
||||
}
|
||||
// os_printf("start_ip = 0x%x, end_ip = 0x%x\n",dhcps_lease.start_ip, dhcps_lease.end_ip);
|
||||
// printf("start_ip = 0x%x, end_ip = 0x%x\n",dhcps_lease.start_ip, dhcps_lease.end_ip);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -459,7 +459,7 @@ dhcp_fine_tmr(void)
|
||||
#if 0
|
||||
if (DHCP_MAXRTX != 0) {
|
||||
if (netif->dhcp->tries >= DHCP_MAXRTX){
|
||||
//os_printf("DHCP timeout\n");
|
||||
//printf("DHCP timeout\n");
|
||||
if (netif->dhcp_event != NULL)
|
||||
netif->dhcp_event();
|
||||
break;
|
||||
|
||||
@@ -88,8 +88,8 @@ bool dhcp_search_ip_on_mac(u8_t *mac, ip4_addr_t *ip);
|
||||
#define DHCPS_DEBUG 1
|
||||
#if DHCPS_DEBUG
|
||||
#define log_info(message, ...) do { \
|
||||
os_printf((message), ##__VA_ARGS__); \
|
||||
os_printf("\n"); \
|
||||
printf((message), ##__VA_ARGS__); \
|
||||
printf("\n"); \
|
||||
} while(0);
|
||||
|
||||
#else
|
||||
|
||||
@@ -505,7 +505,7 @@ int lwip_fcntl(int s, int cmd, int val);
|
||||
#if LWIP_COMPAT_SOCKETS
|
||||
#if LWIP_COMPAT_SOCKETS != 2
|
||||
|
||||
#ifdef LWIP_THREAD_SAFE
|
||||
#if LWIP_THREAD_SAFE
|
||||
|
||||
int lwip_accept_r(int s, struct sockaddr *addr, socklen_t *addrlen);
|
||||
int lwip_bind_r(int s, const struct sockaddr *name, socklen_t namelen);
|
||||
|
||||
@@ -65,21 +65,7 @@ typedef int sys_prot_t;
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
//#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0)
|
||||
#if 1//def ESP32_WORKAROUND
|
||||
extern SemaphoreHandle_t stdio_mutex_tx;
|
||||
#define LWIP_PLATFORM_DIAG(message)\
|
||||
do{\
|
||||
if (!stdio_mutex_tx) {\
|
||||
stdio_mutex_tx = xSemaphoreCreateMutex();\
|
||||
}\
|
||||
\
|
||||
xSemaphoreTake(stdio_mutex_tx, portMAX_DELAY);\
|
||||
ets_printf message;\
|
||||
xSemaphoreGive(stdio_mutex_tx);\
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0)
|
||||
#define LWIP_PLATFORM_ASSERT(x) do {printf(x); sys_arch_assert(__FILE__, __LINE__);} while(0)
|
||||
|
||||
//#define LWIP_DEBUG
|
||||
|
||||
@@ -222,7 +222,6 @@ extern unsigned long os_random(void);
|
||||
* (2 * TCP_MSS) for things to work well
|
||||
*/
|
||||
#ifdef PERF
|
||||
|
||||
extern unsigned char misc_prof_get_tcpw(void);
|
||||
extern unsigned char misc_prof_get_tcp_snd_buf(void);
|
||||
#define TCP_WND (misc_prof_get_tcpw()*TCP_MSS)
|
||||
@@ -470,7 +469,7 @@ extern unsigned char misc_prof_get_tcp_snd_buf(void);
|
||||
/**
|
||||
* SOCKETS_DEBUG: Enable debugging in sockets.c.
|
||||
*/
|
||||
#define SOCKETS_DEBUG LWIP_DBG_OFF
|
||||
#define SOCKETS_DEBUG LWIP_DBG_ON
|
||||
|
||||
/**
|
||||
* ICMP_DEBUG: Enable debugging in icmp.c.
|
||||
|
||||
Reference in New Issue
Block a user