Subversion Repositories HelenOS

Rev

Rev 3961 | Rev 4094 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3961 Rev 4042
Line 1... Line 1...
1
/*
1
/*
2
 * Copyright (c) 2001-2004 Jakub Jermar
2
 * Copyright (c) 2009 Jakub Jermar
3
 * All rights reserved.
3
 * All rights reserved.
4
 *
4
 *
5
 * Redistribution and use in source and binary forms, with or without
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
6
 * modification, are permitted provided that the following conditions
7
 * are met:
7
 * are met:
Line 29... Line 29...
29
/** @addtogroup genarch
29
/** @addtogroup genarch
30
 * @{
30
 * @{
31
 */
31
 */
32
/**
32
/**
33
 * @file
33
 * @file
34
 * @brief   Headers for Zilog 8530 serial port / keyboard driver.
34
 * @brief   Headers for Zilog 8530 serial controller.
35
 */
35
 */
36
 
36
 
37
#ifndef KERN_Z8530_H_
37
#ifndef KERN_Z8530_H_
38
#define KERN_Z8530_H_
38
#define KERN_Z8530_H_
39
 
39
 
40
#include <ddi/irq.h>
40
#include <ddi/irq.h>
41
#include <arch/types.h>
41
#include <arch/types.h>
-
 
42
#include <console/chardev.h>
42
 
43
 
43
#define WR0 0
44
#define WR0 0
44
#define WR1 1
45
#define WR1 1
45
#define WR2 2
46
#define WR2 2
46
#define WR3 3
47
#define WR3 3
Line 115... Line 116...
115
/** Structure representing the z8530 device. */
116
/** Structure representing the z8530 device. */
116
typedef struct {
117
typedef struct {
117
    devno_t devno;
118
    devno_t devno;
118
    irq_t irq;
119
    irq_t irq;
119
    z8530_t *z8530;
120
    z8530_t *z8530;
-
 
121
    chardev_t *devout;
120
} z8530_instance_t;
122
} z8530_instance_t;
121
 
123
 
122
extern bool z8530_init(z8530_t *, devno_t, inr_t, cir_t, void *);
124
extern bool z8530_init(z8530_t *, devno_t, inr_t, cir_t, void *, chardev_t *);
123
extern irq_ownership_t z8530_claim(irq_t *);
125
extern irq_ownership_t z8530_claim(irq_t *);
124
extern void z8530_irq_handler(irq_t *);
126
extern void z8530_irq_handler(irq_t *);
125
 
127
 
126
#endif
128
#endif
127
 
129