keyboard: device creation + poll and read

This commit is contained in:
Matheus
2023-07-11 21:31:45 -03:00
parent 4d30622e1e
commit b7fee572cb
3 changed files with 100 additions and 1 deletions
+4
View File
@@ -113,15 +113,19 @@
#define KEYCODE_INSERT 110
#define KEYCODE_DELETE 111
#include <spinlock.h>
#include <semaphore.h>
#include <ringbuffer.h>
#include <kernel/poll.h>
typedef uintmax_t keycode_t;
typedef struct {
ringbuffer_t packetbuffer;
semaphore_t semaphore;
spinlock_t lock;
int flags;
pollheader_t pollheader;
} keyboard_t;
typedef struct {