Deleted Added
full compact
ppb_msq.h (38061) ppb_msq.h (39134)
1/*-
2 * Copyright (c) 1998 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1998 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: ppb_msq.h,v 1.1.2.6 1998/06/17 00:37:12 son Exp $
26 * $Id: ppb_msq.h,v 1.1.2.7 1998/06/20 19:03:47 son Exp $
27 *
28 */
29#ifndef __PPB_MSQ_H
30#define __PPB_MSQ_H
31
32/*
33 * Basic definitions
34 */

--- 33 unchanged lines hidden (view full) ---

68#define MS_OP_DELAY 5 /* delay <val> */
69#define MS_OP_SET 6 /* set <val> */
70#define MS_OP_DBRA 7 /* dbra <offset> */
71#define MS_OP_BRSET 8 /* brset <mask>, <offset> */
72#define MS_OP_BRCLEAR 9 /* brclear <mask>, <offset> */
73#define MS_OP_RET 10 /* ret <retcode> */
74#define MS_OP_C_CALL 11 /* c_call <function>, <parameter> */
75#define MS_OP_PTR 12 /* ptr <pointer> */
27 *
28 */
29#ifndef __PPB_MSQ_H
30#define __PPB_MSQ_H
31
32/*
33 * Basic definitions
34 */

--- 33 unchanged lines hidden (view full) ---

68#define MS_OP_DELAY 5 /* delay <val> */
69#define MS_OP_SET 6 /* set <val> */
70#define MS_OP_DBRA 7 /* dbra <offset> */
71#define MS_OP_BRSET 8 /* brset <mask>, <offset> */
72#define MS_OP_BRCLEAR 9 /* brclear <mask>, <offset> */
73#define MS_OP_RET 10 /* ret <retcode> */
74#define MS_OP_C_CALL 11 /* c_call <function>, <parameter> */
75#define MS_OP_PTR 12 /* ptr <pointer> */
76#define MS_RESERVED_1 13 /* reserved */
77#define MS_RESERVED_2 14 /* reserved */
76#define MS_OP_ADELAY 13 /* adelay <val> */
77#define MS_OP_BRSTAT 14 /* brstat <mask>, <mask>, <offset> */
78#define MS_OP_SUBRET 15 /* subret <code> */
79#define MS_OP_CALL 16 /* call <microsequence> */
80#define MS_OP_RASSERT_P 17 /* rassert_p <iter>, <reg> */
81#define MS_OP_RFETCH_P 18 /* rfetch_p <iter>, <reg>, <mask> */
82#define MS_OP_TRIG 19 /* trigger <reg>, <len>, <array> */
83
84/* common masks */
85#define MS_CLEAR_ALL 0x0
86#define MS_ASSERT_NONE 0x0
87#define MS_ASSERT_ALL 0xff
88#define MS_FETCH_ALL 0xff
89
90/* undefined parameter value */
78#define MS_OP_SUBRET 15 /* subret <code> */
79#define MS_OP_CALL 16 /* call <microsequence> */
80#define MS_OP_RASSERT_P 17 /* rassert_p <iter>, <reg> */
81#define MS_OP_RFETCH_P 18 /* rfetch_p <iter>, <reg>, <mask> */
82#define MS_OP_TRIG 19 /* trigger <reg>, <len>, <array> */
83
84/* common masks */
85#define MS_CLEAR_ALL 0x0
86#define MS_ASSERT_NONE 0x0
87#define MS_ASSERT_ALL 0xff
88#define MS_FETCH_ALL 0xff
89
90/* undefined parameter value */
91#define MS_UNKNOWN 0
91#define MS_NULL 0
92#define MS_UNKNOWN MS_NULL
92
93
94/* predifined parameters */
95#define MS_ACCUM -1 /* use accum previously set by MS_OP_SET */
96
93/* these are register numbers according to our PC-like parallel port model */
94#define MS_REG_DTR 0x0
95#define MS_REG_STR 0x1
96#define MS_REG_CTR 0x2
97#define MS_REG_EPP 0x4
98
99/*
100 * Microsequence macro abstraction level

--- 15 unchanged lines hidden (view full) ---

116
117/* ptr manipulation */
118#define MS_PTR(ptr) { MS_OP_PTR, { ptr } }
119
120#define MS_DASS(byte) MS_RASSERT(MS_REG_DTR,byte)
121#define MS_SASS(byte) MS_RASSERT(MS_REG_STR,byte)
122#define MS_CASS(byte) MS_RASSERT(MS_REG_CTR,byte)
123
97/* these are register numbers according to our PC-like parallel port model */
98#define MS_REG_DTR 0x0
99#define MS_REG_STR 0x1
100#define MS_REG_CTR 0x2
101#define MS_REG_EPP 0x4
102
103/*
104 * Microsequence macro abstraction level

--- 15 unchanged lines hidden (view full) ---

120
121/* ptr manipulation */
122#define MS_PTR(ptr) { MS_OP_PTR, { ptr } }
123
124#define MS_DASS(byte) MS_RASSERT(MS_REG_DTR,byte)
125#define MS_SASS(byte) MS_RASSERT(MS_REG_STR,byte)
126#define MS_CASS(byte) MS_RASSERT(MS_REG_CTR,byte)
127
124#define MS_SET(offset) { MS_OP_SET, { offset } }
128#define MS_SET(accum) { MS_OP_SET, { accum } }
125#define MS_BRSET(mask,offset) { MS_OP_BRSET, { mask, offset } }
126#define MS_DBRA(offset) { MS_OP_DBRA, { offset } }
129#define MS_BRSET(mask,offset) { MS_OP_BRSET, { mask, offset } }
130#define MS_DBRA(offset) { MS_OP_DBRA, { offset } }
131#define MS_BRCLEAR(mask,offset) { MS_OP_BRCLEAR, { mask, offset } }
132#define MS_BRSTAT(mask_set,mask_clr,offset) \
133 { MS_OP_BRSTAT, { mask_set, mask_clr, offset } }
127
128/* C function or submicrosequence call */
129#define MS_C_CALL(function,parameter) \
130 { MS_OP_C_CALL, { function, parameter } }
131#define MS_CALL(microseq) { MS_OP_CALL, { microseq } }
132
133/* mode dependent read/write operations
134 * ppb_MS_xxx_init() call required otherwise default is
135 * IEEE1284 operating mode */
136#define MS_PUT(ptr,len) { MS_OP_PUT, { ptr, len } }
137#define MS_GET(ptr,len) { MS_OP_GET, { ptr, len } }
138
139/* delay in microseconds */
134
135/* C function or submicrosequence call */
136#define MS_C_CALL(function,parameter) \
137 { MS_OP_C_CALL, { function, parameter } }
138#define MS_CALL(microseq) { MS_OP_CALL, { microseq } }
139
140/* mode dependent read/write operations
141 * ppb_MS_xxx_init() call required otherwise default is
142 * IEEE1284 operating mode */
143#define MS_PUT(ptr,len) { MS_OP_PUT, { ptr, len } }
144#define MS_GET(ptr,len) { MS_OP_GET, { ptr, len } }
145
146/* delay in microseconds */
140#define MS_DELAY(delay) { MS_OP_DELAY, { delay } }
147#define MS_DELAY(udelay) { MS_OP_DELAY, { udelay } }
141
148
149/* asynchroneous delay in ms */
150#define MS_ADELAY(mdelay) { MS_OP_ADELAY, { mdelay } }
151
142/* return from submicrosequence execution or microseqence execution */
143#define MS_SUBRET(code) { MS_OP_SUBRET, { code } }
144#define MS_RET(code) { MS_OP_RET, { code } }
145
146/*
147 * Function abstraction level
148 */
149

--- 41 unchanged lines hidden ---
152/* return from submicrosequence execution or microseqence execution */
153#define MS_SUBRET(code) { MS_OP_SUBRET, { code } }
154#define MS_RET(code) { MS_OP_RET, { code } }
155
156/*
157 * Function abstraction level
158 */
159

--- 41 unchanged lines hidden ---