mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
keyboard: device creation + poll and read
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#define DEV_MAJOR_ZERO 3
|
||||
#define DEV_MAJOR_CONSOLE 4
|
||||
#define DEV_MAJOR_FB 5
|
||||
#define DEV_MAJOR_KEYBOARD 6
|
||||
|
||||
typedef struct {
|
||||
int (*open)(int minor, int flags);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user