knx/src/esp_platform.h
Bernator 68b0002490 Arduino set Knx uart bugfix (#32)
* bugfix, print not allowed in constructor

* Update tpuart_data_link_layer.cpp

- start confirm timout only after last byte was sent
- increase BYTE_TIMEOUT

* -bugfix Arduino set knxUart

* Update knx-bme680.ino

* Update knx-demo.ino

* Update knx-hdc1008.ino

* Update knx-sonoffS20.ino

* Update knx-bme680.ino

* Update knx-demo.ino

* Update arduino_platform.cpp

* Update dpt.h

* Update esp32_platform.h

* Update esp_platform.h
2019-09-09 18:19:09 +02:00

39 lines
904 B
C++

#ifdef ARDUINO_ARCH_ESP8266
#include "arduino_platform.h"
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
class EspPlatform : public ArduinoPlatform
{
using ArduinoPlatform::_mulitcastAddr;
using ArduinoPlatform::_mulitcastPort;
public:
EspPlatform();
EspPlatform( HardwareSerial* s);
// ip stuff
uint32_t currentIpAddress() override;
uint32_t currentSubnetMask() override;
uint32_t currentDefaultGateway() override;
void macAddress(uint8_t* addr) override;
// basic stuff
void restart();
//multicast
void setupMultiCast(uint32_t addr, uint16_t port) override;
void closeMultiCast() override;
bool sendBytes(uint8_t* buffer, uint16_t len) override;
int readBytes(uint8_t* buffer, uint16_t maxLen) override;
//memory
uint8_t* getEepromBuffer(uint16_t size);
void commitToEeprom();
private:
WiFiUDP _udp;
};
#endif