Subversion Repositories HelenOS

Rev

Rev 4055 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4055 Rev 4156
Line 94... Line 94...
94
 
94
 
95
/** Receive Character Available. */
95
/** Receive Character Available. */
96
#define RR0_RCA     (0x1 << 0)
96
#define RR0_RCA  (0x1 << 0)
97
 
97
 
98
/** z8530's registers. */
98
/** z8530's registers. */
99
struct z8530 {
99
typedef struct {
100
    union {
100
    union {
101
        ioport8_t ctl_b;
101
        ioport8_t ctl_b;
102
        ioport8_t status_b;
102
        ioport8_t status_b;
103
    } __attribute__ ((packed));
103
    } __attribute__ ((packed));
104
    uint8_t pad1;
104
    uint8_t pad1;
Line 108... Line 108...
108
        ioport8_t ctl_a;
108
        ioport8_t ctl_a;
109
        ioport8_t status_a;
109
        ioport8_t status_a;
110
    } __attribute__ ((packed));
110
    } __attribute__ ((packed));
111
    uint8_t pad3;
111
    uint8_t pad3;
112
    ioport8_t data_a;
112
    ioport8_t data_a;
113
} __attribute__ ((packed));
113
} __attribute__ ((packed)) z8530_t;
114
typedef struct z8530 z8530_t;
-
 
115
 
114
 
116
/** Structure representing the z8530 device. */
115
/** Structure representing the z8530 device. */
117
typedef struct {
116
typedef struct {
118
    devno_t devno;
-
 
119
    irq_t irq;
117
    irq_t irq;
120
    z8530_t *z8530;
118
    z8530_t *z8530;
121
    chardev_t *devout;
119
    indev_t kbrdin;
122
} z8530_instance_t;
120
} z8530_instance_t;
123
 
121
 
124
extern bool z8530_init(z8530_t *, devno_t, inr_t, cir_t, void *, chardev_t *);
122
extern indev_t *z8530_init(z8530_t *, inr_t, cir_t, void *);
125
extern irq_ownership_t z8530_claim(irq_t *);
-
 
126
extern void z8530_irq_handler(irq_t *);
-
 
127
 
123
 
128
#endif
124
#endif
129
 
125
 
130
/** @}
126
/** @}
131
 */
127
 */