mirror of
https://github.com/thelsing/knx.git
synced 2025-09-23 17:51:00 +02:00
Fix arduino build for ESP32
This commit is contained in:
parent
e3f5329ea5
commit
ef7f6fc1ad
@ -1,3 +1,4 @@
|
||||
#ifndef ARDUINO
|
||||
#ifdef ESP_PLATFORM
|
||||
// esp32_idf_platform.cpp
|
||||
#include <esp_system.h>
|
||||
@ -428,4 +429,5 @@ void attachInterrupt(uint32_t pin, IsrFuncPtr callback, uint32_t mode)
|
||||
ESP_ERROR_CHECK(gpio_isr_handler_add((gpio_num_t)pin, isr_wrapper, (void*)callback));
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // ESP_PLATFORM
|
||||
#endif // !ARDUINO
|
@ -1,3 +1,4 @@
|
||||
#ifndef ARDUINO
|
||||
#ifdef ESP_PLATFORM
|
||||
// esp_idf_platform.h
|
||||
#pragma once
|
||||
@ -83,3 +84,4 @@ class Esp32IdfPlatform : public Platform
|
||||
const char* _nvs_key = "eeprom";
|
||||
};
|
||||
#endif
|
||||
#endif
|
@ -178,6 +178,7 @@ uint16_t crc16Dnp(uint8_t* input, uint16_t length)
|
||||
}
|
||||
|
||||
// Produce Arduino print and println in ESP IDF for ESP32 family using printf().
|
||||
#ifndef ARDUINO
|
||||
#ifdef ESP_PLATFORM
|
||||
// Helper function to print a number in binary format
|
||||
static void print_binary(unsigned long long n)
|
||||
@ -360,3 +361,4 @@ void println(double num) {
|
||||
println();
|
||||
}
|
||||
#endif // ESP_PLATFORM
|
||||
#endif // !ARDUINO
|
||||
|
Loading…
Reference in New Issue
Block a user