-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eaa117a
commit 382f3ea
Showing
11 changed files
with
255 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// SPDX-FileCopyrightText: 2023 Tillitis AB <tillitis.se> | ||
// SPDX-License-Identifier: BSD-2-Clause | ||
|
||
#ifndef TKEY_DEBUG_H | ||
#define TKEY_DEBUG_H | ||
|
||
#include <stdint.h> | ||
|
||
#if defined(QEMU_DEBUG) | ||
|
||
void qemu_putchar(const uint8_t ch); | ||
void qemu_lf(); | ||
void qemu_putinthex(const uint32_t n); | ||
void qemu_puts(const char *s); | ||
void qemu_puthex(const uint8_t ch); | ||
void qemu_hexdump(const uint8_t *buf, int len); | ||
|
||
#define debug_putchar qemu_putchar | ||
#define debug_lf qemu_lf | ||
#define debug_putinthex qemu_putinthex | ||
#define debug_puts qemu_puts | ||
#define debug_puthex qemu_puthex | ||
#define debug_hexdump qemu_hexdump | ||
|
||
#elif defined(TKEY_DEBUG) | ||
|
||
void tkey_putchar(const uint8_t ch); | ||
void tkey_lf(); | ||
void tkey_putinthex(const uint32_t n); | ||
void tkey_puts(const char *s); | ||
void tkey_puthex(const uint8_t ch); | ||
void tkey_hexdump(const uint8_t *buf, int len); | ||
|
||
#define debug_putchar tkey_putchar | ||
#define debug_lf tkey_lf | ||
#define debug_putinthex tkey_putinthex | ||
#define debug_puts tkey_puts | ||
#define debug_puthex tkey_puthex | ||
#define debug_hexdump tkey_hexdump | ||
|
||
#else | ||
|
||
#define debug_putchar(ch) | ||
#define debug_lf() | ||
#define debug_putinthex(n) | ||
#define debug_puts(s) | ||
#define debug_puthex(ch) | ||
#define debug_hexdump(buf, len) | ||
|
||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
#define TKEY_PROTO_H | ||
|
||
enum mode { | ||
MODE_TKEYCTRL = 0x20, | ||
MODE_CDC = 0x40, | ||
MODE_HID = 0x80, | ||
}; | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.