mirror of
https://github.com/thelsing/knx.git
synced 2025-08-22 13:46:21 +02:00
added overload to platform constructors for custom HardwareSerial-object
This commit is contained in:
parent
5a93bbc91c
commit
4101e15a91
@ -6,11 +6,14 @@
|
|||||||
|
|
||||||
#include "knx/bits.h"
|
#include "knx/bits.h"
|
||||||
|
|
||||||
|
|
||||||
Esp32Platform::Esp32Platform() : ArduinoPlatform(Serial)
|
Esp32Platform::Esp32Platform() : ArduinoPlatform(Serial)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Esp32Platform::Esp32Platform( HardwareSerial& s) : ArduinoPlatform(s)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t Esp32Platform::currentIpAddress()
|
uint32_t Esp32Platform::currentIpAddress()
|
||||||
{
|
{
|
||||||
return WiFi.localIP();
|
return WiFi.localIP();
|
||||||
|
@ -11,6 +11,7 @@ class Esp32Platform : public ArduinoPlatform
|
|||||||
using ArduinoPlatform::_mulitcastPort;
|
using ArduinoPlatform::_mulitcastPort;
|
||||||
public:
|
public:
|
||||||
Esp32Platform();
|
Esp32Platform();
|
||||||
|
Esp32Platform( HardwareSerial& s);
|
||||||
|
|
||||||
// ip stuff
|
// ip stuff
|
||||||
uint32_t currentIpAddress() override;
|
uint32_t currentIpAddress() override;
|
||||||
|
@ -11,6 +11,10 @@ EspPlatform::EspPlatform() : ArduinoPlatform(Serial)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EspPlatform::EspPlatform( HardwareSerial& s) : ArduinoPlatform(s)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t EspPlatform::currentIpAddress()
|
uint32_t EspPlatform::currentIpAddress()
|
||||||
{
|
{
|
||||||
return WiFi.localIP();
|
return WiFi.localIP();
|
||||||
|
@ -12,6 +12,7 @@ class EspPlatform : public ArduinoPlatform
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
EspPlatform();
|
EspPlatform();
|
||||||
|
EspPlatform( HardwareSerial& s);
|
||||||
|
|
||||||
// ip stuff
|
// ip stuff
|
||||||
uint32_t currentIpAddress() override;
|
uint32_t currentIpAddress() override;
|
||||||
|
@ -10,6 +10,10 @@ SamdPlatform::SamdPlatform() : ArduinoPlatform(Serial1)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SamdPlatform::SamdPlatform( HardwareSerial& s) : ArduinoPlatform(s)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void SamdPlatform::restart()
|
void SamdPlatform::restart()
|
||||||
{
|
{
|
||||||
SerialDBG.println("restart");
|
SerialDBG.println("restart");
|
||||||
|
@ -10,6 +10,7 @@ class SamdPlatform : public ArduinoPlatform
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SamdPlatform();
|
SamdPlatform();
|
||||||
|
SamdPlatform( HardwareSerial& s);
|
||||||
|
|
||||||
void restart();
|
void restart();
|
||||||
uint8_t* getEepromBuffer(uint16_t size);
|
uint8_t* getEepromBuffer(uint16_t size);
|
||||||
|
Loading…
Reference in New Issue
Block a user