From a574ce7edf7f31847be882f9f08dcd1ab8e5ebe0 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Tue, 18 Nov 2025 16:00:47 +0800
Subject: [PATCH] update lightd and thingsboard

---
 project/lightd/config.h |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/project/lightd/config.h b/project/lightd/config.h
index 85f47ff..1c21700 100644
--- a/project/lightd/config.h
+++ b/project/lightd/config.h
@@ -3,7 +3,7 @@
  *                  All rights reserved.
  *
  *       Filename:  config.h
- *    Description:  This file is mqttd configure file parser function
+ *    Description:  This file is lightd configure file parser function
  *
  *        Version:  1.0.0(2019年06月25日)
  *         Author:  Guo Wenxue <guowenxue@gmail.com>
@@ -13,6 +13,8 @@
 #ifndef  __CONF_H_
 #define  __CONF_H_
 
+#include <stddef.h>
+#include "utils.h"
 #include "gpio.h"
 
 enum
@@ -73,6 +75,9 @@
     mqtt_ctx_t      mqtt;
 } iotd_ctx_t;
 
+/* get iotd_ctx address by mqtt_ctx address */
+#define to_iotd(ctx)	container_of(ctx, iotd_ctx_t, mqtt);
+
 extern int parser_conf(const char *conf_file, iotd_ctx_t *ctx, int debug);
 
 #endif   /* ----- #ifndef _CONF_H_  ----- */

--
Gitblit v1.9.1