mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
add platformio file and fix compiling without IP
This commit is contained in:
parent
16de2048e6
commit
5f4f86dcbd
7
.vscode/extensions.json
vendored
Normal file
7
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||||
|
// for the documentation about the extensions.json format
|
||||||
|
"recommendations": [
|
||||||
|
"platformio.platformio-ide"
|
||||||
|
]
|
||||||
|
}
|
27
platformio.ini
Normal file
27
platformio.ini
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
; PlatformIO Project Configuration File
|
||||||
|
;
|
||||||
|
; Build options: build flags, source filter
|
||||||
|
; Upload options: custom upload port, speed and extra flags
|
||||||
|
; Library options: dependencies, extra library storages
|
||||||
|
; Advanced options: extra scripting
|
||||||
|
;
|
||||||
|
; Please visit documentation for the other options and examples
|
||||||
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
|
[platformio]
|
||||||
|
src_dir = examples/knx-demo
|
||||||
|
|
||||||
|
|
||||||
|
[env]
|
||||||
|
platform = atmelsam
|
||||||
|
board = zeroUSB
|
||||||
|
framework = arduino
|
||||||
|
build_type = debug
|
||||||
|
monitor_speed = 115200
|
||||||
|
lib_ldf_mode = deep+
|
||||||
|
lib_extra_dirs =
|
||||||
|
${sysenv.USERPROFILE}/Documents/PlatformIO/Projects
|
||||||
|
build_flags =
|
||||||
|
-Wno-unknown-pragmas
|
||||||
|
|
||||||
|
[env:build]
|
@ -1,6 +1,7 @@
|
|||||||
#include "knx_ip_device_information_dib.h"
|
#include "knx_ip_device_information_dib.h"
|
||||||
#include "bits.h"
|
#include "bits.h"
|
||||||
|
|
||||||
|
#ifdef USE_IP
|
||||||
KnxIpDeviceInformationDIB::KnxIpDeviceInformationDIB(uint8_t* data) : KnxIpDIB(data)
|
KnxIpDeviceInformationDIB::KnxIpDeviceInformationDIB(uint8_t* data) : KnxIpDIB(data)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -98,3 +99,4 @@ void KnxIpDeviceInformationDIB::friendlyName(const uint8_t* value)
|
|||||||
{
|
{
|
||||||
pushByteArray(value, LEN_FRIENDLY_NAME, _data + 24);
|
pushByteArray(value, LEN_FRIENDLY_NAME, _data + 24);
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -54,7 +54,6 @@ void KnxIpFrame::totalLength(uint16_t length)
|
|||||||
{
|
{
|
||||||
pushWord(length, _data + 4);
|
pushWord(length, _data + 4);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
uint8_t* KnxIpFrame::data()
|
uint8_t* KnxIpFrame::data()
|
||||||
{
|
{
|
||||||
@ -79,3 +78,4 @@ KnxIpFrame::KnxIpFrame(uint16_t length)
|
|||||||
protocolVersion(KnxIp1_0);
|
protocolVersion(KnxIp1_0);
|
||||||
totalLength(length);
|
totalLength(length);
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,8 +1,6 @@
|
|||||||
#include "knx_ip_search_response.h"
|
#include "knx_ip_search_response.h"
|
||||||
#ifdef USE_IP
|
#ifdef USE_IP
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SERVICE_FAMILIES 2
|
#define SERVICE_FAMILIES 2
|
||||||
|
|
||||||
KnxIpSearchResponse::KnxIpSearchResponse(IpParameterObject& parameters, DeviceObject& deviceObject)
|
KnxIpSearchResponse::KnxIpSearchResponse(IpParameterObject& parameters, DeviceObject& deviceObject)
|
||||||
@ -61,3 +59,4 @@ KnxIpSupportedServiceDIB& KnxIpSearchResponse::supportedServices()
|
|||||||
{
|
{
|
||||||
return _supportedServices;
|
return _supportedServices;
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,5 +1,6 @@
|
|||||||
#include "knx_ip_supported_service_dib.h"
|
#include "knx_ip_supported_service_dib.h"
|
||||||
|
|
||||||
|
#ifdef USE_IP
|
||||||
KnxIpSupportedServiceDIB::KnxIpSupportedServiceDIB(uint8_t* data) : KnxIpDIB(data)
|
KnxIpSupportedServiceDIB::KnxIpSupportedServiceDIB(uint8_t* data) : KnxIpDIB(data)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -39,3 +40,4 @@ void KnxIpSupportedServiceDIB::serviceVersion(ServiceFamily family, uint8_t ver
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -526,7 +526,7 @@ struct tm KNXValue::timeValue() const
|
|||||||
return *timePtr;
|
return *timePtr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct tm tmp;
|
struct tm tmp = {0};
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user