LwIP v2 support
This commit is contained in:
parent
1cfded6389
commit
cd23acaa4a
39 changed files with 1357 additions and 664 deletions
|
@ -3,9 +3,6 @@
|
|||
Copyright (C) 2015 Espressif Systems. Derived from MIT Licensed SDK libraries.
|
||||
BSD Licensed as described in the file LICENSE
|
||||
*/
|
||||
#include "open_esplibs.h"
|
||||
#if OPEN_LIBMAIN_USER_INTERFACE
|
||||
// The contents of this file are only built if OPEN_LIBMAIN_USER_INTERFACE is set to true
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
@ -147,8 +144,8 @@ bool IRAM sdk_system_rtc_mem_read(uint32_t src_addr, void *des_addr, uint16_t sa
|
|||
return true;
|
||||
}
|
||||
|
||||
void sdk_system_pp_recycle_rx_pkt(void *eb) {
|
||||
sdk_ppRecycleRxPkt(eb);
|
||||
void sdk_system_pp_recycle_rx_pkt(struct esf_buf *esf_buf) {
|
||||
sdk_ppRecycleRxPkt(esf_buf);
|
||||
}
|
||||
|
||||
uint16_t sdk_system_adc_read(void) {
|
||||
|
@ -471,8 +468,7 @@ uint32_t sdk_system_relative_time(uint32_t reltime) {
|
|||
return WDEV.SYS_TIME - reltime;
|
||||
}
|
||||
|
||||
// Change arg types to ip4_addr for lwip v2.
|
||||
void sdk_system_station_got_ip_set(struct ip_addr *ip, struct ip_addr *mask, struct ip_addr *gw) {
|
||||
void sdk_system_station_got_ip_set(struct ip4_addr *ip, struct ip4_addr *mask, struct ip4_addr *gw) {
|
||||
uint8_t *ip_bytes = (uint8_t *)&ip->addr;
|
||||
uint8_t *mask_bytes = (uint8_t *)&mask->addr;
|
||||
uint8_t *gw_bytes = (uint8_t *)&gw->addr;
|
||||
|
@ -588,9 +584,9 @@ bool sdk_wifi_get_ip_info(uint8_t if_index, struct ip_info *info) {
|
|||
if (!info) return false;
|
||||
struct netif *netif = _get_netif(if_index);
|
||||
if (netif) {
|
||||
info->ip = netif->ip_addr;
|
||||
info->netmask = netif->netmask;
|
||||
info->gw = netif->gw;
|
||||
ip4_addr_set(&info->ip, ip_2_ip4(&netif->ip_addr));
|
||||
ip4_addr_set(&info->netmask, ip_2_ip4(&netif->netmask));
|
||||
ip4_addr_set(&info->gw, ip_2_ip4(&netif->gw));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -719,5 +715,3 @@ bool sdk_wifi_set_sleep_type(enum sdk_sleep_type type)
|
|||
sdk_pm_set_sleep_type_from_upper(type);
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif /* OPEN_LIBMAIN_USER_INTERFACE */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue