Source code for the Trusted Boot Module.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tbm-mcu/include/console.h

18 lines
415 B

#pragma once
#include <stdio.h>
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
struct console {
FILE *fp;
};
struct console *console_init(unsigned dev_id);
int console_peek(char *c, struct console *console, int block);
int console_getc(char *c, struct console *console);
int console_getline(struct console *console, char *buf, size_t n);
ssize_t console_read(struct console *console, char *buf, size_t n);