summaryrefslogtreecommitdiff
path: root/include/object
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-12-11 09:21:03 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2020-12-11 09:21:03 +0100
commit3d3ce8f8a1e15c5555d7fd117d91b65cc08edb0a (patch)
tree89cbc718ac2f5eb095e5c51d1e523ef58ff6e386 /include/object
parentf35b04029d4eabfa3e039835d3672d576ebd67b9 (diff)
ptalog.h: Fix compilation error for !PTALOG_GPIO
Diffstat (limited to 'include/object')
-rw-r--r--include/object/ptalog.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/object/ptalog.h b/include/object/ptalog.h
index 9d070ab..e4cff37 100644
--- a/include/object/ptalog.h
+++ b/include/object/ptalog.h
@@ -152,7 +152,7 @@ class PTALog {
log[log_index - 1].prev_state_overflow = counter.overflow;
counter.start();
#endif
-#ifndef PTALOG_GPIO_BEFORE
+#if defined(PTALOG_GPIO) && !defined(PTALOG_GPIO_BEFORE)
gpio.write(sync_pin, 1);
#endif
}
@@ -167,11 +167,9 @@ class PTALog {
inline void stopTransition()
{
-#ifdef PTALOG_GPIO
-#if !defined(PTALOG_GPIO_BEFORE) && !defined(PTALOG_GPIO_BAR)
+#if defined(PTALOG_GPIO) && !defined(PTALOG_GPIO_BEFORE) && !defined(PTALOG_GPIO_BAR)
gpio.write(sync_pin, 0);
#endif
-#endif
#ifdef PTALOG_TIMING
counter.stop();
log[log_index - 1].timer = counter.value;