Rev 4094 | Rev 4148 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4094 | Rev 4119 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | #include <console/chardev.h> |
38 | #include <console/chardev.h> |
39 | #include <ddi/irq.h> |
39 | #include <ddi/irq.h> |
40 | #include <arch/asm.h> |
40 | #include <arch/asm.h> |
41 | #include <mm/slab.h> |
41 | #include <mm/slab.h> |
42 | 42 | ||
43 | indev_operations_t kbrdin_ops = { |
43 | static indev_operations_t kbrdin_ops = { |
44 | .poll = NULL |
44 | .poll = NULL |
45 | }; |
45 | }; |
46 | 46 | ||
47 | static inline void z8530_write(ioport8_t *ctl, uint8_t reg, uint8_t val) |
47 | static inline void z8530_write(ioport8_t *ctl, uint8_t reg, uint8_t val) |
48 | { |
48 | { |
Line 80... | Line 80... | ||
80 | z8530_instance_t *instance = irq->instance; |
80 | z8530_instance_t *instance = irq->instance; |
81 | z8530_t *dev = instance->z8530; |
81 | z8530_t *dev = instance->z8530; |
82 | 82 | ||
83 | if (z8530_read(&dev->ctl_a, RR0) & RR0_RCA) { |
83 | if (z8530_read(&dev->ctl_a, RR0) & RR0_RCA) { |
84 | uint8_t x = z8530_read(&dev->ctl_a, RR8); |
84 | uint8_t x = z8530_read(&dev->ctl_a, RR8); |
85 | chardev_push_character(&instance->kbrdin, x); |
85 | indev_push_character(&instance->kbrdin, x); |
86 | } |
86 | } |
87 | } |
87 | } |
88 | 88 | ||
89 | /** Initialize z8530. */ |
89 | /** Initialize z8530. */ |
90 | indev_t *z8530_init(z8530_t *dev, devno_t devno, inr_t inr, cir_t cir, void *cir_arg) |
90 | indev_t *z8530_init(z8530_t *dev, devno_t devno, inr_t inr, cir_t cir, void *cir_arg) |