fix build

This commit is contained in:
Thomas Kunze
2024-09-14 19:42:13 +02:00
parent e948562ba0
commit f093f0a304
23 changed files with 1750 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#include "dpt7.h"
#include "dptconvert.h"
Knx::Go_SizeCode Knx::Dpt7::size() const
{
return Go_2_Octets;
}
void Knx::Dpt7::encode(uint8_t* data) const
{
unsigned16ToPayload(data, 0, _value, 0xFFFF);
}
bool Knx::Dpt7::decode(uint8_t* data)
{
_value = unsigned16FromPayload(data, 0);
return true;
}

View File

@@ -0,0 +1,25 @@
#pragma once
#include "dpt.h"
namespace Knx
{
class Dpt7: public DPT<uint16_t>
{
public:
Go_SizeCode size() const override;
void encode(uint8_t* data) const override;
bool decode(uint8_t* data) override;
};
typedef Dpt7 DPT_Value_2_Ucount;
typedef Dpt7 DPT_TimePeriodMsec;
typedef Dpt7 DPT_TimePeriod10MSec;
typedef Dpt7 DPT_TimePeriod100MSec;
typedef Dpt7 DPT_TimePeriodSec;
typedef Dpt7 DPT_TimePeriodMin;
typedef Dpt7 DPT_TimePeriodHrs;
typedef Dpt7 DPT_PropDataType;
typedef Dpt7 DPT_Length_mm;
typedef Dpt7 DPT_UElCurrentmA;
typedef Dpt7 DPT_Brightness;
}