mirror of
https://github.com/thelsing/knx.git
synced 2025-01-30 00:19:01 +01:00
include linux and samd versions here
This commit is contained in:
parent
8bea44873b
commit
cdbf3e70cc
@ -90,7 +90,8 @@ void setup(void)
|
||||
if (knx.configured())
|
||||
{
|
||||
cyclSend = knx.paramInt(0);
|
||||
Serial.printf("Zykl. send: %d\n", cyclSend);
|
||||
Serial.print("Zykl. send:");
|
||||
Serial.println(cyclSend);
|
||||
}
|
||||
|
||||
// start the framework. Will get wifi first.
|
BIN
examples/knx-demo/knx-demo-tp.knxprod
Normal file
BIN
examples/knx-demo/knx-demo-tp.knxprod
Normal file
Binary file not shown.
133
examples/knx-demo/knx-demo-tp.xml
Normal file
133
examples/knx-demo/knx-demo-tp.xml
Normal file
@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<KNX xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" CreatedBy="KNX MT" ToolVersion="5.6.407.26745" xmlns="http://knx.org/xml/project/11">
|
||||
<ManufacturerData>
|
||||
<Manufacturer RefId="M-00FA">
|
||||
<Catalog>
|
||||
<CatalogSection Id="M-00FA_CS-1" Name="Geräte" Number="1" DefaultLanguage="en-US">
|
||||
<CatalogItem Id="M-00FA_H-0124-0_HP-ABCE-79-0000_CI-IA4313-1" Name="Temperatursensor TP" Number="1" ProductRefId="M-00FA_H-0124-0_P-IA4313" Hardware2ProgramRefId="M-00FA_H-0124-0_HP-ABCE-79-0000" DefaultLanguage="en-US" />
|
||||
</CatalogSection>
|
||||
</Catalog>
|
||||
<ApplicationPrograms>
|
||||
<ApplicationProgram Id="M-00FA_A-ABCE-79-0000" ApplicationNumber="43982" ApplicationVersion="121" ProgramType="ApplicationProgram" MaskVersion="MV-07B0" Name="TK TEMP TP" LoadProcedureStyle="MergedProcedure" PeiType="0" DefaultLanguage="en-US" DynamicTableManagement="false" Linkable="false" MinEtsVersion="4.0">
|
||||
<Static>
|
||||
<Code>
|
||||
<RelativeSegment Id="M-00FA_A-ABCE-79-0000_RS-04-00000" Name="Parameters" Offset="0" Size="8" LoadStateMachine="4" />
|
||||
</Code>
|
||||
<ParameterTypes>
|
||||
<ParameterType Id="M-00FA_A-ABCE-79-0000_PT-startupTimeout" Name="startupTimeout">
|
||||
<TypeRestriction Base="Value" SizeInBit="8">
|
||||
<Enumeration Text="0 s" Value="0" Id="M-00FA_A-ABCE-79-0000_PT-startupTimeout_EN-0" />
|
||||
<Enumeration Text="1 s" Value="1" Id="M-00FA_A-ABCE-79-0000_PT-startupTimeout_EN-1" />
|
||||
<Enumeration Text="2 s" Value="2" Id="M-00FA_A-ABCE-79-0000_PT-startupTimeout_EN-2" />
|
||||
<Enumeration Text="3 s" Value="3" Id="M-00FA_A-ABCE-79-0000_PT-startupTimeout_EN-3" />
|
||||
<Enumeration Text="4 s" Value="4" Id="M-00FA_A-ABCE-79-0000_PT-startupTimeout_EN-4" />
|
||||
<Enumeration Text="5 s" Value="5" Id="M-00FA_A-ABCE-79-0000_PT-startupTimeout_EN-5" />
|
||||
<Enumeration Text="6 s" Value="6" Id="M-00FA_A-ABCE-79-0000_PT-startupTimeout_EN-6" />
|
||||
</TypeRestriction>
|
||||
</ParameterType>
|
||||
<ParameterType Id="M-00FA_A-ABCE-79-0000_PT-TempChange" Name="TempChange">
|
||||
<TypeRestriction Base="Value" SizeInBit="8">
|
||||
<Enumeration Text="Disabled" Value="0" Id="M-00FA_A-ABCE-79-0000_PT-TempChange_EN-0" />
|
||||
<Enumeration Text="0.1 K" Value="1" Id="M-00FA_A-ABCE-79-0000_PT-TempChange_EN-1" />
|
||||
<Enumeration Text="0.2 K" Value="2" Id="M-00FA_A-ABCE-79-0000_PT-TempChange_EN-2" />
|
||||
<Enumeration Text="0.3 K" Value="3" Id="M-00FA_A-ABCE-79-0000_PT-TempChange_EN-3" />
|
||||
</TypeRestriction>
|
||||
</ParameterType>
|
||||
<ParameterType Id="M-00FA_A-ABCE-79-0000_PT-TempCycle" Name="TempCycle">
|
||||
<TypeRestriction Base="Value" SizeInBit="8">
|
||||
<Enumeration Text="Disabled" Value="0" Id="M-00FA_A-ABCE-79-0000_PT-TempCycle_EN-0" />
|
||||
<Enumeration Text="1 min" Value="1" Id="M-00FA_A-ABCE-79-0000_PT-TempCycle_EN-1" />
|
||||
<Enumeration Text="2 min" Value="2" Id="M-00FA_A-ABCE-79-0000_PT-TempCycle_EN-2" />
|
||||
<Enumeration Text="3 min" Value="3" Id="M-00FA_A-ABCE-79-0000_PT-TempCycle_EN-3" />
|
||||
</TypeRestriction>
|
||||
</ParameterType>
|
||||
<ParameterType Id="M-00FA_A-ABCE-79-0000_PT-TempAbgleich" Name="TempAbgleich">
|
||||
<TypeNumber SizeInBit="32" Type="signedInt" minInclusive="-50" maxInclusive="50" />
|
||||
</ParameterType>
|
||||
<ParameterType Id="M-00FA_A-ABCE-79-0000_PT-TempSendMinMax" Name="TempSendMinMax">
|
||||
<TypeRestriction Base="Value" SizeInBit="8">
|
||||
<Enumeration Text="Disabled" Value="0" Id="M-00FA_A-ABCE-79-0000_PT-TempSendMinMax_EN-0" />
|
||||
<Enumeration Text="Send Enable" Value="1" Id="M-00FA_A-ABCE-79-0000_PT-TempSendMinMax_EN-1" />
|
||||
</TypeRestriction>
|
||||
</ParameterType>
|
||||
</ParameterTypes>
|
||||
<Parameters>
|
||||
<Parameter Id="M-00FA_A-ABCE-79-0000_P-1" Name="startupTimeout" ParameterType="M-00FA_A-ABCE-79-0000_PT-startupTimeout" Text="Startup delaytime" Value="0">
|
||||
<Memory CodeSegment="M-00FA_A-ABCE-79-0000_RS-04-00000" Offset="0" BitOffset="0" />
|
||||
</Parameter>
|
||||
<Parameter Id="M-00FA_A-ABCE-79-0000_P-2" Name="Aender Senden" ParameterType="M-00FA_A-ABCE-79-0000_PT-TempChange" Text="Send actual value after change of" Value="0">
|
||||
<Memory CodeSegment="M-00FA_A-ABCE-79-0000_RS-04-00000" Offset="1" BitOffset="0" />
|
||||
</Parameter>
|
||||
<Parameter Id="M-00FA_A-ABCE-79-0000_P-3" Name="ZyklSenden" ParameterType="M-00FA_A-ABCE-79-0000_PT-TempCycle" Text="Send actual temperature cyclically" Value="0">
|
||||
<Memory CodeSegment="M-00FA_A-ABCE-79-0000_RS-04-00000" Offset="2" BitOffset="0" />
|
||||
</Parameter>
|
||||
<Parameter Id="M-00FA_A-ABCE-79-0000_P-4" Name="MinMaxSenden" ParameterType="M-00FA_A-ABCE-79-0000_PT-TempSendMinMax" Text="Send min/max value" Value="0">
|
||||
<Memory CodeSegment="M-00FA_A-ABCE-79-0000_RS-04-00000" Offset="3" BitOffset="0" />
|
||||
</Parameter>
|
||||
<Parameter Id="M-00FA_A-ABCE-79-0000_P-5" Name="Abgleich" ParameterType="M-00FA_A-ABCE-79-0000_PT-TempAbgleich" Text="Internal sensor correction value (value * 0.1 K)" Value="0">
|
||||
<Memory CodeSegment="M-00FA_A-ABCE-79-0000_RS-04-00000" Offset="4" BitOffset="0" />
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
<ParameterRefs>
|
||||
<ParameterRef Id="M-00FA_A-ABCE-79-0000_P-1_R-1" RefId="M-00FA_A-ABCE-79-0000_P-1" />
|
||||
<ParameterRef Id="M-00FA_A-ABCE-79-0000_P-2_R-2" RefId="M-00FA_A-ABCE-79-0000_P-2" />
|
||||
<ParameterRef Id="M-00FA_A-ABCE-79-0000_P-3_R-3" RefId="M-00FA_A-ABCE-79-0000_P-3" />
|
||||
<ParameterRef Id="M-00FA_A-ABCE-79-0000_P-4_R-4" RefId="M-00FA_A-ABCE-79-0000_P-4" />
|
||||
<ParameterRef Id="M-00FA_A-ABCE-79-0000_P-5_R-5" RefId="M-00FA_A-ABCE-79-0000_P-5" />
|
||||
</ParameterRefs>
|
||||
<ComObjectTable>
|
||||
<ComObject Id="M-00FA_A-ABCE-79-0000_O-1" Name="Current temperature value" Text="Current temperature value" Number="1" FunctionText="Transmit temperature value" ObjectSize="2 Bytes" ReadFlag="Enabled" WriteFlag="Disabled" CommunicationFlag="Enabled" TransmitFlag="Enabled" UpdateFlag="Disabled" ReadOnInitFlag="Disabled" DatapointType="" />
|
||||
<ComObject Id="M-00FA_A-ABCE-79-0000_O-2" Name="Max memory value" Text="Max memory value" Number="2" FunctionText="Read memory" ObjectSize="2 Bytes" ReadFlag="Enabled" WriteFlag="Disabled" CommunicationFlag="Enabled" TransmitFlag="Enabled" UpdateFlag="Disabled" ReadOnInitFlag="Disabled" DatapointType="" />
|
||||
<ComObject Id="M-00FA_A-ABCE-79-0000_O-3" Name="Min memory value" Text="Min memory value" Number="3" FunctionText="Read memory" ObjectSize="2 Bytes" ReadFlag="Enabled" WriteFlag="Disabled" CommunicationFlag="Enabled" TransmitFlag="Enabled" UpdateFlag="Disabled" ReadOnInitFlag="Disabled" DatapointType="" />
|
||||
<ComObject Id="M-00FA_A-ABCE-79-0000_O-4" Name="Min/max memory reseet" Text="Min/max memory reseet" Number="4" FunctionText="Reset memory" ObjectSize="1 Bit" ReadFlag="Disabled" WriteFlag="Enabled" CommunicationFlag="Enabled" TransmitFlag="Disabled" UpdateFlag="Disabled" ReadOnInitFlag="Disabled" DatapointType="" />
|
||||
</ComObjectTable>
|
||||
<ComObjectRefs>
|
||||
<ComObjectRef Id="M-00FA_A-ABCE-79-0000_O-1_R-1" RefId="M-00FA_A-ABCE-79-0000_O-1" />
|
||||
<ComObjectRef Id="M-00FA_A-ABCE-79-0000_O-2_R-2" RefId="M-00FA_A-ABCE-79-0000_O-2" />
|
||||
<ComObjectRef Id="M-00FA_A-ABCE-79-0000_O-3_R-3" RefId="M-00FA_A-ABCE-79-0000_O-3" />
|
||||
<ComObjectRef Id="M-00FA_A-ABCE-79-0000_O-4_R-4" RefId="M-00FA_A-ABCE-79-0000_O-4" />
|
||||
</ComObjectRefs>
|
||||
<AddressTable MaxEntries="65000" />
|
||||
<AssociationTable MaxEntries="65000" />
|
||||
<LoadProcedures>
|
||||
<LoadProcedure MergeId="2">
|
||||
<LdCtrlRelSegment AppliesTo="full" LsmIdx="4" Size="8" Mode="0" Fill="0" />
|
||||
</LoadProcedure>
|
||||
<LoadProcedure MergeId="4">
|
||||
<LdCtrlWriteRelMem ObjIdx="4" Offset="0" Size="8" Verify="true" />
|
||||
</LoadProcedure>
|
||||
</LoadProcedures>
|
||||
<Options />
|
||||
</Static>
|
||||
<Dynamic>
|
||||
<ChannelIndependentBlock>
|
||||
<ParameterBlock Id="M-00FA_A-ABCE-79-0000_PB-1" Name="ParameterPage" Text="Allgemeine Parameter">
|
||||
<ParameterRefRef RefId="M-00FA_A-ABCE-79-0000_P-1_R-1" />
|
||||
<ParameterRefRef RefId="M-00FA_A-ABCE-79-0000_P-2_R-2" />
|
||||
<ParameterRefRef RefId="M-00FA_A-ABCE-79-0000_P-3_R-3" />
|
||||
<ParameterRefRef RefId="M-00FA_A-ABCE-79-0000_P-4_R-4" />
|
||||
<ParameterRefRef RefId="M-00FA_A-ABCE-79-0000_P-5_R-5" />
|
||||
<ComObjectRefRef RefId="M-00FA_A-ABCE-79-0000_O-1_R-1" />
|
||||
<ComObjectRefRef RefId="M-00FA_A-ABCE-79-0000_O-2_R-2" />
|
||||
<ComObjectRefRef RefId="M-00FA_A-ABCE-79-0000_O-3_R-3" />
|
||||
<ComObjectRefRef RefId="M-00FA_A-ABCE-79-0000_O-4_R-4" />
|
||||
</ParameterBlock>
|
||||
</ChannelIndependentBlock>
|
||||
</Dynamic>
|
||||
</ApplicationProgram>
|
||||
</ApplicationPrograms>
|
||||
<Hardware>
|
||||
<Hardware Id="M-00FA_H-0124-0" Name="SAMD Random" SerialNumber="0124" VersionNumber="0" BusCurrent="10" HasIndividualAddress="true" HasApplicationProgram="true">
|
||||
<Products>
|
||||
<Product Id="M-00FA_H-0124-0_P-IA4313" Text="Temperatursensor TP" OrderNumber="IA4313" IsRailMounted="false" DefaultLanguage="en-US" />
|
||||
</Products>
|
||||
<Hardware2Programs>
|
||||
<Hardware2Program Id="M-00FA_H-0124-0_HP-ABCE-79-0000" MediumTypes="MT-0">
|
||||
<ApplicationProgramRef RefId="M-00FA_A-ABCE-79-0000" />
|
||||
</Hardware2Program>
|
||||
</Hardware2Programs>
|
||||
</Hardware>
|
||||
</Hardware>
|
||||
</Manufacturer>
|
||||
</ManufacturerData>
|
||||
</KNX>
|
@ -1,4 +1,3 @@
|
||||
#include <EEPROM.h>
|
||||
#include <knx_esp.h>
|
||||
|
||||
// declare array of all groupobjects with their sizes in byte
|
||||
@ -62,7 +61,6 @@ void resetCallback(GroupObject& go)
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
Serial.setDebugOutput(true);
|
||||
|
||||
randomSeed(millis());
|
||||
|
||||
@ -77,11 +75,11 @@ void setup()
|
||||
// print values of parameters if device is already configured
|
||||
if (knx.configured())
|
||||
{
|
||||
Serial.printf("Timeout: %d\n", knx.paramByte(0));
|
||||
Serial.printf("Zykl. senden: %d\n", knx.paramByte(1));
|
||||
Serial.printf("Min/Max senden: %d\n", knx.paramByte(2));
|
||||
Serial.printf("Aenderung senden: %d\n", knx.paramByte(3));
|
||||
Serial.printf("Abgleich %d\n", knx.paramByte(4));
|
||||
SerialDBG.print("Timeout: "); SerialDBG.println(knx.paramByte(0));
|
||||
SerialDBG.print("Zykl. senden: "); SerialDBG.println(knx.paramByte(1));
|
||||
SerialDBG.print("Min/Max senden: "); SerialDBG.println(knx.paramByte(2));
|
||||
SerialDBG.print("Aenderung senden: "); SerialDBG.println(knx.paramByte(3));
|
||||
SerialDBG.print("Abgleich: "); SerialDBG.println(knx.paramByte(4));
|
||||
}
|
||||
|
||||
// start the framework. Will get wifi first.
|
7
src/arch_config.h
Normal file
7
src/arch_config.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
#ifndef USE_STATES
|
||||
#define USE_STATES
|
||||
#endif
|
||||
#endif
|
@ -2,9 +2,19 @@
|
||||
#include "state.h"
|
||||
#include "knx_facade.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
unsigned long buttonTimestamp = 0;
|
||||
|
||||
void buttonDown()
|
||||
{
|
||||
buttonTimestamp = millis();
|
||||
attachInterrupt(knx.buttonPin(), buttonUp, RISING);
|
||||
}
|
||||
#endif
|
||||
|
||||
void buttonUp()
|
||||
{
|
||||
#ifdef USE_STATES
|
||||
if (millis() - buttonTimestamp > 1000)
|
||||
{
|
||||
Serial.println("long button press");
|
||||
@ -16,10 +26,15 @@ void buttonUp()
|
||||
currentState->shortButtonPress();
|
||||
}
|
||||
attachInterrupt(knx.buttonPin(), buttonDown, FALLING);
|
||||
}
|
||||
|
||||
void buttonDown()
|
||||
{
|
||||
buttonTimestamp = millis();
|
||||
attachInterrupt(knx.buttonPin(), buttonUp, RISING);
|
||||
#else
if (knx.progMode())
|
||||
{
|
||||
digitalWrite(knx.ledPin(), LOW);
|
||||
knx.progMode(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
digitalWrite(knx.ledPin(), HIGH);
|
||||
knx.progMode(true);
|
||||
}
|
||||
#endif
|
||||
}
|
@ -1,4 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "arch_config.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
void buttonDown();
|
||||
#endif
|
||||
void buttonUp();
|
@ -1,4 +1,6 @@
|
||||
#include "esp_platform.h"
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
#include <user_interface.h>
|
||||
#include <Arduino.h>
|
||||
#include <EEPROM.h>
|
||||
@ -169,3 +171,4 @@ size_t EspPlatform::readBytesUart(uint8_t *buffer, size_t length)
|
||||
printHex("p>", buffer, length);
|
||||
return length;
|
||||
}
|
||||
#endif
|
@ -1,7 +1,10 @@
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
#include "knx/platform.h"
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <WifiUDP.h>
|
||||
|
||||
#define SerialDBG Serial
|
||||
|
||||
class EspPlatform : public Platform
|
||||
{
|
||||
public:
|
||||
@ -43,3 +46,4 @@ private:
|
||||
WiFiUDP _udp;
|
||||
};
|
||||
|
||||
#endif
|
2
src/knx
2
src/knx
@ -1 +1 @@
|
||||
Subproject commit 0762e753f73a44ca77a266753d8981203e579a32
|
||||
Subproject commit aaf6c275843ddcb541e8fdae4c8870ede1242370
|
@ -4,9 +4,17 @@
|
||||
#include "led.h"
|
||||
#include "nowifistate.h"
|
||||
|
||||
KnxFacade knx;
|
||||
#ifdef ARDUINO_ARCH_SAMD
|
||||
SamdPlatform platform;
|
||||
Bau07B0 bau(platform);
|
||||
#else
|
||||
EspPlatform platform;
|
||||
Bau57B0 bau(platform);
|
||||
#endif
|
||||
KnxFacade knx(bau);
|
||||
|
||||
KnxFacade::KnxFacade() : _bau(_platform)
|
||||
|
||||
KnxFacade::KnxFacade(BauSystemB& bau) : _bau(bau)
|
||||
{
|
||||
manufacturerId(0xfa);
|
||||
_bau.addSaveRestore(this);
|
||||
@ -69,8 +77,12 @@ void KnxFacade::writeMemory()
|
||||
|
||||
void KnxFacade::loop()
|
||||
{
|
||||
#ifdef USE_STATES
|
||||
if (currentState)
|
||||
currentState->loop();
|
||||
#else
|
||||
knxLoop();
|
||||
#endif
|
||||
}
|
||||
|
||||
void KnxFacade::knxLoop()
|
||||
@ -112,12 +124,17 @@ void KnxFacade::start()
|
||||
{
|
||||
pinMode(_ledPin, OUTPUT);
|
||||
|
||||
pinMode(_buttonPin, INPUT);
|
||||
attachInterrupt(_buttonPin, buttonDown, FALLING);
|
||||
pinMode(_buttonPin, INPUT_PULLUP);
|
||||
|
||||
#ifdef USE_STATES
|
||||
attachInterrupt(_buttonPin, buttonDown, FALLING);
|
||||
switchToSate(noWifiState);
|
||||
checkStates();
|
||||
_ticker.attach_ms(100, doLed);
|
||||
#else
|
||||
attachInterrupt(knx.buttonPin(), buttonUp, RISING);
|
||||
enabled(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t* KnxFacade::paramData(uint32_t addr)
|
||||
|
@ -1,16 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "arch_config.h"
|
||||
|
||||
#ifdef ARDUINO_ARCH_SAMD
|
||||
#include "samd_platform.h"
|
||||
#include "knx/bau07B0.h"
|
||||
#endif
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
#include <Ticker.h>
|
||||
#include "esp_platform.h"
|
||||
#include "knx/bau57B0.h"
|
||||
#endif
|
||||
|
||||
#ifdef USE_STATES
|
||||
class RunningState;
|
||||
#endif
|
||||
|
||||
typedef uint8_t* (*saveRestoreCallback)(uint8_t* buffer);
|
||||
|
||||
class KnxFacade : private SaveRestore
|
||||
{
|
||||
public:
|
||||
KnxFacade();
|
||||
KnxFacade(BauSystemB& bau);
|
||||
bool enabled();
|
||||
void enabled(bool value);
|
||||
bool progMode();
|
||||
@ -38,11 +50,12 @@ public:
|
||||
uint16_t paramWord(uint32_t addr);
|
||||
uint32_t paramInt(uint32_t addr);
|
||||
private:
|
||||
EspPlatform _platform;
|
||||
Bau57B0 _bau;
|
||||
BauSystemB& _bau;
|
||||
uint32_t _ledPin = 16;
|
||||
uint32_t _buttonPin = 0;
|
||||
#ifdef USE_STATES
|
||||
Ticker _ticker;
|
||||
#endif
|
||||
saveRestoreCallback _saveCallback = 0;
|
||||
saveRestoreCallback _restoreCallback = 0;
|
||||
|
||||
|
174
src/knx_facade_samd.cpp
Normal file
174
src/knx_facade_samd.cpp
Normal file
@ -0,0 +1,174 @@
|
||||
#include "knx_facade.h"
|
||||
#if 0
|
||||
KnxFacade knx;
|
||||
|
||||
|
||||
#define SerialDBG SerialUSB
|
||||
|
||||
void buttonUp();
|
||||
long buttonTimestamp = 0;
|
||||
void buttonDown()
|
||||
{
|
||||
buttonTimestamp = millis();
|
||||
attachInterrupt(knx.buttonPin(), buttonUp, RISING);
|
||||
}
|
||||
|
||||
void buttonUp()
|
||||
{
|
||||
// keep short/long for now
|
||||
if (millis() - buttonTimestamp > 1000)
|
||||
{
|
||||
SerialDBG.println("long button press");
|
||||
}
|
||||
else
|
||||
{
|
||||
SerialDBG.println("short button press");
|
||||
}
|
||||
|
||||
if (knx.progMode())
|
||||
{
|
||||
digitalWrite(knx.ledPin(), LOW);
|
||||
knx.progMode(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
digitalWrite(knx.ledPin(), HIGH);
|
||||
knx.progMode(true);
|
||||
}
|
||||
|
||||
attachInterrupt(knx.buttonPin(), buttonDown, FALLING);
|
||||
}
|
||||
|
||||
KnxFacade::KnxFacade() : _bau(_platform)
|
||||
{
|
||||
manufacturerId(0xfa);
|
||||
}
|
||||
|
||||
bool KnxFacade::enabled()
|
||||
{
|
||||
return _bau.enabled();
|
||||
}
|
||||
|
||||
void KnxFacade::enabled(bool value)
|
||||
{
|
||||
_bau.enabled(true);
|
||||
}
|
||||
|
||||
bool KnxFacade::progMode()
|
||||
{
|
||||
return _bau.deviceObject().progMode();
|
||||
}
|
||||
|
||||
void KnxFacade::progMode(bool value)
|
||||
{
|
||||
_bau.deviceObject().progMode(value);
|
||||
}
|
||||
|
||||
bool KnxFacade::configured()
|
||||
{
|
||||
return _bau.configured();
|
||||
}
|
||||
|
||||
uint32_t KnxFacade::ledPin()
|
||||
{
|
||||
return _ledPin;
|
||||
}
|
||||
|
||||
void KnxFacade::ledPin(uint32_t value)
|
||||
{
|
||||
_ledPin = value;
|
||||
}
|
||||
|
||||
uint32_t KnxFacade::buttonPin()
|
||||
{
|
||||
return _buttonPin;
|
||||
}
|
||||
|
||||
void KnxFacade::buttonPin(uint32_t value)
|
||||
{
|
||||
_buttonPin = value;
|
||||
}
|
||||
|
||||
void KnxFacade::readMemory()
|
||||
{
|
||||
_bau.readMemory();
|
||||
}
|
||||
|
||||
void KnxFacade::loop()
|
||||
{
|
||||
_bau.loop();
|
||||
}
|
||||
|
||||
void KnxFacade::registerGroupObjects(GroupObject* groupObjects, uint16_t count)
|
||||
{
|
||||
_bau.groupObjectTable().groupObjects(groupObjects, count);
|
||||
}
|
||||
|
||||
void KnxFacade::manufacturerId(uint16_t value)
|
||||
{
|
||||
_bau.deviceObject().manufacturerId(value);
|
||||
}
|
||||
|
||||
void KnxFacade::bauNumber(uint32_t value)
|
||||
{
|
||||
_bau.deviceObject().bauNumber(value);
|
||||
}
|
||||
|
||||
void KnxFacade::orderNumber(const char* value)
|
||||
{
|
||||
_bau.deviceObject().orderNumber(value);
|
||||
}
|
||||
|
||||
void KnxFacade::hardwareType(uint8_t* value)
|
||||
{
|
||||
_bau.deviceObject().hardwareType(value);
|
||||
}
|
||||
|
||||
void KnxFacade::version(uint16_t value)
|
||||
{
|
||||
_bau.deviceObject().version(value);
|
||||
}
|
||||
|
||||
void KnxFacade::start()
|
||||
{
|
||||
pinMode(_ledPin, OUTPUT);
|
||||
|
||||
pinMode(_buttonPin, INPUT_PULLUP);
|
||||
attachInterrupt(_buttonPin, buttonDown, FALLING);
|
||||
enabled(true);
|
||||
}
|
||||
|
||||
uint8_t* KnxFacade::paramData(uint32_t addr)
|
||||
{
|
||||
if (!_bau.configured())
|
||||
return nullptr;
|
||||
|
||||
return _bau.parameters().data(addr);
|
||||
}
|
||||
|
||||
uint8_t KnxFacade::paramByte(uint32_t addr)
|
||||
{
|
||||
if (!_bau.configured())
|
||||
return 0;
|
||||
|
||||
return _bau.parameters().getByte(addr);
|
||||
}
|
||||
|
||||
uint16_t KnxFacade::paramWord(uint32_t addr)
|
||||
{
|
||||
if (!_bau.configured())
|
||||
return 0;
|
||||
|
||||
return _bau.parameters().getWord(addr);
|
||||
}
|
||||
|
||||
uint32_t KnxFacade::paramInt(uint32_t addr)
|
||||
{
|
||||
if (!_bau.configured())
|
||||
return 0;
|
||||
|
||||
return _bau.parameters().getInt(addr);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
@ -2,6 +2,7 @@
|
||||
#include "knx_facade.h"
|
||||
#include "state.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
void doLed()
|
||||
{
|
||||
if (!currentState)
|
||||
@ -25,4 +26,5 @@ void doLed()
|
||||
digitalWrite(knx.ledPin(), HIGH);
|
||||
else
|
||||
digitalWrite(knx.ledPin(), LOW);
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,3 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
void doLed();
|
||||
#include "arch_config.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
void doLed();
|
||||
#endif
|
279
src/linux_platform.cpp
Normal file
279
src/linux_platform.cpp
Normal file
@ -0,0 +1,279 @@
|
||||
#include "linux_platform.h"
|
||||
#ifdef __linux__
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <math.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "knx/device_object.h"
|
||||
#include "knx/address_table_object.h"
|
||||
#include "knx/association_table_object.h"
|
||||
#include "knx/group_object_table_object.h"
|
||||
#include "knx/application_program_object.h"
|
||||
#include "knx/ip_parameter_object.h"
|
||||
|
||||
LinuxPlatform::LinuxPlatform()
|
||||
{
|
||||
doMemoryMapping();
|
||||
}
|
||||
|
||||
uint32_t LinuxPlatform::currentIpAddress()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t LinuxPlatform::currentSubnetMask()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t LinuxPlatform::currentDefaultGateway()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t LinuxPlatform::millis()
|
||||
{
|
||||
struct timespec spec;
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &spec);
|
||||
return spec.tv_sec * 1000 + round(spec.tv_nsec / 1.0e6);
|
||||
}
|
||||
|
||||
void LinuxPlatform::mdelay(uint32_t millis)
|
||||
{
|
||||
struct timespec ts;
|
||||
ts.tv_sec = millis / 1000;
|
||||
ts.tv_nsec = (millis % 1000) * 1000000;
|
||||
nanosleep(&ts, NULL);
|
||||
}
|
||||
|
||||
void LinuxPlatform::macAddress(uint8_t* data)
|
||||
{
|
||||
// hardcode some address
|
||||
data[0] = 0x08;
|
||||
data[1] = 0x00;
|
||||
data[2] = 0x27;
|
||||
data[3] = 0x6c;
|
||||
data[4] = 0xa8;
|
||||
data[5] = 0x2a;
|
||||
}
|
||||
|
||||
void LinuxPlatform::restart()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void LinuxPlatform::fatalError()
|
||||
{
|
||||
printf("A fatal error occured. Stopping.\n");
|
||||
while (true)
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
void LinuxPlatform::setupMultiCast(uint32_t addr, uint16_t port)
|
||||
{
|
||||
_multicastAddr = addr;
|
||||
_port = port;
|
||||
|
||||
struct ip_mreq command;
|
||||
uint32_t loop = 1;
|
||||
|
||||
struct sockaddr_in sin;
|
||||
memset(&sin, 0, sizeof(sin));
|
||||
sin.sin_family = AF_INET;
|
||||
sin.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
sin.sin_port = htons(port);
|
||||
|
||||
_socketFd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (_socketFd == -1) {
|
||||
perror("socket()");
|
||||
fatalError();
|
||||
}
|
||||
|
||||
/* Mehr Prozessen erlauben, denselben Port zu nutzen */
|
||||
loop = 1;
|
||||
if (setsockopt(_socketFd, SOL_SOCKET, SO_REUSEADDR, &loop, sizeof(loop)) < 0)
|
||||
{
|
||||
perror("setsockopt:SO_REUSEADDR");
|
||||
fatalError();
|
||||
}
|
||||
|
||||
if (bind(_socketFd, (struct sockaddr *)&sin, sizeof(sin)) < 0)
|
||||
{
|
||||
perror("bind");
|
||||
fatalError();
|
||||
}
|
||||
|
||||
/* Broadcast auf dieser Maschine zulassen */
|
||||
loop = 1;
|
||||
if (setsockopt(_socketFd, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)) < 0)
|
||||
{
|
||||
perror("setsockopt:IP_MULTICAST_LOOP");
|
||||
fatalError();
|
||||
}
|
||||
|
||||
/* Join the broadcast group: */
|
||||
command.imr_multiaddr.s_addr = htonl(addr);
|
||||
command.imr_interface.s_addr = htonl(INADDR_ANY);
|
||||
|
||||
if (setsockopt(_socketFd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &command, sizeof(command)) < 0)
|
||||
{
|
||||
perror("setsockopt:IP_ADD_MEMBERSHIP");
|
||||
fatalError();
|
||||
}
|
||||
|
||||
uint32_t flags = fcntl(_socketFd, F_GETFL);
|
||||
flags |= O_NONBLOCK;
|
||||
fcntl(_socketFd, F_SETFL, flags);
|
||||
}
|
||||
|
||||
void LinuxPlatform::closeMultiCast()
|
||||
{
|
||||
struct ip_mreq command;
|
||||
command.imr_multiaddr.s_addr = htonl(_multicastAddr);
|
||||
command.imr_interface.s_addr = htonl(INADDR_ANY);
|
||||
|
||||
if (setsockopt(_socketFd,
|
||||
IPPROTO_IP,
|
||||
IP_DROP_MEMBERSHIP,
|
||||
&command, sizeof(command)) < 0) {
|
||||
perror("setsockopt:IP_DROP_MEMBERSHIP");
|
||||
}
|
||||
close(_socketFd);
|
||||
}
|
||||
|
||||
bool LinuxPlatform::sendBytes(uint8_t* buffer, uint16_t len)
|
||||
{
|
||||
struct sockaddr_in address = { 0 };
|
||||
address.sin_family = AF_INET;
|
||||
address.sin_addr.s_addr = htonl(_multicastAddr);
|
||||
address.sin_port = htons(_port);
|
||||
|
||||
ssize_t retVal = 0;
|
||||
do
|
||||
{
|
||||
retVal = sendto(_socketFd, buffer, len, 0, (struct sockaddr *) &address, sizeof(address));
|
||||
if (retVal == -1)
|
||||
{
|
||||
if (errno != EAGAIN && errno != EWOULDBLOCK)
|
||||
return false;
|
||||
}
|
||||
} while (retVal == -1);
|
||||
return true;
|
||||
}
|
||||
|
||||
int LinuxPlatform::readBytes(uint8_t * buffer, uint16_t maxLen)
|
||||
{
|
||||
uint32_t sin_len;
|
||||
struct sockaddr_in sin;
|
||||
|
||||
sin_len = sizeof(sin);
|
||||
ssize_t len = recvfrom(_socketFd, buffer, maxLen, 0, (struct sockaddr *) &sin, &sin_len);
|
||||
return len;
|
||||
}
|
||||
|
||||
uint8_t * LinuxPlatform::getEepromBuffer(uint16_t size)
|
||||
{
|
||||
return _mappedFile + 2;
|
||||
}
|
||||
|
||||
void LinuxPlatform::commitToEeprom()
|
||||
{
|
||||
fsync(_fd);
|
||||
}
|
||||
|
||||
#define FLASHSIZE 0x10000
|
||||
void LinuxPlatform::doMemoryMapping()
|
||||
{
|
||||
_fd = open("flash.bin", O_RDWR | O_CREAT, S_IRWXU | S_IRGRP | S_IROTH);
|
||||
if (_fd < 0)
|
||||
{
|
||||
perror("Error in file opening");
|
||||
//exit(-1);
|
||||
}
|
||||
|
||||
struct stat st;
|
||||
uint32_t ret = fstat(_fd, &st);
|
||||
if (ret < 0)
|
||||
{
|
||||
perror("Error in fstat");
|
||||
//exit(-1);
|
||||
}
|
||||
|
||||
size_t len_file = st.st_size;
|
||||
if (len_file < FLASHSIZE)
|
||||
{
|
||||
if (ftruncate(_fd, FLASHSIZE) != 0)
|
||||
{
|
||||
perror("Error extending file");
|
||||
//exit(-1);
|
||||
}
|
||||
len_file = FLASHSIZE;
|
||||
}
|
||||
unsigned char* addr = (unsigned char*)mmap(NULL, len_file, PROT_READ | PROT_WRITE, MAP_SHARED, _fd, 0);
|
||||
if (addr[0] != 0xAF || addr[1] != 0xFE)
|
||||
{
|
||||
memset(addr, 0, FLASHSIZE);
|
||||
addr[0] = 0xAF;
|
||||
addr[1] = 0xFE;
|
||||
}
|
||||
|
||||
if (addr == MAP_FAILED)
|
||||
{
|
||||
perror("Error in mmap");
|
||||
//exit(-1);
|
||||
}
|
||||
_mappedFile = addr;
|
||||
}
|
||||
|
||||
size_t LinuxPlatform::readBytesUart(uint8_t *buffer, size_t length)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int LinuxPlatform::readUart()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
size_t LinuxPlatform::writeUart(const uint8_t *buffer, size_t size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
size_t LinuxPlatform::writeUart(const uint8_t data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int LinuxPlatform::uartAvailable()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void LinuxPlatform::closeUart()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void LinuxPlatform::setupUart()
|
||||
{
|
||||
}
|
||||
#endif
|
51
src/linux_platform.h
Normal file
51
src/linux_platform.h
Normal file
@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
#include "knx/platform.h"
|
||||
|
||||
class LinuxPlatform: public Platform
|
||||
{
|
||||
public:
|
||||
LinuxPlatform();
|
||||
|
||||
// ip stuff
|
||||
uint32_t currentIpAddress();
|
||||
uint32_t currentSubnetMask();
|
||||
uint32_t currentDefaultGateway();
|
||||
void macAddress(uint8_t* addr);
|
||||
|
||||
// basic stuff
|
||||
uint32_t millis();
|
||||
void mdelay(uint32_t millis);
|
||||
void restart();
|
||||
void fatalError();
|
||||
|
||||
//multicast
|
||||
void setupMultiCast(uint32_t addr, uint16_t port);
|
||||
void closeMultiCast();
|
||||
bool sendBytes(uint8_t* buffer, uint16_t len);
|
||||
int readBytes(uint8_t* buffer, uint16_t maxLen);
|
||||
|
||||
//uart
|
||||
void setupUart();
|
||||
void closeUart();
|
||||
int uartAvailable();
|
||||
size_t writeUart(const uint8_t data);
|
||||
size_t writeUart(const uint8_t *buffer, size_t size);
|
||||
int readUart();
|
||||
size_t readBytesUart(uint8_t *buffer, size_t length);
|
||||
|
||||
//memory
|
||||
uint8_t* getEepromBuffer(uint16_t size);
|
||||
void commitToEeprom();
|
||||
private:
|
||||
uint32_t _multicastAddr;
|
||||
uint16_t _port;
|
||||
int _socketFd = -1;
|
||||
void doMemoryMapping();
|
||||
uint8_t* _mappedFile;
|
||||
int _fd;
|
||||
};
|
||||
|
||||
#endif
|
116
src/main.cpp
Normal file
116
src/main.cpp
Normal file
@ -0,0 +1,116 @@
|
||||
#ifdef __linux__
|
||||
|
||||
#include "linux_platform.h"
|
||||
#include "knx/bau57B0.h"
|
||||
#include "knx/group_object_table_object.h"
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
LinuxPlatform platfrom;
|
||||
Bau57B0 bau(platfrom);
|
||||
|
||||
float currentValue = 0;
|
||||
float maxValue = 0;
|
||||
float minValue = RAND_MAX;
|
||||
long lastsend = 0;
|
||||
|
||||
GroupObject groupObjects[]
|
||||
{
|
||||
GroupObject(2),
|
||||
GroupObject(2),
|
||||
GroupObject(2),
|
||||
GroupObject(1)
|
||||
};
|
||||
#define CURR groupObjects[0]
|
||||
#define MAX groupObjects[1]
|
||||
#define MIN groupObjects[2]
|
||||
#define RESET groupObjects[3]
|
||||
|
||||
void measureTemp()
|
||||
{
|
||||
long now = platfrom.millis();
|
||||
if ((now - lastsend) < 2000)
|
||||
return;
|
||||
|
||||
lastsend = now;
|
||||
int r = rand();
|
||||
currentValue = (r * 1.0) / (RAND_MAX * 1.0);
|
||||
currentValue *= 100 * 100;
|
||||
|
||||
CURR.objectWrite(currentValue);
|
||||
|
||||
if (currentValue > maxValue)
|
||||
{
|
||||
maxValue = currentValue;
|
||||
MAX.objectWrite(maxValue);
|
||||
}
|
||||
|
||||
if (currentValue < minValue)
|
||||
{
|
||||
minValue = currentValue;
|
||||
MIN.objectWrite(minValue);
|
||||
}
|
||||
}
|
||||
|
||||
void resetCallback(GroupObject& go)
|
||||
{
|
||||
if (go.objectReadBool())
|
||||
{
|
||||
maxValue = 0;
|
||||
minValue = 10000;
|
||||
}
|
||||
}
|
||||
|
||||
void appLoop()
|
||||
{
|
||||
if (!bau.configured())
|
||||
return;
|
||||
|
||||
measureTemp();
|
||||
}
|
||||
|
||||
void setup()
|
||||
{
|
||||
srand((unsigned int)time(NULL));
|
||||
bau.readMemory();
|
||||
|
||||
uint8_t hwType[] = { 0x0, 0x0, 0x8, 0x0, 0x0, 0x2 };
|
||||
GroupObjectTableObject& got(bau.groupObjectTable());
|
||||
got.groupObjects(groupObjects, 4);
|
||||
|
||||
DeviceObject& devObj(bau.deviceObject());
|
||||
devObj.manufacturerId(0xfa);
|
||||
devObj.bauNumber(0xdeadbeef);
|
||||
devObj.orderNumber("Coolstuff");
|
||||
devObj.hardwareType(hwType);
|
||||
devObj.version(0x0020);
|
||||
|
||||
RESET.updateHandler = resetCallback;
|
||||
|
||||
if (bau.deviceObject().induvidualAddress() == 0)
|
||||
bau.deviceObject().progMode(true);
|
||||
|
||||
if (bau.parameters().loadState() == LS_LOADED)
|
||||
{
|
||||
printf("Timeout: %d\n", bau.parameters().getWord(0));
|
||||
printf("Zykl. senden: %d\n", bau.parameters().getByte(2));
|
||||
printf("Min/Max senden: %d\n", bau.parameters().getByte(3));
|
||||
printf("Aenderung senden: %d\n", bau.parameters().getByte(4));
|
||||
printf("Abgleich %d\n", bau.parameters().getByte(5));
|
||||
}
|
||||
bau.enabled(true);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
setup();
|
||||
|
||||
while (1)
|
||||
{
|
||||
bau.loop();
|
||||
appLoop();
|
||||
platfrom.mdelay(100);
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,9 +1,11 @@
|
||||
#include <ESP8266WiFi.h>
|
||||
|
||||
#include "nowifistate.h"
|
||||
#include "wpsstate.h"
|
||||
#include "runningstate.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
|
||||
#include <ESP8266WiFi.h>
|
||||
|
||||
NoWifiState noWifiState = NoWifiState();
|
||||
|
||||
void NoWifiState::shortButtonPress()
|
||||
@ -32,4 +34,6 @@ void NoWifiState::enterState()
|
||||
Serial.printf("\nConnected successful to SSID '%s'\n", WiFi.SSID().c_str());
|
||||
switchToSate(runningState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include "state.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
|
||||
class NoWifiState : public State
|
||||
{
|
||||
public:
|
||||
@ -13,4 +15,6 @@ public:
|
||||
virtual const char* name() { return "NoWifi"; }
|
||||
};
|
||||
|
||||
extern NoWifiState noWifiState;
|
||||
extern NoWifiState noWifiState;
|
||||
|
||||
#endif
|
@ -2,6 +2,7 @@
|
||||
#include "runningstate.h"
|
||||
#include "knx_facade.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
ProgramModeState programModeState = ProgramModeState();
|
||||
|
||||
void ProgramModeState::enterState()
|
||||
@ -24,3 +25,4 @@ void ProgramModeState::loop()
|
||||
State::loop();
|
||||
knx.knxLoop();
|
||||
}
|
||||
#endif
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include "state.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
|
||||
class ProgramModeState : public State
|
||||
{
|
||||
public:
|
||||
@ -14,4 +16,6 @@ public:
|
||||
virtual const char* name() { return "ProgramMode"; }
|
||||
};
|
||||
|
||||
extern ProgramModeState programModeState;
|
||||
extern ProgramModeState programModeState;
|
||||
|
||||
#endif
|
@ -3,6 +3,8 @@
|
||||
#include "wpsstate.h"
|
||||
#include "knx_facade.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
|
||||
RunningState runningState = RunningState();
|
||||
|
||||
void RunningState::shortButtonPress()
|
||||
@ -38,3 +40,4 @@ void RunningState::loop()
|
||||
State::loop();
|
||||
knx.knxLoop();
|
||||
}
|
||||
#endif
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "state.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
class RunningState : public State
|
||||
{
|
||||
public:
|
||||
@ -17,4 +17,5 @@ private:
|
||||
bool _initialized = false;
|
||||
};
|
||||
|
||||
extern RunningState runningState;
|
||||
extern RunningState runningState;
|
||||
#endif
|
157
src/samd_platform.cpp
Normal file
157
src/samd_platform.cpp
Normal file
@ -0,0 +1,157 @@
|
||||
#include "samd_platform.h"
|
||||
|
||||
#ifdef ARDUINO_ARCH_SAMD
|
||||
#include <knx/bits.h>
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <FlashAsEEPROM.h>
|
||||
|
||||
SamdPlatform::SamdPlatform()
|
||||
{
|
||||
}
|
||||
|
||||
uint32_t SamdPlatform::currentIpAddress()
|
||||
{
|
||||
// not needed
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t SamdPlatform::currentSubnetMask()
|
||||
{
|
||||
// not needed
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t SamdPlatform::currentDefaultGateway()
|
||||
{
|
||||
// not needed
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SamdPlatform::macAddress(uint8_t * addr)
|
||||
{
|
||||
// not needed
|
||||
}
|
||||
|
||||
uint32_t SamdPlatform::millis()
|
||||
{
|
||||
return::millis();
|
||||
}
|
||||
|
||||
void SamdPlatform::mdelay(uint32_t millis)
|
||||
{
|
||||
delay(millis);
|
||||
}
|
||||
|
||||
void SamdPlatform::restart()
|
||||
{
|
||||
SerialUSB.println("restart");
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void SamdPlatform::fatalError()
|
||||
{
|
||||
const int period = 200;
|
||||
while (true)
|
||||
{
|
||||
if ((millis() % period) > (period / 2))
|
||||
digitalWrite(LED_BUILTIN, HIGH);
|
||||
else
|
||||
digitalWrite(LED_BUILTIN, LOW);
|
||||
}
|
||||
}
|
||||
|
||||
void SamdPlatform::setupMultiCast(uint32_t addr, uint16_t port)
|
||||
{
|
||||
//not needed
|
||||
}
|
||||
|
||||
void SamdPlatform::closeMultiCast()
|
||||
{
|
||||
//not needed
|
||||
}
|
||||
|
||||
bool SamdPlatform::sendBytes(uint8_t * buffer, uint16_t len)
|
||||
{
|
||||
//not needed
|
||||
}
|
||||
|
||||
int SamdPlatform::readBytes(uint8_t * buffer, uint16_t maxLen)
|
||||
{
|
||||
//not needed
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t * SamdPlatform::getEepromBuffer(uint16_t size)
|
||||
{
|
||||
//EEPROM.begin(size);
|
||||
if(size > EEPROM_EMULATION_SIZE)
|
||||
fatalError();
|
||||
|
||||
return EEPROM.getDataPtr();
|
||||
}
|
||||
|
||||
void SamdPlatform::commitToEeprom()
|
||||
{
|
||||
EEPROM.commit();
|
||||
}
|
||||
|
||||
|
||||
void SamdPlatform::setupUart()
|
||||
{
|
||||
SerialKNX.begin(19200, SERIAL_8E1);
|
||||
while (!SerialKNX)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
void SamdPlatform::closeUart()
|
||||
{
|
||||
SerialKNX.end();
|
||||
}
|
||||
|
||||
|
||||
int SamdPlatform::uartAvailable()
|
||||
{
|
||||
return SerialKNX.available();
|
||||
}
|
||||
|
||||
|
||||
size_t SamdPlatform::writeUart(const uint8_t data)
|
||||
{
|
||||
//printHex("<p", &data, 1);
|
||||
return SerialKNX.write(data);
|
||||
}
|
||||
|
||||
|
||||
size_t SamdPlatform::writeUart(const uint8_t *buffer, size_t size)
|
||||
{
|
||||
//printHex("<p", buffer, size);
|
||||
return SerialKNX.write(buffer, size);
|
||||
}
|
||||
|
||||
|
||||
int SamdPlatform::readUart()
|
||||
{
|
||||
int val = SerialKNX.read();
|
||||
//if(val > 0)
|
||||
// printHex("p>", (uint8_t*)&val, 1);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
size_t SamdPlatform::readBytesUart(uint8_t *buffer, size_t length)
|
||||
{
|
||||
size_t toRead = length;
|
||||
uint8_t* pos = buffer;
|
||||
while (toRead > 0)
|
||||
{
|
||||
size_t val = SerialKNX.readBytes(pos, toRead);
|
||||
pos += val;
|
||||
toRead -= val;
|
||||
}
|
||||
//printHex("p>", buffer, length);
|
||||
return length;
|
||||
}
|
||||
|
||||
#endif
|
50
src/samd_platform.h
Normal file
50
src/samd_platform.h
Normal file
@ -0,0 +1,50 @@
|
||||
#include "knx/platform.h"
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#ifdef ARDUINO_ARCH_SAMD
|
||||
|
||||
#define SerialDBG SerialUSB
|
||||
#define SerialKNX Serial1
|
||||
|
||||
class SamdPlatform : public Platform
|
||||
{
|
||||
public:
|
||||
SamdPlatform();
|
||||
|
||||
// ip stuff
|
||||
uint32_t currentIpAddress();
|
||||
uint32_t currentSubnetMask();
|
||||
uint32_t currentDefaultGateway();
|
||||
void macAddress(uint8_t* addr);
|
||||
|
||||
// basic stuff
|
||||
uint32_t millis();
|
||||
void mdelay(uint32_t millis);
|
||||
void restart();
|
||||
void fatalError();
|
||||
|
||||
//multicast
|
||||
void setupMultiCast(uint32_t addr, uint16_t port);
|
||||
void closeMultiCast();
|
||||
bool sendBytes(uint8_t* buffer, uint16_t len);
|
||||
int readBytes(uint8_t* buffer, uint16_t maxLen);
|
||||
|
||||
//uart
|
||||
virtual void setupUart();
|
||||
virtual void closeUart();
|
||||
virtual int uartAvailable();
|
||||
virtual size_t writeUart(const uint8_t data);
|
||||
virtual size_t writeUart(const uint8_t *buffer, size_t size);
|
||||
virtual int readUart();
|
||||
virtual size_t readBytesUart(uint8_t *buffer, size_t length);
|
||||
|
||||
//memory
|
||||
uint8_t* getEepromBuffer(uint16_t size);
|
||||
void commitToEeprom();
|
||||
private:
|
||||
uint32_t _mulitcastAddr;
|
||||
uint16_t _mulitcastPort;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,6 +1,8 @@
|
||||
#include "state.h"
|
||||
#include "Arduino.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
|
||||
State* volatile currentState = 0;
|
||||
State* volatile nextState = 0;
|
||||
|
||||
@ -51,3 +53,5 @@ void State::loop()
|
||||
{
|
||||
checkStates();
|
||||
}
|
||||
|
||||
#endif
|
@ -1,4 +1,7 @@
|
||||
#pragma once
|
||||
#include "arch_config.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
|
||||
class State
|
||||
{
|
||||
@ -26,4 +29,6 @@ void switchToSate(State& state);
|
||||
void checkStates();
|
||||
|
||||
extern State* volatile currentState;
|
||||
extern State* volatile nextState;
|
||||
extern State* volatile nextState;
|
||||
|
||||
#endif
|
@ -1,3 +1,6 @@
|
||||
#include "arch_config.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
#include <ESP8266WiFi.h>
|
||||
|
||||
#include "wpsstate.h"
|
||||
@ -26,3 +29,5 @@ void WpsState::enterState()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "state.h"
|
||||
|
||||
#ifdef USE_STATES
|
||||
class WpsState : public State
|
||||
{
|
||||
public:
|
||||
@ -12,3 +13,5 @@ public:
|
||||
};
|
||||
|
||||
extern WpsState wpsState;
|
||||
|
||||
#endif
|
||||
|
95
visualstudio/ClassDiagram.cd
Normal file
95
visualstudio/ClassDiagram.cd
Normal file
@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="AddressTableObject" Collapsed="true">
|
||||
<Position X="2.25" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>IBAAAAAAQACAEAIAABAAAAgAAAAAAAAAAAAAAABAAEA=</HashCode>
|
||||
<FileName>knx\address_table_object.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="ApplicationProgramObject" Collapsed="true">
|
||||
<Position X="4" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AIAAAAAAAACAAAIAgCAAAAAgABAEAAAAAAAQQABAAAA=</HashCode>
|
||||
<FileName>knx\application_program_object.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="AssociationTableObject" Collapsed="true">
|
||||
<Position X="5.75" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAACAAgIAABAAQAgAAAEAAAAAAAAAAABAAEA=</HashCode>
|
||||
<FileName>knx\association_table_object.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DeviceObject" Collapsed="true">
|
||||
<Position X="0.5" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACACEAAAGCIAKAQCAgAACgCECAAEIgAEgAAgJAAAA=</HashCode>
|
||||
<FileName>knx\device_object.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="GroupObjectTableObject" Collapsed="true">
|
||||
<Position X="7.5" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAEAACACAAgIAAhAATAgACAAAAAAAAAAAAABAAAA=</HashCode>
|
||||
<FileName>knx\group_object_table_object.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="InterfaceObject" Collapsed="true">
|
||||
<Position X="2" Y="1.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAAAAAABBAAAA=</HashCode>
|
||||
<FileName>knx\interface_object.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="IpParameterObject" Collapsed="true">
|
||||
<Position X="2.75" Y="2.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAIACIAAYACAAKIAAGAQCAAgWAIAAAAGAAAAAABgAIA=</HashCode>
|
||||
<FileName>knx\ip_parameter_object.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="TableObject" Collapsed="true">
|
||||
<Position X="4.25" Y="0.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAIACIACBACAAIIAAGAASAgwyAAAAAAAAgAAAAJgAAA=</HashCode>
|
||||
<FileName>knx\table_object.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="BusAccessUnit" Collapsed="true">
|
||||
<Position X="6.75" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>sKoIAAAAQIIxC4gUUEAIAAACiQEgAjQUFCCA5yEAIBw=</HashCode>
|
||||
<FileName>knx\bau.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Bau57B0" Collapsed="true">
|
||||
<Position X="6.75" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABIAAFAgAgIwCoAAUiCCQIDAiEBgADQQACAAAAKQABw=</HashCode>
|
||||
<FileName>knx\bau57B0.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="LinuxPlatform" Collapsed="true">
|
||||
<Position X="9.75" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>BACCIBAAICAAICgAAABAgAAQAAAAAAgAAADAEAAAAhA=</HashCode>
|
||||
<FileName>linux_platform.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="SaveRestore" Collapsed="true">
|
||||
<Position X="0.5" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAACAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>knx\save_restore.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Platform" Collapsed="true">
|
||||
<Position X="9.75" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACIBAAICAAIAAAAABAgAAAAAAAAAgAAADAEAAAAhA=</HashCode>
|
||||
<FileName>knx\platform.h</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
@ -10,7 +10,7 @@
|
||||
<ProjectGUID>58afeecd-06e2-4bb7-a13f-e1d5dbaed13f</ProjectGUID>
|
||||
<GroupSourcesByTypes>true</GroupSourcesByTypes>
|
||||
<GroupSourcesByPaths>true</GroupSourcesByPaths>
|
||||
<SketchSubdirectory>..\examples\knx-esp-bme680</SketchSubdirectory>
|
||||
<SketchSubdirectory>..\examples\knx-bme680</SketchSubdirectory>
|
||||
<MainSketchFile>basic_config_state_ulp_plus.ino</MainSketchFile>
|
||||
<RootSketchFolder>
|
||||
<Subfolders />
|
||||
@ -278,6 +278,63 @@
|
||||
<DebugUnoptimizedComponentTypes>Sketch</DebugUnoptimizedComponentTypes>
|
||||
</BuildSettingsExtension>
|
||||
</VisualGDBConfiguration>
|
||||
<VisualGDBConfiguration>
|
||||
<PlatformName>Arduino Genuino Zero (Native USB Port)</PlatformName>
|
||||
<DebugSettingsOverride xsi:type="com.visualgdb.debug.embedded">
|
||||
<AdditionalStartupCommands />
|
||||
<AdditionalGDBSettings>
|
||||
<Features>
|
||||
<DisableAutoDetection>false</DisableAutoDetection>
|
||||
<UseFrameParameter>false</UseFrameParameter>
|
||||
<SimpleValuesFlagSupported>false</SimpleValuesFlagSupported>
|
||||
<ListLocalsSupported>false</ListLocalsSupported>
|
||||
<ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable>
|
||||
<ThreadInfoSupported>false</ThreadInfoSupported>
|
||||
<PendingBreakpointsSupported>false</PendingBreakpointsSupported>
|
||||
<SupportTargetCommand>false</SupportTargetCommand>
|
||||
<ReliableBreakpointNotifications>false</ReliableBreakpointNotifications>
|
||||
</Features>
|
||||
<EnableSmartStepping>false</EnableSmartStepping>
|
||||
<FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications>
|
||||
<ForceSingleThreadedMode>false</ForceSingleThreadedMode>
|
||||
<UseAppleExtensions>false</UseAppleExtensions>
|
||||
<CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning>
|
||||
<MakeLogFile>false</MakeLogFile>
|
||||
<IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping>
|
||||
<UseRelativePathsOnly>false</UseRelativePathsOnly>
|
||||
<ExitAction>None</ExitAction>
|
||||
<DisableDisassembly>false</DisableDisassembly>
|
||||
<ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand>
|
||||
<StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry>
|
||||
<ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat>
|
||||
<DisableSignals>false</DisableSignals>
|
||||
<EnableAsyncExecutionMode>false</EnableAsyncExecutionMode>
|
||||
<EnableNonStopMode>false</EnableNonStopMode>
|
||||
<MaxBreakpointLimit>0</MaxBreakpointLimit>
|
||||
</AdditionalGDBSettings>
|
||||
<DebugMethod />
|
||||
<AutoDetectRTOS>true</AutoDetectRTOS>
|
||||
<SemihostingSupport>Auto</SemihostingSupport>
|
||||
<SemihostingPollingDelay>0</SemihostingPollingDelay>
|
||||
<StepIntoEntryPoint>false</StepIntoEntryPoint>
|
||||
<ReloadFirmwareOnReset>false</ReloadFirmwareOnReset>
|
||||
<ValidateEndOfStackAddress>true</ValidateEndOfStackAddress>
|
||||
<StopAtEntryPoint>false</StopAtEntryPoint>
|
||||
<EnableVirtualHalts>false</EnableVirtualHalts>
|
||||
<DynamicAnalysisSettings />
|
||||
<EndOfStackSymbol>_estack</EndOfStackSymbol>
|
||||
<TimestampProviderTicksPerSecond>0</TimestampProviderTicksPerSecond>
|
||||
<KeepConsoleAfterExit>false</KeepConsoleAfterExit>
|
||||
<CheckInterfaceDrivers>true</CheckInterfaceDrivers>
|
||||
</DebugSettingsOverride>
|
||||
<BuildSettingsExtension xsi:type="com.visualgdb.build.external.arduino.extension">
|
||||
<BoardID>arduino:samd:arduino_zero_native</BoardID>
|
||||
<Properties>
|
||||
<Entries />
|
||||
</Properties>
|
||||
<DebugUnoptimizedComponentTypes>Sketch</DebugUnoptimizedComponentTypes>
|
||||
</BuildSettingsExtension>
|
||||
</VisualGDBConfiguration>
|
||||
</Configurations>
|
||||
<ProgramArgumentsSuggestions />
|
||||
</VisualGDBProjectSettings2>
|
@ -10,12 +10,12 @@
|
||||
<ProjectGUID>6165cd6a-91a4-49fa-977a-48f22086ca8e</ProjectGUID>
|
||||
<GroupSourcesByTypes>true</GroupSourcesByTypes>
|
||||
<GroupSourcesByPaths>true</GroupSourcesByPaths>
|
||||
<SketchSubdirectory>..\examples\knx-esp-demo</SketchSubdirectory>
|
||||
<SketchSubdirectory>..\examples\knx-demo</SketchSubdirectory>
|
||||
<MainSketchFile>Sketch.ino</MainSketchFile>
|
||||
<RootSketchFolder>
|
||||
<Subfolders />
|
||||
<Files>
|
||||
<string>knx-esp-demo.ino</string>
|
||||
<string>knx-demo.ino</string>
|
||||
</Files>
|
||||
</RootSketchFolder>
|
||||
<OtherFiles />
|
||||
@ -82,6 +82,12 @@
|
||||
<Green>238</Green>
|
||||
<Blue>144</Blue>
|
||||
</Echo>
|
||||
<Inactive>
|
||||
<Alpha>255</Alpha>
|
||||
<Red>169</Red>
|
||||
<Green>169</Green>
|
||||
<Blue>169</Blue>
|
||||
</Inactive>
|
||||
</Colors>
|
||||
<HexSettings>
|
||||
<MaximumBytesPerLine>16</MaximumBytesPerLine>
|
||||
@ -275,6 +281,63 @@
|
||||
<DebugUnoptimizedComponentTypes>Sketch</DebugUnoptimizedComponentTypes>
|
||||
</BuildSettingsExtension>
|
||||
</VisualGDBConfiguration>
|
||||
<VisualGDBConfiguration>
|
||||
<PlatformName>Arduino Genuino Zero (Native USB Port)</PlatformName>
|
||||
<DebugSettingsOverride xsi:type="com.visualgdb.debug.embedded">
|
||||
<AdditionalStartupCommands />
|
||||
<AdditionalGDBSettings>
|
||||
<Features>
|
||||
<DisableAutoDetection>false</DisableAutoDetection>
|
||||
<UseFrameParameter>false</UseFrameParameter>
|
||||
<SimpleValuesFlagSupported>false</SimpleValuesFlagSupported>
|
||||
<ListLocalsSupported>false</ListLocalsSupported>
|
||||
<ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable>
|
||||
<ThreadInfoSupported>false</ThreadInfoSupported>
|
||||
<PendingBreakpointsSupported>false</PendingBreakpointsSupported>
|
||||
<SupportTargetCommand>false</SupportTargetCommand>
|
||||
<ReliableBreakpointNotifications>false</ReliableBreakpointNotifications>
|
||||
</Features>
|
||||
<EnableSmartStepping>false</EnableSmartStepping>
|
||||
<FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications>
|
||||
<ForceSingleThreadedMode>false</ForceSingleThreadedMode>
|
||||
<UseAppleExtensions>false</UseAppleExtensions>
|
||||
<CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning>
|
||||
<MakeLogFile>false</MakeLogFile>
|
||||
<IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping>
|
||||
<UseRelativePathsOnly>false</UseRelativePathsOnly>
|
||||
<ExitAction>None</ExitAction>
|
||||
<DisableDisassembly>false</DisableDisassembly>
|
||||
<ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand>
|
||||
<StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry>
|
||||
<ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat>
|
||||
<DisableSignals>false</DisableSignals>
|
||||
<EnableAsyncExecutionMode>false</EnableAsyncExecutionMode>
|
||||
<EnableNonStopMode>false</EnableNonStopMode>
|
||||
<MaxBreakpointLimit>0</MaxBreakpointLimit>
|
||||
</AdditionalGDBSettings>
|
||||
<DebugMethod />
|
||||
<AutoDetectRTOS>true</AutoDetectRTOS>
|
||||
<SemihostingSupport>Auto</SemihostingSupport>
|
||||
<SemihostingPollingDelay>0</SemihostingPollingDelay>
|
||||
<StepIntoEntryPoint>false</StepIntoEntryPoint>
|
||||
<ReloadFirmwareOnReset>false</ReloadFirmwareOnReset>
|
||||
<ValidateEndOfStackAddress>true</ValidateEndOfStackAddress>
|
||||
<StopAtEntryPoint>false</StopAtEntryPoint>
|
||||
<EnableVirtualHalts>false</EnableVirtualHalts>
|
||||
<DynamicAnalysisSettings />
|
||||
<EndOfStackSymbol>_estack</EndOfStackSymbol>
|
||||
<TimestampProviderTicksPerSecond>0</TimestampProviderTicksPerSecond>
|
||||
<KeepConsoleAfterExit>false</KeepConsoleAfterExit>
|
||||
<CheckInterfaceDrivers>true</CheckInterfaceDrivers>
|
||||
</DebugSettingsOverride>
|
||||
<BuildSettingsExtension xsi:type="com.visualgdb.build.external.arduino.extension">
|
||||
<BoardID>arduino:samd:arduino_zero_native</BoardID>
|
||||
<Properties>
|
||||
<Entries />
|
||||
</Properties>
|
||||
<DebugUnoptimizedComponentTypes>Sketch</DebugUnoptimizedComponentTypes>
|
||||
</BuildSettingsExtension>
|
||||
</VisualGDBConfiguration>
|
||||
</Configurations>
|
||||
<ProgramArgumentsSuggestions />
|
||||
</VisualGDBProjectSettings2>
|
148
visualstudio/knx-linux-Debug.vgdbsettings
Normal file
148
visualstudio/knx-linux-Debug.vgdbsettings
Normal file
@ -0,0 +1,148 @@
|
||||
<?xml version="1.0"?>
|
||||
<VisualGDBProjectSettings2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<ConfigurationName>Release</ConfigurationName>
|
||||
<Project xsi:type="com.visualgdb.project.linux">
|
||||
<CustomSourceDirectories>
|
||||
<Directories />
|
||||
<PathStyle>RemoteUnix</PathStyle>
|
||||
</CustomSourceDirectories>
|
||||
<BuildHost>
|
||||
<HostName>localhost</HostName>
|
||||
<Transport>LinuxSubsystem</Transport>
|
||||
<UserName>Linux</UserName>
|
||||
</BuildHost>
|
||||
<MainSourceTransferCommand>
|
||||
<SkipWhenRunningCommandList>false</SkipWhenRunningCommandList>
|
||||
<RemoteHost>
|
||||
<HostName>localhost</HostName>
|
||||
<Transport>LinuxSubsystem</Transport>
|
||||
<UserName>Linux</UserName>
|
||||
</RemoteHost>
|
||||
<LocalDirectory>$(ProjectDir)</LocalDirectory>
|
||||
<RemoteDirectory>/home/tkunze/vgdb/knx-linux</RemoteDirectory>
|
||||
<FileMasks>
|
||||
<string>*.cpp</string>
|
||||
<string>*.h</string>
|
||||
<string>*.hpp</string>
|
||||
<string>*.c</string>
|
||||
<string>*.cc</string>
|
||||
<string>*.cxx</string>
|
||||
<string>*.mak</string>
|
||||
<string>Makefile</string>
|
||||
<string>*.txt</string>
|
||||
<string>*.cmake</string>
|
||||
<string>CMakeLists.txt</string>
|
||||
<string>*.cmake</string>
|
||||
</FileMasks>
|
||||
<TransferNewFilesOnly>true</TransferNewFilesOnly>
|
||||
<IncludeSubdirectories>true</IncludeSubdirectories>
|
||||
<SelectedDirectories />
|
||||
<DeleteDisappearedFiles>true</DeleteDisappearedFiles>
|
||||
<ApplyGlobalExclusionList>true</ApplyGlobalExclusionList>
|
||||
</MainSourceTransferCommand>
|
||||
<AllowChangingHostForMainCommands>false</AllowChangingHostForMainCommands>
|
||||
<SkipBuildIfNoSourceFilesChanged>false</SkipBuildIfNoSourceFilesChanged>
|
||||
<IgnoreFileTransferErrors>false</IgnoreFileTransferErrors>
|
||||
<RemoveRemoteDirectoryOnClean>false</RemoveRemoteDirectoryOnClean>
|
||||
<SkipDeploymentTests>false</SkipDeploymentTests>
|
||||
<MainSourceDirectoryForLocalBuilds>$(ProjectDir)</MainSourceDirectoryForLocalBuilds>
|
||||
</Project>
|
||||
<Build xsi:type="com.visualgdb.build.msbuild">
|
||||
<ToolchainID>
|
||||
<ID>com.sysprogs.toolchain.default-gcc</ID>
|
||||
<Version>
|
||||
<Revision>0</Revision>
|
||||
</Version>
|
||||
</ToolchainID>
|
||||
<ProjectFile>knx-linux.vcxproj</ProjectFile>
|
||||
<ParallelJobCount>0</ParallelJobCount>
|
||||
<SuppressDirectoryChangeMessages>true</SuppressDirectoryChangeMessages>
|
||||
</Build>
|
||||
<CustomBuild>
|
||||
<PreSyncActions />
|
||||
<PreBuildActions />
|
||||
<PostBuildActions />
|
||||
<PreCleanActions />
|
||||
<PostCleanActions />
|
||||
</CustomBuild>
|
||||
<CustomDebug>
|
||||
<PreDebugActions />
|
||||
<PostDebugActions />
|
||||
<DebugStopActions />
|
||||
<BreakMode>Default</BreakMode>
|
||||
</CustomDebug>
|
||||
<CustomShortcuts>
|
||||
<Shortcuts />
|
||||
<ShowMessageAfterExecuting>true</ShowMessageAfterExecuting>
|
||||
</CustomShortcuts>
|
||||
<UserDefinedVariables />
|
||||
<ImportedPropertySheets />
|
||||
<CodeSense>
|
||||
<Enabled>Unknown</Enabled>
|
||||
<ExtraSettings>
|
||||
<HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders>
|
||||
<SupportLightweightReferenceAnalysis>false</SupportLightweightReferenceAnalysis>
|
||||
<CheckForClangFormatFiles xsi:nil="true" />
|
||||
<FormattingEngine xsi:nil="true" />
|
||||
</ExtraSettings>
|
||||
<CodeAnalyzerSettings>
|
||||
<Enabled>false</Enabled>
|
||||
</CodeAnalyzerSettings>
|
||||
</CodeSense>
|
||||
<Configurations />
|
||||
<ProgramArgumentsSuggestions />
|
||||
<Debug xsi:type="com.visualgdb.debug.remote">
|
||||
<AdditionalStartupCommands />
|
||||
<AdditionalGDBSettings>
|
||||
<Features>
|
||||
<DisableAutoDetection>false</DisableAutoDetection>
|
||||
<UseFrameParameter>false</UseFrameParameter>
|
||||
<SimpleValuesFlagSupported>false</SimpleValuesFlagSupported>
|
||||
<ListLocalsSupported>false</ListLocalsSupported>
|
||||
<ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable>
|
||||
<ThreadInfoSupported>false</ThreadInfoSupported>
|
||||
<PendingBreakpointsSupported>false</PendingBreakpointsSupported>
|
||||
<SupportTargetCommand>false</SupportTargetCommand>
|
||||
<ReliableBreakpointNotifications>false</ReliableBreakpointNotifications>
|
||||
</Features>
|
||||
<EnableSmartStepping>false</EnableSmartStepping>
|
||||
<FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications>
|
||||
<ForceSingleThreadedMode>false</ForceSingleThreadedMode>
|
||||
<UseAppleExtensions>false</UseAppleExtensions>
|
||||
<CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning>
|
||||
<MakeLogFile>false</MakeLogFile>
|
||||
<IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping>
|
||||
<UseRelativePathsOnly>false</UseRelativePathsOnly>
|
||||
<ExitAction>None</ExitAction>
|
||||
<DisableDisassembly>false</DisableDisassembly>
|
||||
<ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand>
|
||||
<StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry>
|
||||
<ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat>
|
||||
<DisableSignals>false</DisableSignals>
|
||||
<EnableAsyncExecutionMode>false</EnableAsyncExecutionMode>
|
||||
<EnableNonStopMode>false</EnableNonStopMode>
|
||||
<MaxBreakpointLimit>0</MaxBreakpointLimit>
|
||||
</AdditionalGDBSettings>
|
||||
<LaunchGDBSettings xsi:type="GDBLaunchParametersNewInstance">
|
||||
<GDBEnvironment>
|
||||
<Records>
|
||||
<Record>
|
||||
<VariableName>LANG</VariableName>
|
||||
<Value>en_US.UTF-8</Value>
|
||||
</Record>
|
||||
</Records>
|
||||
<EnvironmentSetupFiles />
|
||||
</GDBEnvironment>
|
||||
<DebuggedProgram>$(TargetPath)</DebuggedProgram>
|
||||
<GDBServerPort>2000</GDBServerPort>
|
||||
<ProgramArguments />
|
||||
</LaunchGDBSettings>
|
||||
<GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC>
|
||||
<X11WindowMode>Local</X11WindowMode>
|
||||
<KeepConsoleAfterExit>false</KeepConsoleAfterExit>
|
||||
<RunGDBUnderSudo>false</RunGDBUnderSudo>
|
||||
<DeploymentMode>Auto</DeploymentMode>
|
||||
<DeployWhenLaunchedWithoutDebugging>true</DeployWhenLaunchedWithoutDebugging>
|
||||
<SuppressTTYCreation>false</SuppressTTYCreation>
|
||||
</Debug>
|
||||
</VisualGDBProjectSettings2>
|
148
visualstudio/knx-linux-Release.vgdbsettings
Normal file
148
visualstudio/knx-linux-Release.vgdbsettings
Normal file
@ -0,0 +1,148 @@
|
||||
<?xml version="1.0"?>
|
||||
<VisualGDBProjectSettings2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<ConfigurationName>Release</ConfigurationName>
|
||||
<Project xsi:type="com.visualgdb.project.linux">
|
||||
<CustomSourceDirectories>
|
||||
<Directories />
|
||||
<PathStyle>RemoteUnix</PathStyle>
|
||||
</CustomSourceDirectories>
|
||||
<BuildHost>
|
||||
<HostName>localhost</HostName>
|
||||
<Transport>LinuxSubsystem</Transport>
|
||||
<UserName>Linux</UserName>
|
||||
</BuildHost>
|
||||
<MainSourceTransferCommand>
|
||||
<SkipWhenRunningCommandList>false</SkipWhenRunningCommandList>
|
||||
<RemoteHost>
|
||||
<HostName>localhost</HostName>
|
||||
<Transport>LinuxSubsystem</Transport>
|
||||
<UserName>Linux</UserName>
|
||||
</RemoteHost>
|
||||
<LocalDirectory>$(ProjectDir)</LocalDirectory>
|
||||
<RemoteDirectory>/home/tkunze/vgdb/knx-linux</RemoteDirectory>
|
||||
<FileMasks>
|
||||
<string>*.cpp</string>
|
||||
<string>*.h</string>
|
||||
<string>*.hpp</string>
|
||||
<string>*.c</string>
|
||||
<string>*.cc</string>
|
||||
<string>*.cxx</string>
|
||||
<string>*.mak</string>
|
||||
<string>Makefile</string>
|
||||
<string>*.txt</string>
|
||||
<string>*.cmake</string>
|
||||
<string>CMakeLists.txt</string>
|
||||
<string>*.cmake</string>
|
||||
</FileMasks>
|
||||
<TransferNewFilesOnly>true</TransferNewFilesOnly>
|
||||
<IncludeSubdirectories>true</IncludeSubdirectories>
|
||||
<SelectedDirectories />
|
||||
<DeleteDisappearedFiles>true</DeleteDisappearedFiles>
|
||||
<ApplyGlobalExclusionList>true</ApplyGlobalExclusionList>
|
||||
</MainSourceTransferCommand>
|
||||
<AllowChangingHostForMainCommands>false</AllowChangingHostForMainCommands>
|
||||
<SkipBuildIfNoSourceFilesChanged>false</SkipBuildIfNoSourceFilesChanged>
|
||||
<IgnoreFileTransferErrors>false</IgnoreFileTransferErrors>
|
||||
<RemoveRemoteDirectoryOnClean>false</RemoveRemoteDirectoryOnClean>
|
||||
<SkipDeploymentTests>false</SkipDeploymentTests>
|
||||
<MainSourceDirectoryForLocalBuilds>$(ProjectDir)</MainSourceDirectoryForLocalBuilds>
|
||||
</Project>
|
||||
<Build xsi:type="com.visualgdb.build.msbuild">
|
||||
<ToolchainID>
|
||||
<ID>com.sysprogs.toolchain.default-gcc</ID>
|
||||
<Version>
|
||||
<Revision>0</Revision>
|
||||
</Version>
|
||||
</ToolchainID>
|
||||
<ProjectFile>knx-linux.vcxproj</ProjectFile>
|
||||
<ParallelJobCount>0</ParallelJobCount>
|
||||
<SuppressDirectoryChangeMessages>true</SuppressDirectoryChangeMessages>
|
||||
</Build>
|
||||
<CustomBuild>
|
||||
<PreSyncActions />
|
||||
<PreBuildActions />
|
||||
<PostBuildActions />
|
||||
<PreCleanActions />
|
||||
<PostCleanActions />
|
||||
</CustomBuild>
|
||||
<CustomDebug>
|
||||
<PreDebugActions />
|
||||
<PostDebugActions />
|
||||
<DebugStopActions />
|
||||
<BreakMode>Default</BreakMode>
|
||||
</CustomDebug>
|
||||
<CustomShortcuts>
|
||||
<Shortcuts />
|
||||
<ShowMessageAfterExecuting>true</ShowMessageAfterExecuting>
|
||||
</CustomShortcuts>
|
||||
<UserDefinedVariables />
|
||||
<ImportedPropertySheets />
|
||||
<CodeSense>
|
||||
<Enabled>Unknown</Enabled>
|
||||
<ExtraSettings>
|
||||
<HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders>
|
||||
<SupportLightweightReferenceAnalysis>false</SupportLightweightReferenceAnalysis>
|
||||
<CheckForClangFormatFiles xsi:nil="true" />
|
||||
<FormattingEngine xsi:nil="true" />
|
||||
</ExtraSettings>
|
||||
<CodeAnalyzerSettings>
|
||||
<Enabled>false</Enabled>
|
||||
</CodeAnalyzerSettings>
|
||||
</CodeSense>
|
||||
<Configurations />
|
||||
<ProgramArgumentsSuggestions />
|
||||
<Debug xsi:type="com.visualgdb.debug.remote">
|
||||
<AdditionalStartupCommands />
|
||||
<AdditionalGDBSettings>
|
||||
<Features>
|
||||
<DisableAutoDetection>false</DisableAutoDetection>
|
||||
<UseFrameParameter>false</UseFrameParameter>
|
||||
<SimpleValuesFlagSupported>false</SimpleValuesFlagSupported>
|
||||
<ListLocalsSupported>false</ListLocalsSupported>
|
||||
<ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable>
|
||||
<ThreadInfoSupported>false</ThreadInfoSupported>
|
||||
<PendingBreakpointsSupported>false</PendingBreakpointsSupported>
|
||||
<SupportTargetCommand>false</SupportTargetCommand>
|
||||
<ReliableBreakpointNotifications>false</ReliableBreakpointNotifications>
|
||||
</Features>
|
||||
<EnableSmartStepping>false</EnableSmartStepping>
|
||||
<FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications>
|
||||
<ForceSingleThreadedMode>false</ForceSingleThreadedMode>
|
||||
<UseAppleExtensions>false</UseAppleExtensions>
|
||||
<CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning>
|
||||
<MakeLogFile>false</MakeLogFile>
|
||||
<IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping>
|
||||
<UseRelativePathsOnly>false</UseRelativePathsOnly>
|
||||
<ExitAction>None</ExitAction>
|
||||
<DisableDisassembly>false</DisableDisassembly>
|
||||
<ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand>
|
||||
<StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry>
|
||||
<ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat>
|
||||
<DisableSignals>false</DisableSignals>
|
||||
<EnableAsyncExecutionMode>false</EnableAsyncExecutionMode>
|
||||
<EnableNonStopMode>false</EnableNonStopMode>
|
||||
<MaxBreakpointLimit>0</MaxBreakpointLimit>
|
||||
</AdditionalGDBSettings>
|
||||
<LaunchGDBSettings xsi:type="GDBLaunchParametersNewInstance">
|
||||
<GDBEnvironment>
|
||||
<Records>
|
||||
<Record>
|
||||
<VariableName>LANG</VariableName>
|
||||
<Value>en_US.UTF-8</Value>
|
||||
</Record>
|
||||
</Records>
|
||||
<EnvironmentSetupFiles />
|
||||
</GDBEnvironment>
|
||||
<DebuggedProgram>$(TargetPath)</DebuggedProgram>
|
||||
<GDBServerPort>2000</GDBServerPort>
|
||||
<ProgramArguments />
|
||||
</LaunchGDBSettings>
|
||||
<GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC>
|
||||
<X11WindowMode>Local</X11WindowMode>
|
||||
<KeepConsoleAfterExit>false</KeepConsoleAfterExit>
|
||||
<RunGDBUnderSudo>false</RunGDBUnderSudo>
|
||||
<DeploymentMode>Auto</DeploymentMode>
|
||||
<DeployWhenLaunchedWithoutDebugging>true</DeployWhenLaunchedWithoutDebugging>
|
||||
<SuppressTTYCreation>false</SuppressTTYCreation>
|
||||
</Debug>
|
||||
</VisualGDBProjectSettings2>
|
131
visualstudio/knx-linux.vcxproj
Normal file
131
visualstudio/knx-linux.vcxproj
Normal file
@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|VisualGDB">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>VisualGDB</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|VisualGDB">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>VisualGDB</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{819E55F9-05A8-454D-B771-4A99F775DD87}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|VisualGDB'">
|
||||
<GNUToolchainPrefix />
|
||||
<GNUCompilerType>GCC</GNUCompilerType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">
|
||||
<GNUToolchainPrefix />
|
||||
<GNUCompilerType>GCC</GNUCompilerType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="VisualGDBPackageDefinitions">
|
||||
<ToolchainID>com.sysprogs.toolchain.default-gcc</ToolchainID>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Label="VisualGDBFindComponents">
|
||||
<Import Project="$(LOCALAPPDATA)\VisualGDB\FindComponents.props" />
|
||||
</ImportGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|VisualGDB'">
|
||||
<RemoteBuildHost>localhost-lxss</RemoteBuildHost>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">
|
||||
<RemoteBuildHost>localhost-lxss</RemoteBuildHost>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|VisualGDB'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>/usr/include/x86_64-linux-gnu;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<LinkerScript />
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>/usr/include/x86_64-linux-gnu;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<LinkerScript />
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ClassDiagram.cd" />
|
||||
<None Include="knx-linux-Debug.vgdbsettings" />
|
||||
<None Include="knx-linux-Release.vgdbsettings" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\knx\address_table_object.h" />
|
||||
<ClInclude Include="..\src\knx\apdu.h" />
|
||||
<ClInclude Include="..\src\knx\application_layer.h" />
|
||||
<ClInclude Include="..\src\knx\application_program_object.h" />
|
||||
<ClInclude Include="..\src\knx\association_table_object.h" />
|
||||
<ClInclude Include="..\src\knx\bau.h" />
|
||||
<ClInclude Include="..\src\knx\bau07B0.h" />
|
||||
<ClInclude Include="..\src\knx\bau57B0.h" />
|
||||
<ClInclude Include="..\src\knx\bau_systemB.h" />
|
||||
<ClInclude Include="..\src\knx\bits.h" />
|
||||
<ClInclude Include="..\src\knx\cemi_frame.h" />
|
||||
<ClInclude Include="..\src\knx\data_link_layer.h" />
|
||||
<ClInclude Include="..\src\knx\datapoint_types.h" />
|
||||
<ClInclude Include="..\src\knx\device_object.h" />
|
||||
<ClInclude Include="..\src\knx\group_object.h" />
|
||||
<ClInclude Include="..\src\knx\group_object_table_object.h" />
|
||||
<ClInclude Include="..\src\knx\interface_object.h" />
|
||||
<ClInclude Include="..\src\knx\ip_data_link_layer.h" />
|
||||
<ClInclude Include="..\src\knx\ip_parameter_object.h" />
|
||||
<ClInclude Include="..\src\knx\knx_types.h" />
|
||||
<ClInclude Include="..\src\knx\memory.h" />
|
||||
<ClInclude Include="..\src\knx\network_layer.h" />
|
||||
<ClInclude Include="..\src\knx\npdu.h" />
|
||||
<ClInclude Include="..\src\knx\platform.h" />
|
||||
<ClInclude Include="..\src\knx\property_types.h" />
|
||||
<ClInclude Include="..\src\knx\save_restore.h" />
|
||||
<ClInclude Include="..\src\knx\table_object.h" />
|
||||
<ClInclude Include="..\src\knx\tpdu.h" />
|
||||
<ClInclude Include="..\src\knx\tpuart_data_link_layer.h" />
|
||||
<ClInclude Include="..\src\knx\transport_layer.h" />
|
||||
<ClInclude Include="..\src\linux_platform.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\knx\address_table_object.cpp" />
|
||||
<ClCompile Include="..\src\knx\apdu.cpp" />
|
||||
<ClCompile Include="..\src\knx\application_layer.cpp" />
|
||||
<ClCompile Include="..\src\knx\application_program_object.cpp" />
|
||||
<ClCompile Include="..\src\knx\association_table_object.cpp" />
|
||||
<ClCompile Include="..\src\knx\bau.cpp" />
|
||||
<ClCompile Include="..\src\knx\bau07B0.cpp" />
|
||||
<ClCompile Include="..\src\knx\bau57B0.cpp" />
|
||||
<ClCompile Include="..\src\knx\bau_systemB.cpp" />
|
||||
<ClCompile Include="..\src\knx\bits.cpp" />
|
||||
<ClCompile Include="..\src\knx\cemi_frame.cpp" />
|
||||
<ClCompile Include="..\src\knx\data_link_layer.cpp" />
|
||||
<ClCompile Include="..\src\knx\datapoint_types.cpp" />
|
||||
<ClCompile Include="..\src\knx\device_object.cpp" />
|
||||
<ClCompile Include="..\src\knx\group_object.cpp" />
|
||||
<ClCompile Include="..\src\knx\group_object_table_object.cpp" />
|
||||
<ClCompile Include="..\src\knx\interface_object.cpp" />
|
||||
<ClCompile Include="..\src\knx\ip_data_link_layer.cpp" />
|
||||
<ClCompile Include="..\src\knx\ip_parameter_object.cpp" />
|
||||
<ClCompile Include="..\src\knx\memory.cpp" />
|
||||
<ClCompile Include="..\src\knx\network_layer.cpp" />
|
||||
<ClCompile Include="..\src\knx\npdu.cpp" />
|
||||
<ClCompile Include="..\src\knx\table_object.cpp" />
|
||||
<ClCompile Include="..\src\knx\tpdu.cpp" />
|
||||
<ClCompile Include="..\src\knx\tpuart_data_link_layer.cpp" />
|
||||
<ClCompile Include="..\src\knx\transport_layer.cpp" />
|
||||
<ClCompile Include="..\src\main.cpp" />
|
||||
<ClCompile Include="..\src\linux_platform.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
217
visualstudio/knx-linux.vcxproj.filters
Normal file
217
visualstudio/knx-linux.vcxproj.filters
Normal file
@ -0,0 +1,217 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source files">
|
||||
<UniqueIdentifier>{7612a532-0bb6-4a82-917a-48cfa6410e4f}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header files">
|
||||
<UniqueIdentifier>{842f6d29-354f-47a8-bfd9-0fccf0ddf144}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource files">
|
||||
<UniqueIdentifier>{c46b2f8f-4105-4638-af5c-09a641257065}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="VisualGDB settings">
|
||||
<UniqueIdentifier>{c818187b-4f9f-4ee9-86c3-d26e56e49bf9}</UniqueIdentifier>
|
||||
<Extensions>*.vgdbsettings</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header files\knx">
|
||||
<UniqueIdentifier>{169b6f5b-b022-4422-ace2-819bf2f5e883}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source files\knx">
|
||||
<UniqueIdentifier>{4054619f-7b60-405c-96e8-311c464cf8de}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ClassDiagram.cd" />
|
||||
<None Include="knx-linux-Debug.vgdbsettings">
|
||||
<Filter>VisualGDB settings</Filter>
|
||||
</None>
|
||||
<None Include="knx-linux-Release.vgdbsettings">
|
||||
<Filter>VisualGDB settings</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\knx\datapoint_types.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\property_types.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\interface_object.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\device_object.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\ip_parameter_object.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\table_object.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\address_table_object.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\association_table_object.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\group_object_table_object.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\application_program_object.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\group_object.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\linux_platform.h">
|
||||
<Filter>Header files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\data_link_layer.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\knx_types.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\cemi_frame.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\npdu.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\network_layer.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\transport_layer.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\tpdu.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\apdu.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\application_layer.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\bau.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\bau57B0.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\bits.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\platform.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\save_restore.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\memory.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\bau_systemB.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\bau07B0.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\ip_data_link_layer.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\knx\tpuart_data_link_layer.h">
|
||||
<Filter>Header files\knx</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\knx\datapoint_types.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\main.cpp">
|
||||
<Filter>Source files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\device_object.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\ip_parameter_object.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\table_object.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\address_table_object.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\association_table_object.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\group_object_table_object.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\application_program_object.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\group_object.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\linux_platform.cpp">
|
||||
<Filter>Source files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\data_link_layer.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\cemi_frame.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\npdu.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\network_layer.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\transport_layer.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\tpdu.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\apdu.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\application_layer.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\bau.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\bau57B0.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\bits.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\memory.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\interface_object.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\bau_systemB.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\bau07B0.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\ip_data_link_layer.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\knx\tpuart_data_link_layer.cpp">
|
||||
<Filter>Source files\knx</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
57
visualstudio/knx.sln
Normal file
57
visualstudio/knx.sln
Normal file
@ -0,0 +1,57 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28010.2050
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "knx-linux", "knx-linux.vcxproj", "{819E55F9-05A8-454D-B771-4A99F775DD87}"
|
||||
EndProject
|
||||
Project("{803FD0C6-D64E-4E16-9DC3-1DAEC859A3D2}") = "knx-bme680", "knx-bme680.vgdbproj", "{58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}"
|
||||
EndProject
|
||||
Project("{803FD0C6-D64E-4E16-9DC3-1DAEC859A3D2}") = "knx-demo", "knx-demo.vgdbproj", "{6165CD6A-91A4-49FA-977A-48F22086CA8E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Arduino Genuino Zero (Native USB Port) = Debug|Arduino Genuino Zero (Native USB Port)
|
||||
Debug|NodeMCU 1 0 (ESP-12E Module) = Debug|NodeMCU 1 0 (ESP-12E Module)
|
||||
Debug|VisualGDB = Debug|VisualGDB
|
||||
Release|Arduino Genuino Zero (Native USB Port) = Release|Arduino Genuino Zero (Native USB Port)
|
||||
Release|NodeMCU 1 0 (ESP-12E Module) = Release|NodeMCU 1 0 (ESP-12E Module)
|
||||
Release|VisualGDB = Release|VisualGDB
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{819E55F9-05A8-454D-B771-4A99F775DD87}.Debug|Arduino Genuino Zero (Native USB Port).ActiveCfg = Debug|VisualGDB
|
||||
{819E55F9-05A8-454D-B771-4A99F775DD87}.Debug|NodeMCU 1 0 (ESP-12E Module).ActiveCfg = Debug|VisualGDB
|
||||
{819E55F9-05A8-454D-B771-4A99F775DD87}.Debug|VisualGDB.ActiveCfg = Debug|VisualGDB
|
||||
{819E55F9-05A8-454D-B771-4A99F775DD87}.Debug|VisualGDB.Build.0 = Debug|VisualGDB
|
||||
{819E55F9-05A8-454D-B771-4A99F775DD87}.Release|Arduino Genuino Zero (Native USB Port).ActiveCfg = Release|VisualGDB
|
||||
{819E55F9-05A8-454D-B771-4A99F775DD87}.Release|NodeMCU 1 0 (ESP-12E Module).ActiveCfg = Release|VisualGDB
|
||||
{819E55F9-05A8-454D-B771-4A99F775DD87}.Release|VisualGDB.ActiveCfg = Release|VisualGDB
|
||||
{819E55F9-05A8-454D-B771-4A99F775DD87}.Release|VisualGDB.Build.0 = Release|VisualGDB
|
||||
{58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Debug|Arduino Genuino Zero (Native USB Port).ActiveCfg = Debug|Arduino Genuino Zero (Native USB Port)
|
||||
{58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Debug|Arduino Genuino Zero (Native USB Port).Build.0 = Debug|Arduino Genuino Zero (Native USB Port)
|
||||
{58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Debug|NodeMCU 1 0 (ESP-12E Module).ActiveCfg = Debug|NodeMCU 1 0 (ESP-12E Module)
|
||||
{58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Debug|NodeMCU 1 0 (ESP-12E Module).Build.0 = Debug|NodeMCU 1 0 (ESP-12E Module)
|
||||
{58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Debug|VisualGDB.ActiveCfg = Debug|Arduino Genuino Zero (Native USB Port)
|
||||
{58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Release|Arduino Genuino Zero (Native USB Port).ActiveCfg = Release|Arduino Genuino Zero (Native USB Port)
|
||||
{58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Release|Arduino Genuino Zero (Native USB Port).Build.0 = Release|Arduino Genuino Zero (Native USB Port)
|
||||
{58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Release|NodeMCU 1 0 (ESP-12E Module).ActiveCfg = Release|NodeMCU 1 0 (ESP-12E Module)
|
||||
{58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Release|NodeMCU 1 0 (ESP-12E Module).Build.0 = Release|NodeMCU 1 0 (ESP-12E Module)
|
||||
{58AFEECD-06E2-4BB7-A13F-E1D5DBAED13F}.Release|VisualGDB.ActiveCfg = Release|Arduino Genuino Zero (Native USB Port)
|
||||
{6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|Arduino Genuino Zero (Native USB Port).ActiveCfg = Debug|Arduino Genuino Zero (Native USB Port)
|
||||
{6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|Arduino Genuino Zero (Native USB Port).Build.0 = Debug|Arduino Genuino Zero (Native USB Port)
|
||||
{6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|NodeMCU 1 0 (ESP-12E Module).ActiveCfg = Debug|NodeMCU 1 0 (ESP-12E Module)
|
||||
{6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|NodeMCU 1 0 (ESP-12E Module).Build.0 = Debug|NodeMCU 1 0 (ESP-12E Module)
|
||||
{6165CD6A-91A4-49FA-977A-48F22086CA8E}.Debug|VisualGDB.ActiveCfg = Debug|Arduino Genuino Zero (Native USB Port)
|
||||
{6165CD6A-91A4-49FA-977A-48F22086CA8E}.Release|Arduino Genuino Zero (Native USB Port).ActiveCfg = Release|Arduino Genuino Zero (Native USB Port)
|
||||
{6165CD6A-91A4-49FA-977A-48F22086CA8E}.Release|Arduino Genuino Zero (Native USB Port).Build.0 = Release|Arduino Genuino Zero (Native USB Port)
|
||||
{6165CD6A-91A4-49FA-977A-48F22086CA8E}.Release|NodeMCU 1 0 (ESP-12E Module).ActiveCfg = Release|NodeMCU 1 0 (ESP-12E Module)
|
||||
{6165CD6A-91A4-49FA-977A-48F22086CA8E}.Release|NodeMCU 1 0 (ESP-12E Module).Build.0 = Release|NodeMCU 1 0 (ESP-12E Module)
|
||||
{6165CD6A-91A4-49FA-977A-48F22086CA8E}.Release|VisualGDB.ActiveCfg = Release|Arduino Genuino Zero (Native USB Port)
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {721CAB98-83F8-4035-AC23-77AEA55B634D}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Loading…
Reference in New Issue
Block a user