mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
e57bbf9dbe
* generate unique serial number (#90) * see https://github.com/ricaun/ArduinoUniqueID * calculated from ESP.getEfuseMac() on ESP32 * ESP.getChipId() on ESP8266 * SERIAL_NUMBER_WORD_0-3 on SAMD * HAL_GetUIDw0-2() on STM32 * defaults to 0x01020304 on other platforms * fix variable name for ESP platform * another fix variable name for ESP platform (need more coffee...)
26 lines
482 B
C++
26 lines
482 B
C++
#ifdef ARDUINO_ARCH_STM32
|
|
#include "arduino_platform.h"
|
|
|
|
class Stm32Platform : public ArduinoPlatform
|
|
{
|
|
public:
|
|
Stm32Platform();
|
|
Stm32Platform( HardwareSerial* s);
|
|
~Stm32Platform();
|
|
|
|
// unique serial number
|
|
uint32_t uniqueSerialNumber() override;
|
|
|
|
// basic stuff
|
|
void restart();
|
|
|
|
//memory
|
|
uint8_t* getEepromBuffer(uint16_t size);
|
|
void commitToEeprom();
|
|
private:
|
|
uint8_t *_eepromPtr = nullptr;
|
|
uint16_t _eepromSize = 0;
|
|
};
|
|
|
|
#endif
|