mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-09-28 14:49:30 -04:00
fw: Break out htif functions for qemu to separate files
This commit is contained in:
parent
ece53e044c
commit
5188584fcf
8 changed files with 135 additions and 109 deletions
27
hw/application_fpga/fw/tk1/htif.h
Normal file
27
hw/application_fpga/fw/tk1/htif.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (C) 2022 - Tillitis AB
|
||||
* SPDX-License-Identifier: GPL-2.0-only
|
||||
*/
|
||||
|
||||
#ifndef HTIF_H
|
||||
#define HTIF_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef QEMU_CONSOLE
|
||||
void htif_putc(char ch);
|
||||
void htif_lf(void);
|
||||
void htif_puthex(uint8_t c);
|
||||
void htif_putinthex(const uint32_t n);
|
||||
void htif_puts(const char *s);
|
||||
void htif_hexdump(void *buf, int len);
|
||||
#else
|
||||
#define htif_putc(ch)
|
||||
#define htif_lf(void)
|
||||
#define htif_puthex(c)
|
||||
#define htif_putinthex(n)
|
||||
#define htif_puts(s)
|
||||
#define htif_hexdump(buf, len)
|
||||
#endif // #ifdef NOCONSOLE
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue