Relocate and clean up application Kconfig structure

This commit is contained in:
Martin Jäger
2020-07-24 08:49:47 +02:00
parent dc85b46477
commit bbd1312fe5
12 changed files with 57 additions and 71 deletions
+3 -3
View File
@@ -51,7 +51,7 @@ static char auth_password[11];
bool pub_serial_enable = false;
#if CONFIG_EXT_THINGSET_CAN
#if CONFIG_THINGSET_CAN
bool pub_can_enable = false;
uint16_t ts_can_node_id = CONFIG_THINGSET_CAN_DEFAULT_NODE_ID;
#endif
@@ -200,7 +200,7 @@ static DataNode data_nodes[] = {
ID_CONF, TS_ANY_R | TS_ANY_W, PUB_NVM),
#endif
#if CONFIG_EXT_THINGSET_CAN
#if CONFIG_THINGSET_CAN
TS_NODE_UINT16(0x59, "CanNodeId", &ts_can_node_id,
ID_CONF, TS_ANY_R | TS_ANY_W, PUB_NVM),
#endif
@@ -460,7 +460,7 @@ static DataNode data_nodes[] = {
TS_NODE_BOOL(0xF2, "Enable", &pub_serial_enable, 0xF1, TS_ANY_RW, 0),
TS_NODE_PUBSUB(0xF3, "IDs", PUB_SER, 0xF1, TS_ANY_RW, 0),
#if CONFIG_EXT_THINGSET_CAN
#if CONFIG_THINGSET_CAN
TS_NODE_PATH(0xF5, "can", ID_PUB, NULL),
TS_NODE_BOOL(0xF6, "Enable", &pub_can_enable, 0xF5, TS_ANY_RW, 0),
TS_NODE_PUBSUB(0xF7, "IDs", PUB_CAN, 0xF5, TS_ANY_RW, 0),
+2 -2
View File
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#if CONFIG_EXT_THINGSET_CAN
#if CONFIG_THINGSET_CAN
#include <zephyr.h>
#include <device.h>
@@ -164,4 +164,4 @@ void can_pub_thread()
K_THREAD_DEFINE(can_pub, 1024, can_pub_thread, NULL, NULL, NULL, 6, 0, 1000);
#endif /* CONFIG_EXT_THINGSET_CAN */
#endif /* CONFIG_THINGSET_CAN */
+4 -4
View File
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#if CONFIG_EXT_THINGSET_SERIAL
#if CONFIG_THINGSET_SERIAL
#include <string.h>
#include <stdio.h>
@@ -21,8 +21,8 @@
struct device *uart_dev = device_get_binding(UART_DEVICE_NAME);
static char buf_resp[CONFIG_EXT_THINGSET_SERIAL_TX_BUF_SIZE];
static char buf_req[CONFIG_EXT_THINGSET_SERIAL_RX_BUF_SIZE];
static char buf_resp[CONFIG_THINGSET_SERIAL_TX_BUF_SIZE];
static char buf_req[CONFIG_THINGSET_SERIAL_RX_BUF_SIZE];
static volatile size_t req_pos = 0;
static volatile bool command_flag = false;
@@ -126,4 +126,4 @@ void serial_thread()
K_THREAD_DEFINE(serial_thread_id, 1024, serial_thread, NULL, NULL, NULL, 6, 0, 1000);
#endif /* CONFIG_EXT_THINGSET_SERIAL */
#endif /* CONFIG_THINGSET_SERIAL */