Skip to content

Commit 2184d42

Browse files
author
Frese
committed
applications: counter: tamper: Add block ifdef APP_TAMPER
1 parent 436ba6d commit 2184d42

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

applications/counter/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ add_custom_command(
1818
MAIN_DEPENDENCY ../codec/cbor-decoder.yaml
1919
)
2020

21-
target_sources_ifdef(CONFIG_APP_TAMPER app PRIVATE src/app_tamper.c)
21+
target_sources(app PRIVATE src/app_tamper.c)
2222
target_sources(app PRIVATE src/app_backup.c)
2323
target_sources(app PRIVATE src/app_cbor.c)
2424
target_sources(app PRIVATE src/app_config.c)

applications/counter/src/app_tamper.c

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ LOG_MODULE_REGISTER(app_tamper, LOG_LEVEL_DBG);
2222
#define ON_TIME K_MSEC(30)
2323
#define OFF_TIME K_MSEC(1000)
2424

25+
#if defined(CONFIG_APP_TAMPER)
26+
2527
static const struct gpio_dt_spec m_tamper_spec =
2628
GPIO_DT_SPEC_GET(DT_PATH(zephyr_user), tamper_gpios);
2729

@@ -190,3 +192,5 @@ int app_tamper_clear(void)
190192

191193
return 0;
192194
}
195+
196+
#endif /* defined(CONFIG_APP_TAMPER) */

0 commit comments

Comments
 (0)