try to build less to reduce firmware sizes

This commit is contained in:
Thomas Kunze 2024-08-17 00:46:23 +02:00
parent b59b37a462
commit 74036bad07
58 changed files with 190 additions and 29 deletions

View File

@ -187,4 +187,4 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -
add_library(knx ${SOURCES}) add_library(knx ${SOURCES})
target_include_directories(knx PUBLIC .) target_include_directories(knx PUBLIC .)
set_property(TARGET knx PROPERTY CXX_STANDARD 11) set_property(TARGET knx PROPERTY CXX_STANDARD 11)
target_compile_definitions(knx PUBLIC -DUSE_RF -DUSE_USB -DUSE_CEMI_SERVER -DKNX_TUNNELING=1) target_compile_definitions(knx PUBLIC -DUSE_RF -DUSE_USB -DUSE_TP -D_USE_IP -DUSE_CEMI_SERVER -DKNX_TUNNELING=1 -DUSE_DATASECURE -DALL_MASKS)

View File

@ -1,4 +1,5 @@
#include "config.h" #include "config.h"
#if (MASK_VERSION == 0x07B0) || defined(ALL_MASKS)
#include "bau07B0.h" #include "bau07B0.h"
#include "bits.h" #include "bits.h"
@ -174,3 +175,4 @@ TpUartDataLinkLayer* Bau07B0::getDataLinkLayer()
{ {
return (TpUartDataLinkLayer*)&_dlLayer; return (TpUartDataLinkLayer*)&_dlLayer;
} }
#endif

View File

@ -1,4 +1,5 @@
#include "config.h" #include "config.h"
#if MASK_VERSION == 0x091A || defined(ALL_MASKS)
#include "bau091A.h" #include "bau091A.h"
#include "bits.h" #include "bits.h"
@ -253,3 +254,4 @@ TpUartDataLinkLayer* Bau091A::getSecondaryDataLinkLayer()
{ {
return (TpUartDataLinkLayer*)&_dlLayerSecondary; return (TpUartDataLinkLayer*)&_dlLayerSecondary;
} }
#endif

View File

@ -1,4 +1,5 @@
#include "config.h" #include "config.h"
#if MASK_VERSION == 0x27B0 || defined(ALL_MASKS)
#include "bau27B0.h" #include "bau27B0.h"
#include "bits.h" #include "bits.h"
@ -203,3 +204,4 @@ RfDataLinkLayer* Bau27B0::getDataLinkLayer()
{ {
return (RfDataLinkLayer*)&_dlLayer; return (RfDataLinkLayer*)&_dlLayer;
} }
#endif

View File

@ -1,4 +1,5 @@
#include "config.h" #include "config.h"
#if MASK_VERSION == 0x2920 || defined(ALL_MASKS)
#include "bau2920.h" #include "bau2920.h"
#include "bits.h" #include "bits.h"
@ -177,3 +178,4 @@ RfDataLinkLayer* Bau2920::getSecondaryDataLinkLayer()
{ {
return (RfDataLinkLayer*)&_dlLayerSecondary; return (RfDataLinkLayer*)&_dlLayerSecondary;
} }
#endif

View File

@ -1,4 +1,5 @@
#include "config.h" #include "config.h"
#if MASK_VERSION == 0x57B0 || defined(ALL_MASKS)
#include "bau57B0.h" #include "bau57B0.h"
#include "bits.h" #include "bits.h"
@ -165,3 +166,4 @@ IpDataLinkLayer* Bau57B0::getDataLinkLayer()
{ {
return (IpDataLinkLayer*)&_dlLayer; return (IpDataLinkLayer*)&_dlLayer;
} }
#endif

View File

@ -1,3 +1,4 @@
#if ((MASK_VERSION != 0x07B0) && (MASK_VERSION != 0x27B0) && (MASK_VERSION != 0x57B0)) || defined(ALL_MASKS)
#include "bau_systemB_coupler.h" #include "bau_systemB_coupler.h"
#include "bits.h" #include "bits.h"
#include <string.h> #include <string.h>
@ -58,3 +59,4 @@ void BauSystemBCoupler::doMasterReset(EraseCode eraseCode, uint8_t channel)
_secIfObj.masterReset(eraseCode, channel); _secIfObj.masterReset(eraseCode, channel);
#endif #endif
} }
#endif

View File

@ -1,3 +1,4 @@
#if (MASK_VERSION == 0x07B0) || (MASK_VERSION == 0x27B0) || (MASK_VERSION == 0x57B0) || defined(ALL_MASKS)
#include "bau_systemB_device.h" #include "bau_systemB_device.h"
#include "bits.h" #include "bits.h"
#include <string.h> #include <string.h>
@ -259,3 +260,4 @@ void BauSystemBDevice::groupValueWriteIndication(uint16_t asap, Priority priorit
updateGroupObject(go, data, dataLength); updateGroupObject(go, data, dataLength);
} }
#endif

View File

@ -6,9 +6,15 @@
#if defined(__linux__) #if defined(__linux__)
#include <arpa/inet.h> #include <arpa/inet.h>
#elif defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_STM32) || defined (DeviceFamily_CC13X0) #elif defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_STM32) || defined (DeviceFamily_CC13X0)
#define getbyte(x,n) (*(((uint8_t*)&(x))+n)) #define htons(x) ( ((x)<< 8 & 0xFF00) | \
#define htons(x) ( (getbyte(x,0)<<8) | getbyte(x,1) ) ((x)>> 8 & 0x00FF) )
#define htonl(x) ( (getbyte(x,0)<<24) | (getbyte(x,1)<<16) | (getbyte(x,2)<<8) | getbyte(x,3) ) #define ntohs(x) htons(x)
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
((x)<< 8 & 0x00FF0000UL) | \
((x)>> 8 & 0x0000FF00UL) | \
((x)>>24 & 0x000000FFUL) )
#define ntohl(x) htonl(x)
#define ntohs(x) htons(x) #define ntohs(x) htons(x)
#define ntohl(x) htonl(x) #define ntohl(x) htonl(x)
#endif #endif

View File

@ -29,9 +29,7 @@ class CemiServer
CemiServer(BauSystemB& bau); CemiServer(BauSystemB& bau);
void dataLinkLayer(DataLinkLayer& layer); void dataLinkLayer(DataLinkLayer& layer);
#ifdef KNX_TUNNELING
void dataLinkLayerPrimary(DataLinkLayer& layer); void dataLinkLayerPrimary(DataLinkLayer& layer);
#endif
// from data link layer // from data link layer
// Only L_Data service // Only L_Data service
@ -56,9 +54,7 @@ class CemiServer
void handleMReset(CemiFrame& frame); void handleMReset(CemiFrame& frame);
DataLinkLayer* _dataLinkLayer = nullptr; DataLinkLayer* _dataLinkLayer = nullptr;
#ifdef KNX_TUNNELING
DataLinkLayer* _dataLinkLayerPrimary = nullptr; DataLinkLayer* _dataLinkLayerPrimary = nullptr;
#endif
BauSystemB& _bau; BauSystemB& _bau;
#ifdef USE_USB #ifdef USE_USB
UsbTunnelInterface _usbTunnelInterface; UsbTunnelInterface _usbTunnelInterface;

View File

@ -27,20 +27,55 @@
//#define MASK_VERSION 0x2920 //#define MASK_VERSION 0x2920
// Data Linklayer Driver Options // Data Linklayer Driver Options
#if MASK_VERSION == 0x07B0
#if MASK_VERSION == 0x27B0 && !defined(USE_RF) #ifndef USE_IP
#define USE_RF #define USE_IP
#endif
#endif #endif
#if MASK_VERSION == 0x2920 && !defined(USE_RF) #if MASK_VERSION == 0x27B0
#define USE_RF #ifndef USE_RF
#define USE_RF
#endif
#endif
#if MASK_VERSION == 0x57B0
#ifndef USE_IP
#define USE_IP
#endif
#endif
#if MASK_VERSION == 0x091A
#ifndef USE_TP
#define USE_TP
#endif
#ifndef USE_IP
#define USE_IP
#endif
#endif
#if MASK_VERSION == 0x2920
#ifndef USE_TP
#define USE_TP
#endif
#ifndef USE_RF
#define USE_RF
#endif
#endif #endif
// cEMI options // cEMI options
//#define USE_USB //#define USE_USB
//#define USE_CEMI_SERVER //#define USE_CEMI_SERVER
#if (defined(USE_USB) || defined(KNX_TUNNELING)) && !defined(USE_CEMI_SERVER) #if defined(USE_USB) || defined(KNX_TUNNELING)
#define USE_CEMI_SERVER #ifndef USE_CEMI_SERVER
#define USE_CEMI_SERVER
#endif
#endif
#if defined(KNX_TUNNELING)
#ifndef USE_IP
#define USE_IP
#endif
#endif #endif
// KNX Data Secure Options // KNX Data Secure Options
@ -63,4 +98,4 @@
// (combined with other flags (HWSERIAL_NONE for stm32) - avoid allocation of RX/TX buffers for all serial lines) // (combined with other flags (HWSERIAL_NONE for stm32) - avoid allocation of RX/TX buffers for all serial lines)
//#define KNX_NO_DEFAULT_UART //#define KNX_NO_DEFAULT_UART
#endif #endif

View File

@ -1,3 +1,6 @@
#include "../config.h"
#ifdef USE_IP
#include "ip_data_link_layer.h" #include "ip_data_link_layer.h"
#include "../bits.h" #include "../bits.h"
@ -1184,3 +1187,4 @@ bool IpDataLinkLayer::isSendLimitReached()
return false; return false;
} }
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "ip_host_protocol_address_information.h" #include "ip_host_protocol_address_information.h"
#include "../bits.h" #include "../bits.h"
@ -45,3 +47,4 @@ void IpHostProtocolAddressInformation::ipPortNumber(uint16_t value)
{ {
pushWord(value, _data + 6); pushWord(value, _data + 6);
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "ip_parameter_object.h" #include "ip_parameter_object.h"
#include "../bits.h" #include "../bits.h"
@ -137,3 +139,4 @@ uint16_t* IpParameterObject::additionalIndivualAddresses(uint8_t& numAddresses)
#endif #endif
return (uint16_t*) propertyData(PID_ADDITIONAL_INDIVIDUAL_ADDRESSES); return (uint16_t*) propertyData(PID_ADDITIONAL_INDIVIDUAL_ADDRESSES);
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_ch.h" #include "knx_ip_ch.h"
KnxIpCH::KnxIpCH(uint8_t* data) : _data(data) KnxIpCH::KnxIpCH(uint8_t* data) : _data(data)
@ -45,3 +47,4 @@ uint8_t KnxIpCH::status() const
{ {
return _data[3]; return _data[3];
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_config_dib.h" #include "knx_ip_config_dib.h"
KnxIpConfigDIB::KnxIpConfigDIB(uint8_t* data, bool isCurrent) : KnxIpDIB(data) KnxIpConfigDIB::KnxIpConfigDIB(uint8_t* data, bool isCurrent) : KnxIpDIB(data)
@ -90,3 +92,4 @@ void KnxIpConfigDIB::info2(uint8_t addr)
else else
_data[19] = addr; _data[19] = addr;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_config_request.h" #include "knx_ip_config_request.h"
KnxIpConfigRequest::KnxIpConfigRequest(uint8_t* data, uint16_t length) KnxIpConfigRequest::KnxIpConfigRequest(uint8_t* data, uint16_t length)
@ -14,3 +16,4 @@ KnxIpCH& KnxIpConfigRequest::connectionHeader()
{ {
return _ch; return _ch;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_connect_request.h" #include "knx_ip_connect_request.h"
KnxIpConnectRequest::KnxIpConnectRequest(uint8_t* data, uint16_t length) KnxIpConnectRequest::KnxIpConnectRequest(uint8_t* data, uint16_t length)
@ -18,3 +20,4 @@ KnxIpCRI& KnxIpConnectRequest::cri()
{ {
return _cri; return _cri;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_connect_response.h" #include "knx_ip_connect_response.h"
KnxIpConnectResponse::KnxIpConnectResponse(IpParameterObject& parameters, uint16_t address, uint16_t port, uint8_t channel, uint8_t type) KnxIpConnectResponse::KnxIpConnectResponse(IpParameterObject& parameters, uint16_t address, uint16_t port, uint8_t channel, uint8_t type)
@ -40,3 +42,4 @@ KnxIpCRD& KnxIpConnectResponse::crd()
{ {
return _crd; return _crd;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_crd.h" #include "knx_ip_crd.h"
KnxIpCRD::KnxIpCRD(uint8_t* data) : _data(data) KnxIpCRD::KnxIpCRD(uint8_t* data) : _data(data)
@ -38,3 +40,4 @@ void KnxIpCRD::address(uint16_t value)
_data[2] = value >> 8; _data[2] = value >> 8;
_data[3] = value & 0xFF; _data[3] = value & 0xFF;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_cri.h" #include "knx_ip_cri.h"
KnxIpCRI::KnxIpCRI(uint8_t* data) : _data(data) KnxIpCRI::KnxIpCRI(uint8_t* data) : _data(data)
@ -35,3 +37,4 @@ void KnxIpCRI::layer(uint8_t value)
{ {
_data[2] = value; _data[2] = value;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_description_request.h" #include "knx_ip_description_request.h"
KnxIpDescriptionRequest::KnxIpDescriptionRequest(uint8_t* data, uint16_t length) KnxIpDescriptionRequest::KnxIpDescriptionRequest(uint8_t* data, uint16_t length)
@ -10,3 +12,4 @@ IpHostProtocolAddressInformation& KnxIpDescriptionRequest::hpaiCtrl()
{ {
return _hpaiCtrl; return _hpaiCtrl;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_description_response.h" #include "knx_ip_description_response.h"
#define LEN_SERVICE_FAMILIES 2 #define LEN_SERVICE_FAMILIES 2
@ -68,3 +70,4 @@ KnxIpSupportedServiceDIB& KnxIpDescriptionResponse::supportedServices()
{ {
return _supportedServices; return _supportedServices;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_device_information_dib.h" #include "knx_ip_device_information_dib.h"
#include "../bits.h" #include "../bits.h"
@ -97,4 +99,5 @@ const uint8_t* KnxIpDeviceInformationDIB::friendlyName() const
void KnxIpDeviceInformationDIB::friendlyName(const uint8_t* value) void KnxIpDeviceInformationDIB::friendlyName(const uint8_t* value)
{ {
pushByteArray(value, LEN_FRIENDLY_NAME, _data + 24); pushByteArray(value, LEN_FRIENDLY_NAME, _data + 24);
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_dib.h" #include "knx_ip_dib.h"
KnxIpDIB::KnxIpDIB(uint8_t* data) : _data(data) KnxIpDIB::KnxIpDIB(uint8_t* data) : _data(data)
@ -25,3 +27,4 @@ void KnxIpDIB::code(DescriptionTypeCode value)
{ {
_data[1] = value; _data[1] = value;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_disconnect_request.h" #include "knx_ip_disconnect_request.h"
KnxIpDisconnectRequest::KnxIpDisconnectRequest(uint8_t* data, uint16_t length) KnxIpDisconnectRequest::KnxIpDisconnectRequest(uint8_t* data, uint16_t length)
@ -23,3 +25,4 @@ void KnxIpDisconnectRequest::channelId(uint8_t channelId)
{ {
_data[LEN_KNXIP_HEADER] = channelId; _data[LEN_KNXIP_HEADER] = channelId;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_disconnect_response.h" #include "knx_ip_disconnect_response.h"
KnxIpDisconnectResponse::KnxIpDisconnectResponse(uint8_t channel, uint8_t status) KnxIpDisconnectResponse::KnxIpDisconnectResponse(uint8_t channel, uint8_t status)
@ -8,3 +10,4 @@ KnxIpDisconnectResponse::KnxIpDisconnectResponse(uint8_t channel, uint8_t status
_data[LEN_KNXIP_HEADER] = channel; _data[LEN_KNXIP_HEADER] = channel;
_data[LEN_KNXIP_HEADER + 1] = status; _data[LEN_KNXIP_HEADER + 1] = status;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_extended_device_information_dib.h" #include "knx_ip_extended_device_information_dib.h"
#include "../bits.h" #include "../bits.h"
@ -38,3 +40,4 @@ void KnxIpExtendedDeviceInformationDIB::deviceDescriptor(uint16_t value)
{ {
pushWord(value, _data + 6); pushWord(value, _data + 6);
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_frame.h" #include "knx_ip_frame.h"
#include <cstring> #include <cstring>
@ -76,3 +78,4 @@ KnxIpFrame::KnxIpFrame(uint16_t length)
protocolVersion(KnxIp1_0); protocolVersion(KnxIp1_0);
totalLength(length); totalLength(length);
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_knx_addresses_dib.h" #include "knx_ip_knx_addresses_dib.h"
KnxIpKnxAddressesDIB::KnxIpKnxAddressesDIB(uint8_t* data) : KnxIpDIB(data) KnxIpKnxAddressesDIB::KnxIpKnxAddressesDIB(uint8_t* data) : KnxIpDIB(data)
@ -23,3 +25,4 @@ void KnxIpKnxAddressesDIB::additional(uint16_t addr)
currentPos += 2; currentPos += 2;
length(currentPos - _data); length(currentPos - _data);
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_routing_indication.h" #include "knx_ip_routing_indication.h"
#include <cstring> #include <cstring>
@ -18,3 +20,4 @@ KnxIpRoutingIndication::KnxIpRoutingIndication(CemiFrame frame)
serviceTypeIdentifier(RoutingIndication); serviceTypeIdentifier(RoutingIndication);
memcpy(_data + LEN_KNXIP_HEADER, frame.data(), frame.totalLenght()); memcpy(_data + LEN_KNXIP_HEADER, frame.data(), frame.totalLenght());
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_search_request.h" #include "knx_ip_search_request.h"
KnxIpSearchRequest::KnxIpSearchRequest(uint8_t* data, uint16_t length) KnxIpSearchRequest::KnxIpSearchRequest(uint8_t* data, uint16_t length)
@ -10,3 +12,4 @@ IpHostProtocolAddressInformation& KnxIpSearchRequest::hpai()
{ {
return _hpai; return _hpai;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_search_request_extended.h" #include "knx_ip_search_request_extended.h"
#include "../bits.h" #include "../bits.h"
#include "service_families.h" #include "service_families.h"
@ -64,3 +66,4 @@ bool KnxIpSearchRequestExtended::requestedDIB(uint8_t code)
return requestedDIBs[code]; return requestedDIBs[code];
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_search_response.h" #include "knx_ip_search_response.h"
#define LEN_SERVICE_FAMILIES 2 #define LEN_SERVICE_FAMILIES 2
@ -80,3 +82,4 @@ KnxIpSupportedServiceDIB& KnxIpSearchResponse::supportedServices()
{ {
return _supportedServices; return _supportedServices;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_search_response_extended.h" #include "knx_ip_search_response_extended.h"
#include "service_families.h" #include "service_families.h"
@ -224,3 +226,4 @@ uint8_t* KnxIpSearchResponseExtended::DIBs()
{ {
return _data + LEN_KNXIP_HEADER + LEN_IPHPAI; return _data + LEN_KNXIP_HEADER + LEN_IPHPAI;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_state_request.h" #include "knx_ip_state_request.h"
KnxIpStateRequest::KnxIpStateRequest(uint8_t* data, uint16_t length) KnxIpStateRequest::KnxIpStateRequest(uint8_t* data, uint16_t length)
@ -12,4 +14,5 @@ IpHostProtocolAddressInformation& KnxIpStateRequest::hpaiCtrl()
uint8_t KnxIpStateRequest::channelId() uint8_t KnxIpStateRequest::channelId()
{ {
return _data[LEN_KNXIP_HEADER]; return _data[LEN_KNXIP_HEADER];
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_state_response.h" #include "knx_ip_state_response.h"
#define LEN_SERVICE_FAMILIES 2 #define LEN_SERVICE_FAMILIES 2
@ -22,3 +24,4 @@ KnxIpStateResponse::KnxIpStateResponse(uint8_t channelId, uint8_t errorCode)
_data[LEN_KNXIP_HEADER] = channelId; _data[LEN_KNXIP_HEADER] = channelId;
_data[LEN_KNXIP_HEADER + 1] = errorCode; _data[LEN_KNXIP_HEADER + 1] = errorCode;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_supported_service_dib.h" #include "knx_ip_supported_service_dib.h"
KnxIpSupportedServiceDIB::KnxIpSupportedServiceDIB(uint8_t* data) : KnxIpDIB(data) KnxIpSupportedServiceDIB::KnxIpSupportedServiceDIB(uint8_t* data) : KnxIpDIB(data)
@ -40,3 +42,4 @@ void KnxIpSupportedServiceDIB::serviceVersion(ServiceFamily family, uint8_t ver
} }
} }
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_tunnel_connection.h" #include "knx_ip_tunnel_connection.h"
KnxIpTunnelConnection::KnxIpTunnelConnection() KnxIpTunnelConnection::KnxIpTunnelConnection()
@ -17,3 +19,4 @@ void KnxIpTunnelConnection::Reset()
IndividualAddress = 0; IndividualAddress = 0;
IsConfig = false; IsConfig = false;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_tunneling_ack.h" #include "knx_ip_tunneling_ack.h"
#include <cstring> #include <cstring>
@ -16,3 +18,4 @@ KnxIpCH& KnxIpTunnelingAck::connectionHeader()
{ {
return _ch; return _ch;
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_tunneling_info_dib.h" #include "knx_ip_tunneling_info_dib.h"
#include "service_families.h" #include "service_families.h"
@ -25,3 +27,4 @@ void KnxIpTunnelingInfoDIB::tunnelingSlot(uint16_t addr, uint16_t state)
currentPos += 4; currentPos += 4;
length(currentPos - _data); length(currentPos - _data);
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_IP
#include "knx_ip_tunneling_request.h" #include "knx_ip_tunneling_request.h"
#include <cstring> #include <cstring>
@ -22,3 +24,4 @@ KnxIpCH& KnxIpTunnelingRequest::connectionHeader()
{ {
return _ch; return _ch;
} }
#endif

View File

@ -1,3 +1,4 @@
#if ((MASK_VERSION != 0x07B0) && (MASK_VERSION != 0x27B0) && (MASK_VERSION != 0x57B0)) || defined(ALL_MASKS)
#include "network_layer_coupler.h" #include "network_layer_coupler.h"
#include "data_link_layer.h" #include "data_link_layer.h"
#include "device_object.h" #include "device_object.h"
@ -653,4 +654,5 @@ bool NetworkLayerCoupler::isTunnelAddress(uint16_t destination)
// tunnels are managed within the IpDataLinkLayer - kPrimaryIfIndex // tunnels are managed within the IpDataLinkLayer - kPrimaryIfIndex
return _netLayerEntities[kPrimaryIfIndex].dataLinkLayer().isTunnelAddress(destination); return _netLayerEntities[kPrimaryIfIndex].dataLinkLayer().isTunnelAddress(destination);
} }
#endif
#endif #endif

View File

@ -1,3 +1,4 @@
#if (MASK_VERSION == 0x07B0) || (MASK_VERSION == 0x27B0) || (MASK_VERSION == 0x57B0) || defined(ALL_MASKS)
#include "network_layer_device.h" #include "network_layer_device.h"
#include "device_object.h" #include "device_object.h"
#include "tpdu.h" #include "tpdu.h"
@ -148,3 +149,4 @@ void NetworkLayerDevice::systemBroadcastConfirm(AckType ack, FrameFormat format,
HopCountType hopType = npdu.hopCount() == 7 ? UnlimitedRouting : NetworkLayerParameter; HopCountType hopType = npdu.hopCount() == 7 ? UnlimitedRouting : NetworkLayerParameter;
_transportLayer.dataSystemBroadcastConfirm(ack, hopType, npdu.tpdu(), priority, status); _transportLayer.dataSystemBroadcastConfirm(ack, hopType, npdu.tpdu(), priority, status);
} }
#endif

View File

@ -1,6 +1,6 @@
#ifdef ARDUINO_ARCH_ESP32
#include "esp32_platform.h" #include "esp32_platform.h"
#ifdef ARDUINO_ARCH_ESP32
#include <Arduino.h> #include <Arduino.h>
#include <EEPROM.h> #include <EEPROM.h>

View File

@ -1,6 +1,7 @@
#ifdef ARDUINO_ARCH_ESP8266
#include "esp_platform.h" #include "esp_platform.h"
#ifdef ARDUINO_ARCH_ESP8266
#include <user_interface.h> #include <user_interface.h>
#include <Arduino.h> #include <Arduino.h>
#include <EEPROM.h> #include <EEPROM.h>

View File

@ -1,5 +1,6 @@
#include "linux_platform.h"
#ifdef __linux__ #ifdef __linux__
#include "linux_platform.h"
#include <cstdio> #include <cstdio>
#include <string> #include <string>
#include <cstring> #include <cstring>

View File

@ -22,10 +22,9 @@ For usage of KNX-IP you have to define either
- KNX_IP_WIFI (use the arduino-pico core's PiPicoW lwip stack) - KNX_IP_WIFI (use the arduino-pico core's PiPicoW lwip stack)
----------------------------------------------------*/ ----------------------------------------------------*/
#ifdef ARDUINO_ARCH_RP2040
#include "rp2040_arduino_platform.h" #include "rp2040_arduino_platform.h"
#ifdef ARDUINO_ARCH_RP2040
#include "knx/bits.h" #include "knx/bits.h"
#include <Arduino.h> #include <Arduino.h>

View File

@ -1,6 +1,6 @@
#ifdef ARDUINO_ARCH_SAMD
#include "samd_platform.h" #include "samd_platform.h"
#ifdef ARDUINO_ARCH_SAMD
#include <knx/bits.h> #include <knx/bits.h>
#include <Arduino.h> #include <Arduino.h>

View File

@ -1,6 +1,6 @@
#ifdef ARDUINO_ARCH_STM32
#include "stm32_platform.h" #include "stm32_platform.h"
#ifdef ARDUINO_ARCH_STM32
#include <EEPROM.h> #include <EEPROM.h>
#include "knx/bits.h" #include "knx/bits.h"

View File

@ -1,4 +1,5 @@
#include "../config.h" #include "../config.h"
#ifdef USE_RF
#if defined(DeviceFamily_CC13X0) #if defined(DeviceFamily_CC13X0)
#include "rf_physical_layer_cc1310.h" #include "rf_physical_layer_cc1310.h"
@ -380,3 +381,4 @@ void RfDataLinkLayer::loadNextTxFrame(uint8_t** sendBuffer, uint16_t* sendBuffer
delete tx_frame; delete tx_frame;
} }
#endif

View File

@ -1,4 +1,5 @@
#include "../config.h" #include "../config.h"
#ifdef USE_RF
#include <cstring> #include <cstring>
#include "rf_medium_object.h" #include "rf_medium_object.h"
@ -56,3 +57,4 @@ void RfMediumObject::rfDomainAddress(const uint8_t* value)
Property* prop = property(PID_RF_DOMAIN_ADDRESS); Property* prop = property(PID_RF_DOMAIN_ADDRESS);
prop->write(value); prop->write(value);
} }
#endif

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_RF
#ifndef DeviceFamily_CC13X0 #ifndef DeviceFamily_CC13X0
#include "rf_physical_layer_cc1101.h" #include "rf_physical_layer_cc1101.h"
@ -777,4 +779,5 @@ void RfPhysicalLayerCC1101::loop()
} }
} }
#endif // DeviceFamily_CC13X0 #endif // DeviceFamily_CC13X0
#endif

View File

@ -122,7 +122,7 @@
#define VERSION 0xF1 // Current version number #define VERSION 0xF1 // Current version number
#define FREQEST 0xF2 // Frequency offset estimate #define FREQEST 0xF2 // Frequency offset estimate
#define LQI 0xF3 // Demodulator estimate for link quality #define LQI 0xF3 // Demodulator estimate for link quality
#define RSSI 0xF4 // Received signal strength indication #define RF_RSSI 0xF4 // Received signal strength indication
#define MARCSTATE 0xF5 // Control state machine state #define MARCSTATE 0xF5 // Control state machine state
#define WORTIME1 0xF6 // High byte of WOR timer #define WORTIME1 0xF6 // High byte of WOR timer
#define WORTIME0 0xF7 // Low byte of WOR timer #define WORTIME0 0xF7 // Low byte of WOR timer

View File

@ -1,3 +1,5 @@
#include "../config.h"
#ifdef USE_RF
#ifdef DeviceFamily_CC13X0 #ifdef DeviceFamily_CC13X0
@ -371,3 +373,4 @@ void RfPhysicalLayerCC1310::loop()
} }
#endif // DeviceFamily_CC13X0 #endif // DeviceFamily_CC13X0
#endif

View File

@ -1,4 +1,5 @@
#include "config.h" #include "config.h"
#if ((MASK_VERSION != 0x07B0) && (MASK_VERSION != 0x27B0) && (MASK_VERSION != 0x57B0)) || defined(ALL_MASKS)
#include <cstring> #include <cstring>
#include "router_object.h" #include "router_object.h"
@ -601,3 +602,4 @@ bool RouterObject::isGroupAddressInFilterTable(uint16_t groupAddress)
return false; return false;
} }
#endif

View File

@ -17,7 +17,7 @@
#define CBC 1 #define CBC 1
#define CTR 1 #define CTR 1
#define ECB 0 #define ECB 0
#include "aes.hpp" #include "util/aes.hpp"
static constexpr uint8_t kSecureDataPdu = 0; static constexpr uint8_t kSecureDataPdu = 0;
static constexpr uint8_t kSecureSyncRequest = 2; static constexpr uint8_t kSecureSyncRequest = 2;

View File

@ -1,4 +1,3 @@
#include "config.h"
#pragma GCC optimize("O3") #pragma GCC optimize("O3")
#include "address_table_object.h" #include "address_table_object.h"