mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Merge pull request #9767 from Staars/MI32
prepare changes for ESP-idf > 4.0
This commit is contained in:
commit
18a6b8a34d
@ -204,8 +204,13 @@ IPAddress ETHClass::gatewayIP()
|
||||
|
||||
IPAddress ETHClass::dnsIP(uint8_t dns_no)
|
||||
{
|
||||
#ifdef ESP_IDF_VERSION_VAL //idf_version.h header file is only available in ESP-IDF v4.0 -> this is equal to: #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)
|
||||
const ip_addr_t *dns_ip = dns_getserver(dns_no);
|
||||
return IPAddress(dns_ip->u_addr.ip4.addr);
|
||||
#else
|
||||
ip_addr_t dns_ip = dns_getserver(dns_no);
|
||||
return IPAddress(dns_ip.u_addr.ip4.addr);
|
||||
#endif
|
||||
}
|
||||
|
||||
IPAddress ETHClass::broadcastIP()
|
||||
|
@ -264,7 +264,7 @@ void FreeRTOS::Semaphore::setName(std::string name) {
|
||||
* @param [in] length The amount of storage to allocate for the ring buffer.
|
||||
* @param [in] type The type of buffer. One of RINGBUF_TYPE_NOSPLIT, RINGBUF_TYPE_ALLOWSPLIT, RINGBUF_TYPE_BYTEBUF.
|
||||
*/
|
||||
#ifdef ESP_IDF_VERSION //Quick hack to detect if using IDF version that replaced ringbuf_type_t
|
||||
#if defined(ESP_IDF_VERSION) && !defined(ESP_IDF_VERSION_VAL) //Quick hack to detect if using IDF version that replaced ringbuf_type_t, ESP_IDF_VERSION_VAL is for IDF>4.0.0
|
||||
Ringbuffer::Ringbuffer(size_t length, RingbufferType_t type) {
|
||||
#else
|
||||
Ringbuffer::Ringbuffer(size_t length, ringbuf_type_t type) {
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
*/
|
||||
class Ringbuffer {
|
||||
public:
|
||||
#ifdef ESP_IDF_VERSION //Quick hack to detect if using IDF version that replaced ringbuf_type_t
|
||||
#if defined(ESP_IDF_VERSION) && !defined(ESP_IDF_VERSION_VAL) //Quick hack to detect if using IDF version that replaced ringbuf_type_t, ESP_IDF_VERSION_VAL is for IDF>4.0.0
|
||||
Ringbuffer(size_t length, RingbufferType_t type = RINGBUF_TYPE_NOSPLIT);
|
||||
#else
|
||||
Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user