Skip to content

Commit cb753e6

Browse files
author
Victor Ho
committed
for adapte to idf 4.1
1 parent d2761a9 commit cb753e6

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

cores/esp32/esp32-hal-gpio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ typedef struct {
9191
static InterruptHandle_t __pinInterruptHandlers[GPIO_PIN_COUNT] = {0,};
9292

9393
#include "driver/rtc_io.h"
94-
94+
#define ESP_REG(addr) *((volatile uint32_t *)(addr))
9595
extern void IRAM_ATTR __pinMode(uint8_t pin, uint8_t mode)
9696
{
9797

libraries/ESPmDNS/src/ESPmDNS.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ bool MDNSResponder::addServiceTxt(char *name, char *proto, char *key, char *valu
171171
}
172172

173173
IPAddress MDNSResponder::queryHost(char *host, uint32_t timeout){
174-
struct ip4_addr addr;
174+
struct esp_ip4_addr addr;
175175
addr.addr = 0;
176176

177177
esp_err_t err = mdns_query_a(host, timeout, &addr);

libraries/WiFi/src/WiFiAP.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ extern "C" {
3737
#include <esp_wifi.h>
3838
#include <esp_event_loop.h>
3939
#include <lwip/ip_addr.h>
40+
#include <tcpip_adapter.h>
41+
#include <tcpip_adapter_types.h>
4042
#include "dhcpserver/dhcpserver_options.h"
4143
}
4244

@@ -166,8 +168,8 @@ bool WiFiAPClass::softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress
166168
lease.end_ip.addr = static_cast<uint32_t>(local_ip) + (11 << 24);
167169

168170
tcpip_adapter_dhcps_option(
169-
(tcpip_adapter_option_mode_t)TCPIP_ADAPTER_OP_SET,
170-
(tcpip_adapter_option_id_t)REQUESTED_IP_ADDRESS,
171+
(tcpip_adapter_dhcp_option_mode_t)TCPIP_ADAPTER_OP_SET,
172+
(tcpip_adapter_dhcp_option_id_t)REQUESTED_IP_ADDRESS,
171173
(void*)&lease, sizeof(dhcps_lease_t)
172174
);
173175

0 commit comments

Comments
 (0)