e79223c87e
- Introduced configuration macros for OEM manufacturer ID, application number, and application version in knxprod.h. - Updated product identity definitions to use the new configuration macros. - Modified device type enumeration to include additional device types. - Adjusted color space enumeration values for consistency. - Defined generated group object layout constants for memory offsets and block sizes. - Enhanced knx_dali_gw.cpp to utilize the new configuration macros for manufacturer ID and program version. - Updated the device initialization logic to reflect the new hardware and program version structures. - Removed obsolete knx_dali_gw subproject and updated related submodules. Signed-off-by: Tony <tonylu@tony-cloud.com>
86 lines
2.7 KiB
C
86 lines
2.7 KiB
C
#pragma once
|
|
|
|
#include "sdkconfig.h"
|
|
|
|
#ifndef CONFIG_GATEWAY_KNX_OEM_MANUFACTURER_ID
|
|
#define CONFIG_GATEWAY_KNX_OEM_MANUFACTURER_ID 0x00A4
|
|
#endif
|
|
|
|
#ifndef CONFIG_GATEWAY_KNX_OEM_APPLICATION_NUMBER
|
|
#define CONFIG_GATEWAY_KNX_OEM_APPLICATION_NUMBER 0x0001
|
|
#endif
|
|
|
|
#ifndef CONFIG_GATEWAY_KNX_OEM_APPLICATION_VERSION
|
|
#define CONFIG_GATEWAY_KNX_OEM_APPLICATION_VERSION 0x08
|
|
#endif
|
|
|
|
// Minimal stub for knxprod.h — generated KNX product definitions.
|
|
// The full file (1796 bytes of parameters, 1439 group objects) will be
|
|
// adapted in Phase 3 to use the gateway/knx API directly.
|
|
|
|
// Product identity
|
|
#define MAIN_OpenKnxId (CONFIG_GATEWAY_KNX_OEM_MANUFACTURER_ID & 0xff)
|
|
#define MAIN_ApplicationNumber CONFIG_GATEWAY_KNX_OEM_APPLICATION_NUMBER
|
|
#define MAIN_ApplicationVersion CONFIG_GATEWAY_KNX_OEM_APPLICATION_VERSION
|
|
#define MAIN_OrderNumber "REG1-Dali"
|
|
#define MAIN_ParameterSize 1796
|
|
#define MAIN_MaxKoNumber 1439
|
|
|
|
// Parameter type enums (subset)
|
|
enum PT_DeviceType : uint8_t {
|
|
PT_deviceType_Deaktiviert = 0,
|
|
PT_deviceType_DT0 = 1,
|
|
PT_deviceType_DT1 = 2,
|
|
PT_deviceType_DT2 = 3,
|
|
PT_deviceType_DT3 = 4,
|
|
PT_deviceType_DT4 = 5,
|
|
PT_deviceType_DT5 = 6,
|
|
PT_deviceType_DT6 = 7,
|
|
PT_deviceType_DT7 = 8,
|
|
PT_deviceType_DT8 = 9,
|
|
};
|
|
|
|
enum PT_ColorType : uint8_t {
|
|
PT_colorType_HSV = 0,
|
|
PT_colorType_RGB = 1,
|
|
PT_colorType_TW = 2,
|
|
PT_colorType_XYY = 3,
|
|
};
|
|
|
|
enum PT_ColorSpace : uint8_t {
|
|
PT_colorSpace_rgb = 1,
|
|
PT_colorSpace_xy = 0,
|
|
};
|
|
|
|
// Placeholder macros — will be replaced with direct Bau07B0 access in Phase 3.
|
|
#define ParamAPP_daynight(channelIndex) (0)
|
|
#define ParamAPP_funcBtn(channelIndex) (0)
|
|
#define ParamAPP_funcBtnLong(channelIndex) (0)
|
|
#define ParamAPP_funcBtnDbl(channelIndex) (0)
|
|
|
|
#define ParamADR_deviceType(channelIndex) (PT_DeviceType::PT_deviceType_Deaktiviert)
|
|
#define ParamADR_type(channelIndex) (0)
|
|
#define ParamADR_min(channelIndex) (0)
|
|
#define ParamADR_max(channelIndex) (254)
|
|
#define ParamADR_stairtime(channelIndex) (0)
|
|
#define ParamADR_onDay(channelIndex) (0)
|
|
#define ParamADR_onNight(channelIndex) (0)
|
|
#define ParamADR_error(channelIndex) (0)
|
|
#define ParamADR_queryTime(channelIndex) (0)
|
|
#define ParamADR_colorType(channelIndex) (PT_ColorType::PT_colorType_TW)
|
|
#define ParamADR_colorSpace(channelIndex) (PT_ColorSpace::PT_colorSpace_rgb)
|
|
|
|
#define ParamGRP_deviceType(channelIndex) (PT_DeviceType::PT_deviceType_Deaktiviert)
|
|
#define ParamGRP_type(channelIndex) (0)
|
|
#define ParamGRP_colorType(channelIndex) (PT_ColorType::PT_colorType_TW)
|
|
|
|
#define ParamHCL_type(channelIndex) (0)
|
|
|
|
// Generated group object layout constants
|
|
#define ADR_KoOffset 12
|
|
#define GRP_KoOffset 1164
|
|
#define HCL_KoOffset 1436
|
|
#define ADR_KoBlockSize 18
|
|
#define GRP_KoBlockSize 17
|
|
#define HCL_KoBlockSize 1
|