Deleted Added
full compact
ppb_msq.h (42475) ppb_msq.h (43301)
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.2 1998/09/13 18:26:26 nsouch Exp $
26 * $Id: ppb_msq.h,v 1.3 1999/01/10 12:04:54 nsouch Exp $
27 *
28 */
29#ifndef __PPB_MSQ_H
30#define __PPB_MSQ_H
31
32/*
33 * Basic definitions
34 */

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

114/* trigger the port with array[char, delay,...] */
115#define MS_TRIG(reg,len,array) { MS_OP_TRIG, { reg, len, array } }
116
117/* assert/fetch from/to ptr */
118#define MS_RASSERT_P(n,reg) { MS_OP_RASSERT_P, { n, reg } }
119#define MS_RFETCH_P(n,reg,mask) { MS_OP_RFETCH_P, { n, reg, mask } }
120
121/* ptr manipulation */
27 *
28 */
29#ifndef __PPB_MSQ_H
30#define __PPB_MSQ_H
31
32/*
33 * Basic definitions
34 */

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

114/* trigger the port with array[char, delay,...] */
115#define MS_TRIG(reg,len,array) { MS_OP_TRIG, { reg, len, array } }
116
117/* assert/fetch from/to ptr */
118#define MS_RASSERT_P(n,reg) { MS_OP_RASSERT_P, { n, reg } }
119#define MS_RFETCH_P(n,reg,mask) { MS_OP_RFETCH_P, { n, reg, mask } }
120
121/* ptr manipulation */
122#define MS_PTR(ptr) { MS_OP_PTR, { ptr } }
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
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
128#define MS_SET(accum) { MS_OP_SET, { accum } }
128#define MS_SET(accum) { MS_OP_SET, { { accum } } }
129#define MS_BRSET(mask,offset) { MS_OP_BRSET, { mask, 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 } }
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 } }
134
135/* C function or submicrosequence call */
136#define MS_C_CALL(function,parameter) \
137 { MS_OP_C_CALL, { function, parameter } }
132#define MS_BRSTAT(mask_set,mask_clr,offset) \
133 { MS_OP_BRSTAT, { mask_set, mask_clr, offset } }
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 } }
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 */
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 */
147#define MS_DELAY(udelay) { MS_OP_DELAY, { udelay } }
147#define MS_DELAY(udelay) { MS_OP_DELAY, { { udelay } } }
148
149/* asynchroneous delay in ms */
148
149/* asynchroneous delay in ms */
150#define MS_ADELAY(mdelay) { MS_OP_ADELAY, { mdelay } }
150#define MS_ADELAY(mdelay) { MS_OP_ADELAY, { { mdelay } } }
151
152/* return from submicrosequence execution or microseqence execution */
151
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 } }
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
160#define ppb_MS_GET_init(dev,body) ppb_MS_init(dev, body, MS_OP_GET)
161
162#define ppb_MS_PUT_init(dev,body) ppb_MS_init(dev, body, MS_OP_PUT)

--- 38 unchanged lines hidden ---
155
156/*
157 * Function abstraction level
158 */
159
160#define ppb_MS_GET_init(dev,body) ppb_MS_init(dev, body, MS_OP_GET)
161
162#define ppb_MS_PUT_init(dev,body) ppb_MS_init(dev, body, MS_OP_PUT)

--- 38 unchanged lines hidden ---