Refactor KNX DALI Gateway Configuration and Update Device Parameters
- 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>
This commit is contained in:
@@ -1,13 +1,27 @@
|
||||
#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 0xA4
|
||||
#define MAIN_ApplicationNumber 1
|
||||
#define MAIN_ApplicationVersion 5
|
||||
#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
|
||||
@@ -17,8 +31,13 @@ enum PT_DeviceType : uint8_t {
|
||||
PT_deviceType_Deaktiviert = 0,
|
||||
PT_deviceType_DT0 = 1,
|
||||
PT_deviceType_DT1 = 2,
|
||||
PT_deviceType_DT6 = 3,
|
||||
PT_deviceType_DT8 = 4,
|
||||
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 {
|
||||
@@ -29,8 +48,8 @@ enum PT_ColorType : uint8_t {
|
||||
};
|
||||
|
||||
enum PT_ColorSpace : uint8_t {
|
||||
PT_colorSpace_rgb = 0,
|
||||
PT_colorSpace_xy = 1,
|
||||
PT_colorSpace_rgb = 1,
|
||||
PT_colorSpace_xy = 0,
|
||||
};
|
||||
|
||||
// Placeholder macros — will be replaced with direct Bau07B0 access in Phase 3.
|
||||
@@ -57,10 +76,10 @@ enum PT_ColorSpace : uint8_t {
|
||||
|
||||
#define ParamHCL_type(channelIndex) (0)
|
||||
|
||||
// Group object offset placeholders
|
||||
#define ADR_KoOffset 0
|
||||
#define GRP_KoOffset 0
|
||||
#define HCL_KoOffset 0
|
||||
#define ADR_KoBlockSize 0
|
||||
#define GRP_KoBlockSize 0
|
||||
#define HCL_KoBlockSize 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
|
||||
|
||||
Reference in New Issue
Block a user