diff --git a/knx-linux/CMakeLists.txt b/knx-linux/CMakeLists.txt index 76d1b3b..dd55a25 100644 --- a/knx-linux/CMakeLists.txt +++ b/knx-linux/CMakeLists.txt @@ -78,4 +78,4 @@ include_directories(../src) set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -Wno-switch -g -O0") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -Wno-switch -g -O0") set_property(TARGET knx-linux PROPERTY CXX_STANDARD 11) -install(TARGETS knx-linux RUNTIME DESTINATION /tmp) +add_definitions(-DMEDIUM_TYPE=0) diff --git a/src/knx/bau27B0.cpp b/src/knx/bau27B0.cpp index f704eb5..3e1b548 100644 --- a/src/knx/bau27B0.cpp +++ b/src/knx/bau27B0.cpp @@ -1,3 +1,5 @@ +#if MEDIUM_TYPE == 2 + #include "bau27B0.h" #include "bits.h" #include @@ -113,3 +115,5 @@ void Bau27B0::individualAddressSerialNumberReadIndication(Priority priority, Hop if (!memcmp(knxSerialNumber, curSerialNumber, 6)) _appLayer.IndividualAddressSerialNumberReadResponse(priority, hopType, _rfMediumObj.rfDomainAddress(), knxSerialNumber); } + +#endif // #if MEDIUM_TYPE == 2 diff --git a/src/knx/rf_data_link_layer.cpp b/src/knx/rf_data_link_layer.cpp index 253083e..f4b6ff6 100644 --- a/src/knx/rf_data_link_layer.cpp +++ b/src/knx/rf_data_link_layer.cpp @@ -1,3 +1,5 @@ +#if MEDIUM_TYPE == 2 + #include "rf_physical_layer.h" #include "rf_data_link_layer.h" @@ -363,3 +365,5 @@ void RfDataLinkLayer::loadNextTxFrame(uint8_t** sendBuffer, uint16_t* sendBuffer } delete tx_frame; } + +#endif // #if MEDIUM_TYPE == 2 diff --git a/src/knx/rf_physical_layer.cpp b/src/knx/rf_physical_layer.cpp index 5b5c9c8..590667d 100644 --- a/src/knx/rf_physical_layer.cpp +++ b/src/knx/rf_physical_layer.cpp @@ -1,3 +1,5 @@ +#if MEDIUM_TYPE == 2 + #include "rf_physical_layer.h" #include "rf_data_link_layer.h" @@ -793,3 +795,5 @@ void RfPhysicalLayer::loop() break; } } + +#endif // #if MEDIUM_TYPE == 2