mirror of
https://github.com/thelsing/knx.git
synced 2025-01-30 00:19:01 +01:00
68b0002490
* 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
39 lines
904 B
C++
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
|