dev: remove console driver, merge into serial

Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
This commit is contained in:
Michael Shaw 2024-06-17 20:32:44 -04:00
commit 52ba70f4b7
13 changed files with 163 additions and 547 deletions

20
include/kernel/ringbuf.h Normal file
View file

@ -0,0 +1,20 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _RINGBUF_H
#define _RINGBUF_H
#include <kernel/common.h>
struct ringbuf {
char *buf;
size_t size;
size_t head;
size_t tail;
};
struct ringbuf *ringbuf_create(size_t size);
void ringbuf_destroy(struct ringbuf *rb);
size_t ringbuf_write(struct ringbuf *rb, const char *buf, size_t count);
size_t ringbuf_read(struct ringbuf *rb, char *buf, size_t count);
#endif /* _RINGBUF_H */