mirror of
https://github.com/thelsing/knx.git
synced 2026-03-13 02:22:13 +01:00
Add coupler support (#79)
* save work. * save work * save work * save work * save work * Remember which interface received the cemi frame * save work * save work * save work * Use default value from PID_ROUTING_COUNT * Add simple alternative to std::function without smart pointers or move semantics * Remove include * Add more comments about cleanup * save work * Remove forgotten code. * Move crc16Ccitt to bits.c as it also used for PID_MCB * save work * move comment * save work * save work * save work * save work * save work * save work * save work * derive from TableObject instead of InterfaceObject * save work * save work * Fix wrong pointer arithmetic in TableObject * Filter table setting/clearing * move comment * save work * save work * save work * handle SBC on closed media * save work * move coupler example to different dir * Restore device example for linux * save work * Remove MEDIUM_TYPE and use MASK_VERSION * save work * save work * save work * save work * save work * save work * save work * save work * save work * save work * save work * save work * save work * save work * Replace MEDIUM_TYPE by MASK_VERSION * Remove adafruit/travis-ci tests * Disable travis ci cache for platformio * Fix missing changes * Fix cemi server and add missing MASK_VERSION definitions * Enable platformio caching on travis ci again * Handle device address update for routing decision * source address is set in network layer and not in data link layer * Add remaining APCI types that are used with system broadcast * Add debug print for routing * Remove simple_functional * Fix CMakLists.txt * Use MASK_VERSION to conditionally compile code. * Remove fixed version reuqirement from platform esp8266 * Add demo-coupler for MCUs * Remove simple_functional.h from demo knx-linux * Enable CI for coupler demos * Correct path for knx-linux-coupler * Fix knx_facade.h * Refactor NetworkLayer to use getInterface() for devices and getPrimaryInterface(), getSecondaryInterface() for couplers * Add platformio configs for other currently possible mask/platform combinations * Add class diagrams and remove obsolete includes * Add some minimal docs
This commit is contained in:
@@ -3,38 +3,43 @@
|
||||
#include "knx/bits.h"
|
||||
|
||||
#ifdef ARDUINO_ARCH_SAMD
|
||||
// predefined global instance for TP or RF
|
||||
#ifdef MEDIUM_TYPE
|
||||
#if MEDIUM_TYPE == 0
|
||||
KnxFacade<SamdPlatform, Bau07B0> knx;
|
||||
#elif MEDIUM_TYPE == 2
|
||||
KnxFacade<SamdPlatform, Bau27B0> knx;
|
||||
#else
|
||||
#error "Only TP and RF supported for Arduino SAMD platform!"
|
||||
#endif
|
||||
// predefined global instance for TP or RF or TP/RF coupler
|
||||
#if MASK_VERSION == 0x07B0
|
||||
KnxFacade<SamdPlatform, Bau07B0> knx;
|
||||
#elif MASK_VERSION == 0x27B0
|
||||
KnxFacade<SamdPlatform, Bau27B0> knx;
|
||||
#elif MASK_VERSION == 0x2920
|
||||
KnxFacade<SamdPlatform, Bau2920> knx;
|
||||
#else
|
||||
#error "No medium type specified for platform Arduino_SAMD! Please set MEDIUM_TYPE! (TP:0, RF:2, IP:5)"
|
||||
#error Mask version not supported on ARDUINO_ARCH_SAMD
|
||||
#endif
|
||||
|
||||
#elif ARDUINO_ARCH_ESP8266
|
||||
// predefined global instance for IP only
|
||||
KnxFacade<EspPlatform, Bau57B0> knx;
|
||||
#elif ARDUINO_ARCH_ESP32
|
||||
// predefined global instance for TP or IP
|
||||
#ifdef MEDIUM_TYPE
|
||||
#if MEDIUM_TYPE == 0
|
||||
KnxFacade<Esp32Platform, Bau07B0> knx;
|
||||
#elif MEDIUM_TYPE == 5
|
||||
KnxFacade<Esp32Platform, Bau57B0> knx;
|
||||
#else
|
||||
#error "Only TP and IP supported for Arduino ESP32 platform!"
|
||||
#endif
|
||||
#if MASK_VERSION == 0x57B0
|
||||
KnxFacade<EspPlatform, Bau57B0> knx;
|
||||
#else
|
||||
// Compatibility
|
||||
KnxFacade<Esp32Platform, Bau57B0> knx;
|
||||
//#error "No medium type specified for platform Arduino ESP32! Please set MEDIUM_TYPE! (TP:0, RF:2, IP:5)"
|
||||
#error Mask version not supported on ARDUINO_ARCH_ESP8266
|
||||
#endif
|
||||
|
||||
#elif ARDUINO_ARCH_ESP32
|
||||
// predefined global instance for TP or IP or TP/IP coupler
|
||||
#if MASK_VERSION == 0x07B0
|
||||
KnxFacade<Esp32Platform, Bau07B0> knx;
|
||||
#elif MASK_VERSION == 0x57B0
|
||||
KnxFacade<Esp32Platform, Bau57B0> knx;
|
||||
#elif MASK_VERSION == 0x091A
|
||||
KnxFacade<Esp32Platform, Bau091A> knx;
|
||||
#else
|
||||
#error Mask version not supported on ARDUINO_ARCH_ESP8266
|
||||
#endif
|
||||
|
||||
#elif ARDUINO_ARCH_STM32
|
||||
KnxFacade<Stm32Platform, Bau07B0> knx;
|
||||
#if MASK_VERSION == 0x07B0
|
||||
KnxFacade<Stm32Platform, Bau07B0> knx;
|
||||
#else
|
||||
#error Mask version not supported on ARDUINO_ARCH_STM32
|
||||
#endif
|
||||
#elif __linux__
|
||||
// no predefined global instance
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user