mirror of
https://github.com/thelsing/knx.git
synced 2025-01-02 00:06:43 +01:00
Compile KNX-RF specific bau27B0 and layers only if MEDIUM_TYPE is 2 (RF).
For knx-linux add MEDIUM_TYPE 0 (TP) as default to the CMakeLists.txt
This commit is contained in:
parent
c93dc81367
commit
eb87ec1fe9
@ -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_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(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)
|
set_property(TARGET knx-linux PROPERTY CXX_STANDARD 11)
|
||||||
install(TARGETS knx-linux RUNTIME DESTINATION /tmp)
|
add_definitions(-DMEDIUM_TYPE=0)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#if MEDIUM_TYPE == 2
|
||||||
|
|
||||||
#include "bau27B0.h"
|
#include "bau27B0.h"
|
||||||
#include "bits.h"
|
#include "bits.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -113,3 +115,5 @@ void Bau27B0::individualAddressSerialNumberReadIndication(Priority priority, Hop
|
|||||||
if (!memcmp(knxSerialNumber, curSerialNumber, 6))
|
if (!memcmp(knxSerialNumber, curSerialNumber, 6))
|
||||||
_appLayer.IndividualAddressSerialNumberReadResponse(priority, hopType, _rfMediumObj.rfDomainAddress(), knxSerialNumber);
|
_appLayer.IndividualAddressSerialNumberReadResponse(priority, hopType, _rfMediumObj.rfDomainAddress(), knxSerialNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #if MEDIUM_TYPE == 2
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#if MEDIUM_TYPE == 2
|
||||||
|
|
||||||
#include "rf_physical_layer.h"
|
#include "rf_physical_layer.h"
|
||||||
#include "rf_data_link_layer.h"
|
#include "rf_data_link_layer.h"
|
||||||
|
|
||||||
@ -363,3 +365,5 @@ void RfDataLinkLayer::loadNextTxFrame(uint8_t** sendBuffer, uint16_t* sendBuffer
|
|||||||
}
|
}
|
||||||
delete tx_frame;
|
delete tx_frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #if MEDIUM_TYPE == 2
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#if MEDIUM_TYPE == 2
|
||||||
|
|
||||||
#include "rf_physical_layer.h"
|
#include "rf_physical_layer.h"
|
||||||
#include "rf_data_link_layer.h"
|
#include "rf_data_link_layer.h"
|
||||||
|
|
||||||
@ -793,3 +795,5 @@ void RfPhysicalLayer::loop()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #if MEDIUM_TYPE == 2
|
||||||
|
Loading…
Reference in New Issue
Block a user