Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / dev / pcmcia / bluecardreg.h
blob3b1098f243a3549ab2852c8eac944f1ec81dad8d
1 /* $NetBSD$ */
2 /*
3 * Copyright (c) 2007 KIYOHARA Takashi
4 * All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
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
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
19 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
24 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
28 #define BLUECARD_BUF1 0x00
29 #define BLUECARD_BUF2 0x10
30 #define BLUECARD_COMMAND 0x20
31 #define BLUECARD_INTERRUPT 0x21
32 #define BLUECARD_CONTROL 0x22
33 #define BLUECARD_RXCONTROL 0x24
34 #define BLUECARD_CARDRESET 0x30
35 #define BLUECARD_LEDCONTROL 0x30
37 #define BLUECARD_COMMAND_TXBUF1 0x01
38 #define BLUECARD_COMMAND_TXBUF2 0x02
39 #define BLUECARD_COMMAND_RXBUF1 0x04
40 #define BLUECARD_COMMAND_RXBUF2 0x08
41 #define BLUECARD_COMMAND_RXWIN1 0x00
42 #define BLUECARD_COMMAND_RXWIN2 0x10
44 #define BLUECARD_INTERRUPT_TXBUF1 0x01
45 #define BLUECARD_INTERRUPT_TXBUF2 0x02
46 #define BLUECARD_INTERRUPT_RXBUF1 0x04
47 #define BLUECARD_INTERRUPT_RXBUF2 0x08
49 #define BLUECARD_CONTROL_BAUDRATE_MASK 0x03
50 #define BLUECARD_CONTROL_BAUDRATE_57600 0x00
51 #define BLUECARD_CONTROL_BAUDRATE_115200 0x01
52 #define BLUECARD_CONTROL_BAUDRATE_230400 0x02
53 #define BLUECARD_CONTROL_BAUDRATE_460800 0x03
54 #define BLUECARD_CONTROL_RTS 0x04
55 #define BLUECARD_CONTROL_ON 0x08
56 #define BLUECARD_CONTROL_RESET 0x10
57 #define BLUECARD_CONTROL_RESPU 0x20
58 #define BLUECARD_CONTROL_INTERRUPT 0x40
59 #define BLUECARD_CONTROL_CARDRESET 0x80
61 #define BLUECARD_RXCONTROL_RTSLEVEL(x) ((x) << 2)