Subversion Repositories HelenOS

Compare Revisions

Regard whitespace Rev 4055 → Rev 4156

/branches/dd/kernel/genarch/include/kbrd/kbrd.h
38,10 → 38,8
 
#include <console/chardev.h>
 
extern chardev_t kbrdin;
extern void kbrd_init(indev_t *devin);
 
extern void kbrd_init(chardev_t *);
 
#endif
 
/** @}
/branches/dd/kernel/genarch/include/drivers/ns16550/ns16550.h
48,7 → 48,7
#define MCR_OUT2 0x08 /** OUT2. */
 
/** NS16550 registers. */
struct ns16550 {
typedef struct {
ioport8_t rbr; /**< Receiver Buffer Register. */
ioport8_t ier; /**< Interrupt Enable Register. */
union {
58,21 → 58,16
ioport8_t lcr; /**< Line Control register. */
ioport8_t mcr; /**< Modem Control Register. */
ioport8_t lsr; /**< Line Status Register. */
} __attribute__ ((packed));
typedef struct ns16550 ns16550_t;
} __attribute__ ((packed)) ns16550_t;
 
/** Structure representing the ns16550 device. */
typedef struct ns16550_instance {
devno_t devno;
typedef struct {
ns16550_t *ns16550;
irq_t irq;
chardev_t *devout;
indev_t kbrdin;
} ns16550_instance_t;
 
extern bool ns16550_init(ns16550_t *, devno_t, inr_t, cir_t, void *,
chardev_t *);
extern irq_ownership_t ns16550_claim(irq_t *);
extern void ns16550_irq_handler(irq_t *);
extern indev_t *ns16550_init(ns16550_t *, inr_t, cir_t, void *);
 
#endif
 
/branches/dd/kernel/genarch/include/drivers/dsrln/dsrlnin.h
0,0 → 1,60
/*
* Copyright (c) 2009 Martin Decky
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup genarch
* @{
*/
/**
* @file
* @brief Dummy serial line input.
*/
 
#ifndef KERN_DSRLNIN_H_
#define KERN_DSRLNIN_H_
 
#include <ddi/irq.h>
#include <arch/types.h>
#include <console/chardev.h>
#include <typedefs.h>
 
typedef struct {
ioport8_t data;
} __attribute__ ((packed)) dsrlnin_t;
 
typedef struct {
irq_t irq;
dsrlnin_t *dsrlnin;
indev_t kbrdin;
} dsrlnin_instance_t;
 
extern indev_t *dsrlnin_init(dsrlnin_t *, inr_t);
 
#endif
 
/** @}
*/
/branches/dd/kernel/genarch/include/drivers/dsrln/dsrlnout.h
0,0 → 1,48
/*
* Copyright (c) 2009 Martin Decky
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup genarch
* @{
*/
/**
* @file
* @brief Dummy serial line output.
*/
 
#ifndef KERN_DSRLNOUT_H_
#define KERN_DSRLNOUT_H_
 
#include <arch/types.h>
#include <typedefs.h>
 
extern void dsrlnout_init(ioport8_t *);
 
#endif
 
/** @}
*/
/branches/dd/kernel/genarch/include/drivers/i8042/i8042.h
40,21 → 40,19
#include <console/chardev.h>
#include <typedefs.h>
 
struct i8042 {
typedef struct {
ioport8_t data;
uint8_t pad[3];
ioport8_t status;
} __attribute__ ((packed));
typedef struct i8042 i8042_t;
} __attribute__ ((packed)) i8042_t;
 
typedef struct i8042_instance {
devno_t devno;
typedef struct {
irq_t irq;
i8042_t *i8042;
chardev_t *devout;
indev_t kbrdin;
} i8042_instance_t;
 
extern bool i8042_init(i8042_t *, devno_t, inr_t, chardev_t *);
extern indev_t *i8042_init(i8042_t *, inr_t);
 
#endif
 
/branches/dd/kernel/genarch/include/drivers/z8530/z8530.h
96,7 → 96,7
#define RR0_RCA (0x1 << 0)
 
/** z8530's registers. */
struct z8530 {
typedef struct {
union {
ioport8_t ctl_b;
ioport8_t status_b;
110,20 → 110,16
} __attribute__ ((packed));
uint8_t pad3;
ioport8_t data_a;
} __attribute__ ((packed));
typedef struct z8530 z8530_t;
} __attribute__ ((packed)) z8530_t;
 
/** Structure representing the z8530 device. */
typedef struct {
devno_t devno;
irq_t irq;
z8530_t *z8530;
chardev_t *devout;
indev_t kbrdin;
} z8530_instance_t;
 
extern bool z8530_init(z8530_t *, devno_t, inr_t, cir_t, void *, chardev_t *);
extern irq_ownership_t z8530_claim(irq_t *);
extern void z8530_irq_handler(irq_t *);
extern indev_t *z8530_init(z8530_t *, inr_t, cir_t, void *);
 
#endif
 
/branches/dd/kernel/genarch/include/srln/srln.h
38,10 → 38,8
 
#include <console/chardev.h>
 
extern chardev_t srlnin;
extern void srln_init(indev_t *devin);
 
extern void srln_init(chardev_t *);
 
#endif
 
/** @}