Use shared macros for dev function IDs
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
#include "errors.h"
|
||||
#include "util/util.h"
|
||||
#include "hshtb.h"
|
||||
#include "sysdefs/devctl.h"
|
||||
|
||||
int32_t termdev_putch(uint8_t *buffer, size_t len, void *extra) {
|
||||
kprintf("%.*s", (int)len, (char *)buffer);
|
||||
@ -16,6 +17,6 @@ int32_t termdev_putch(uint8_t *buffer, size_t len, void *extra) {
|
||||
void termdev_init(void) {
|
||||
Dev *termdev = NULL;
|
||||
HSHTB_ALLOC(DEVTABLE.devs, ident, "termdev", termdev);
|
||||
termdev->fns[0] = &termdev_putch;
|
||||
termdev->fns[DEV_TERMDEV_PUTCH] = &termdev_putch;
|
||||
spinlock_init(&termdev->spinlock);
|
||||
}
|
||||
|
Reference in New Issue
Block a user