summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness/tusb_log.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-29 21:20:42 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-30 10:33:27 -0700
commita82bd1756498606ea5235d77a14a95b3a3c23808 (patch)
tree2e0cb7406ed9b5a81268221f0d1813753f074864 /cmd/sbc_harness/tusb_log.c
parent45f349d41588b732aa5118d8da890ce35a5e86ba (diff)
tusb_config.h: Have TU_ASSERT use libmisc logging
Diffstat (limited to 'cmd/sbc_harness/tusb_log.c')
-rw-r--r--cmd/sbc_harness/tusb_log.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/sbc_harness/tusb_log.c b/cmd/sbc_harness/tusb_log.c
new file mode 100644
index 0000000..4c6b7df
--- /dev/null
+++ b/cmd/sbc_harness/tusb_log.c
@@ -0,0 +1,15 @@
+/* sbc_harness/tusb_log.c - Logger for tusb_config.h
+ *
+ * Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+#define LOG_NAME TINY_USB
+#include <libmisc/log.h>
+
+void _libmisc_tu_mess_failed(const char *expr,
+ const char *file, unsigned int line, const char *func) {
+ errorf("%s:%u:%s(): assertion \"%s\" failed",
+ file, line, func,
+ expr);
+}