rename ps2kb_intr() to ps2kbdev_keycode()
This commit is contained in:
@ -117,7 +117,7 @@ static uint8_t ctlmap[256] =
|
|||||||
[0xc7] KB_HOME,
|
[0xc7] KB_HOME,
|
||||||
};
|
};
|
||||||
|
|
||||||
int32_t ps2kb_intr(void) {
|
int32_t ps2kbdev_keycode(void) {
|
||||||
static uint8_t shift;
|
static uint8_t shift;
|
||||||
static uint8_t *charcode[4] = { normalmap, shiftmap, ctlmap, ctlmap };
|
static uint8_t *charcode[4] = { normalmap, shiftmap, ctlmap, ctlmap };
|
||||||
uint32_t st, data, c;
|
uint32_t st, data, c;
|
||||||
@ -159,7 +159,7 @@ IpcMBus *PS2KB_MBUS;
|
|||||||
void ps2kbdev_intr(IntrStackFrame *frame) {
|
void ps2kbdev_intr(IntrStackFrame *frame) {
|
||||||
(void)frame;
|
(void)frame;
|
||||||
|
|
||||||
int32_t c = ps2kb_intr();
|
int32_t c = ps2kbdev_keycode();
|
||||||
if (c >= 0) {
|
if (c >= 0) {
|
||||||
uint8_t b = c;
|
uint8_t b = c;
|
||||||
ipc_mbuspublish("ps2kb", &b);
|
ipc_mbuspublish("ps2kb", &b);
|
||||||
@ -167,10 +167,10 @@ void ps2kbdev_intr(IntrStackFrame *frame) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ps2kbdev_init(void) {
|
void ps2kbdev_init(void) {
|
||||||
intr_attchhandler(&ps2kbdev_intr, INTR_IRQBASE+1);
|
|
||||||
|
|
||||||
Dev *ps2kbdev;
|
Dev *ps2kbdev;
|
||||||
HSHTB_ALLOC(DEVTABLE.devs, ident, "ps2kbdev", ps2kbdev);
|
HSHTB_ALLOC(DEVTABLE.devs, ident, "ps2kbdev", ps2kbdev);
|
||||||
spinlock_init(&ps2kbdev->spinlock);
|
spinlock_init(&ps2kbdev->spinlock);
|
||||||
PS2KB_MBUS = ipc_mbusmake("ps2kb", 1, 0x100);
|
PS2KB_MBUS = ipc_mbusmake("ps2kb", 1, 0x100);
|
||||||
|
|
||||||
|
intr_attchhandler(&ps2kbdev_intr, INTR_IRQBASE+1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user