summaryrefslogtreecommitdiff
path: root/src/tracing.h
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2018-11-14 22:00:06 +0900
committerjaseg <git@jaseg.net>2018-11-14 22:00:06 +0900
commit66f9e82c5ca313fb90edff6a9d1956c02c973934 (patch)
tree69ae4d6ed1a10a37e511710f68021fda5214d032 /src/tracing.h
parentb84de745fac0708ca67b9aead7f9f2b36891cd35 (diff)
downloadsecure-hid-66f9e82c5ca313fb90edff6a9d1956c02c973934.tar.gz
secure-hid-66f9e82c5ca313fb90edff6a9d1956c02c973934.tar.bz2
secure-hid-66f9e82c5ca313fb90edff6a9d1956c02c973934.zip
Pairing and fingerprint checking works nicely now
Diffstat (limited to 'src/tracing.h')
-rw-r--r--src/tracing.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tracing.h b/src/tracing.h
new file mode 100644
index 0000000..9aa9216
--- /dev/null
+++ b/src/tracing.h
@@ -0,0 +1,20 @@
+#ifndef __TRACING_H__
+#define __TRACING_H__
+
+#include <libopencm3/stm32/gpio.h>
+
+#define TRACING_SET(i) gpio_set(GPIOD, (1<<i))
+#define TRACING_CLEAR(i) gpio_clear(GPIOD, (1<<i))
+
+enum tracing_channels {
+ TR_HID_MESSAGE_HANDLER = 0,
+ TR_DEBUG_OUT_DMA_IRQ = 1,
+ TR_HOST_IF_DMA_IRQ = 2,
+ TR_HOST_IF_USART_IRQ = 3,
+ TR_USBH_POLL = 4,
+ TR_HOST_PKT_HANDLER = 5,
+ TR_NOISE_HANDSHAKE = 6,
+ TR_RNG = 7,
+};
+
+#endif