Commit Graph

23 Commits

Author SHA1 Message Date
Dom
dce92403e5
32bit eeprom size (#230)
* add commitNonVolatileMemory overload to batch write chars n times to flash

* changed uint8_t getEepromBuffer(uint16_t size) to uint8_t getEepromBuffer(uint32_t size) to allow eeprom > 65k

* reworked PR #230
2023-02-13 21:39:30 +01:00
Matthias B
8b9ff4fce1
H8I8O (#209)
* Add defines for LED, button and serial port

To make supporting different board layouts easier, this introduces some new defines:

For all platforms:
- `KNX_LED` -  the programming LED, defaults to `LED_BUILTIN`
- `KNX_BUTTON` - the programming button, defaults to `0`

For Arduino platforms:
- `KNX_DEBUG_SERIAL` - the serial port that is used for debugging, defaults to `Serial`
- `KNX_SERIAL` - the serial port used for communication with the TPUART, default depends on platform

* GD32 flash workaround

Addressing #181

At least some GD32 devices seem to require unlocking the flash twice. As the unlock function exits with `HAL_OK` if the flash is already unlocked, STM32 devices can run the same code without issues.

* Add H8I8O and H8C09 configurations to knx-demo

Addressing #181

These configurations both serve as examples for the use of these boards and other custom boards that don't use the standard pinout.

* Add STM32 unlock target

This copies the brute force unlock approach by @pavkriz into a custom target. With this commit, it is possible to automatically unlock e.g. a H8I8O board without leaving the PlatformIO IDE.

See #181
2022-06-08 21:13:34 +02:00
Simon Billemont
01979174e3
Fixed accedental swap of size parameter and KNX_FLASH_SIZE define introduced in PR #196 (#197) 2022-04-16 22:16:02 +02:00
Simon Billemont
b0153de97f
Fix issue with Esp8266/Esp32 platform reinitializing EEPROM multiple times causing it to forget staged EEPROM changes (#196) 2022-04-13 09:19:18 +02:00
croghostrider
59d1b67d6c
add KNX IP discovery support (#141)
for ESP8266 and ESP32
2021-06-04 17:23:23 +02:00
OutOfSync1
ed54da7089
fix some typos (#136)
* removed one section that was duplicate in dptconvert.cpp
2021-05-04 16:19:29 +02:00
etrinh
a4e74ebae5
Remove uniqueSerialNumber debug log to reduce footprint (#134) 2021-04-17 11:12:19 +02:00
OutOfSync1
e57bbf9dbe
generate unique serial number (#90) (#131)
* 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...)
2021-04-12 11:40:56 +02:00
etrinh
036bd54c79
Tweak for Ram usage (#129)
* Add KNX_NO_DEFAULT_UART to avoid default uart assignation for ArduinoPlatforms and derivatives, with associated defines (HWSERIAL_NONE for stm32) to recover RAM from unused RX/TX buffers
Remove ArduinoPlatform(HardwareSerial* knxSerial) constructor, seems not useable by KnxFacade

* Restore ArduinoPlatform::ArduinoPlatform(HardwareSerial* knxSerial) constructor

* revert xxxPlatform(HardwareSerial* s) constructors
2021-04-01 09:34:26 +02:00
Dennis Fleurbaaij
f169e20f2f
opt-out global KNX, ability to DIY construct knx object, minor cleanups (#121)
* Refactored the knx_facade a bit to make the auto-building of the global knx object and the buttonUp() ISR function opt-in. Also added the ability to quite easily attach another serial (in this case tested with Serial2 of an ESP32).

* Added visual studio code temp files to .gitignore

* Fix for missing build flag for WifiManager in ESP32_ip demo

* Added example in which we DIY build the KNX object and use ESP32's second UART to connect so that you can debug with the first one that's connected to USB.

* Minor platform cleanups to remove compilation warnings.

* ESP32 can't handle the defaulted 8192 byte EPROM. Next to that I needed to begin() the eprom lib in my setup() to get it to work and that requires knowing how much memory KNX will use. This fix makes the default more conservative and moves it's definition to the .h file so that other files can always use it as well.

* After comments from thelsing, inverted the logic. The default global knx object is now opt-out by defining KNX_NO_AUTOMATIC_GLOBAL_INSTANCE. See the knx-demo-diy project for an example.
Minor syntactic cleanups.

* Removed hardwareserial from facade (detail which was not needed)
Placed facade constructors together
Minor syntactic cleanup

* Fixed knx-cc1310 where own button routine was calling now private internal knx facade variable.
Renamed files in knx-demo-diy
Minor syntactic stuff

* Added gitattributes for binary knxprod files
2021-02-05 15:57:45 +01:00
Thomas Kunze
cd0fdc85b6 rename sendBytes ->sendBytesMultiCast
readBytes -> readBytesMultiCast
2019-12-10 22:29:14 +01:00
Bernator
afd07d10cb Bugfix, change debug uart not possible (#33)
* 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, change debug Uart not possible

* Update esp32_platform.cpp

* Update esp_platform.cpp

* Update knx-bme680.ino

* Update knx-demo.ino

* Update knx-hdc1008.ino

* Update knx-sonoffS20.ino
2019-09-09 20:10:56 +02:00
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
Fabian Schmieder
8d5dc5bf73 setter/getter & overloaded constructor (ArduinoPlatform) for HardwareSerial-object (#31)
* added overload to platform constructors for custom HardwareSerial-object

* added setter/getter setUart & getUart

* set Serial1 as default UART for ESP32
2019-09-01 20:49:28 +02:00
Thomas Kunze
5a93bbc91c create ArduinoPlatform to reduce code duplication 2019-08-26 21:26:55 +02:00
Thomas Kunze
db740d6687 remove mdelay and millis from platform 2019-08-22 21:31:02 +02:00
Thomas Kunze
dfe000844d fix build; add debug output 2019-07-09 21:36:32 +02:00
Thomas Kunze
174e29372c make GOT completely dynamic from ETS. GOs are now only available if device was programmed via ETS 2019-05-09 20:52:04 +02:00
Thomas Kunze
bd93aa12fa delegate memory management for knx tables to Platform class. Preallocate memory for them on linux. 2018-12-12 23:17:42 +01:00
Thomas Kunze
cdbf3e70cc include linux and samd versions here 2018-11-07 00:32:36 +01:00
Thomas Kunze
dc362a79c3 add writeMemory to facade, remove debug output from platform 2018-09-15 00:22:30 +02:00
Thomas Kunze
2a292ae314 switch to visualgdb, update submodule 2018-08-16 23:58:57 +02:00
Thomas Kunze
e99a001ac7 move common files to submodule 2018-04-09 22:46:21 +02:00