2 * Copyright (c) 2006 Marcel Moolenaar
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #ifndef _DEV_PUC_CFG_H_
30 #define _DEV_PUC_CFG_H_
32 #define DEFAULT_RCLK 1843200
34 #define PUC_PORT_NONSTANDARD 0
35 #define PUC_PORT_1P 1 /* 1 parallel port */
36 #define PUC_PORT_1S 2 /* 1 serial port */
37 #define PUC_PORT_1S1P 3 /* 1 serial + 1 parallel ports */
38 #define PUC_PORT_1S2P 4 /* 1 serial + 2 parallel ports */
39 #define PUC_PORT_2P 5 /* 2 parallel ports */
40 #define PUC_PORT_2S 6 /* 2 serial ports */
41 #define PUC_PORT_2S1P 7 /* 2 serial + 1 parallel ports */
42 #define PUC_PORT_3S 8 /* 3 serial ports */
43 #define PUC_PORT_4S 9 /* 4 serial ports */
44 #define PUC_PORT_4S1P 10 /* 4 serial + 1 parallel ports */
45 #define PUC_PORT_6S 11 /* 6 serial ports */
46 #define PUC_PORT_8S 12 /* 8 serial ports */
47 #define PUC_PORT_12S 13 /* 12 serial ports */
48 #define PUC_PORT_16S 14 /* 16 serial ports */
50 /* Interrupt Latch Register (ILR) types */
51 #define PUC_ILR_NONE 0
52 #define PUC_ILR_DIGI 1
53 #define PUC_ILR_QUATECH 2
55 /* Configuration queries. */
70 typedef int puc_config_f(struct puc_softc *, enum puc_cfg_cmd, int, intptr_t *);
80 int8_t rid; /* Rid of first port */
81 int8_t d_rid; /* Delta rid of next ports */
82 int8_t d_ofs; /* Delta offset of next ports */
83 puc_config_f *config_function;
86 puc_config_f puc_config;
88 #endif /* _DEV_PUC_CFG_H_ */