927ac62cef393024d7c86e1235563919b1f0b0cb
[AROS.git] / arch / m68k-amiga / expansion / readexpansionbyte.c
blob927ac62cef393024d7c86e1235563919b1f0b0cb
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include "expansion_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <clib/expansion_protos.h>
15 AROS_LH2(UBYTE, ReadExpansionByte,
17 /* SYNOPSIS */
18 AROS_LHA(APTR , board, A0),
19 AROS_LHA(ULONG, offset, D0),
21 /* LOCATION */
22 struct ExpansionBase *, ExpansionBase, 16, Expansion)
24 /* FUNCTION
26 INPUTS
28 RESULT
30 NOTES
32 EXAMPLE
34 BUGS
36 SEE ALSO
38 INTERNALS
40 HISTORY
41 27-11-96 digulla automatically created from
42 expansion_lib.fd and clib/expansion_protos.h
44 *****************************************************************************/
46 AROS_LIBFUNC_INIT
48 UBYTE v;
49 UWORD loffset;
50 volatile UBYTE *p = (UBYTE*)board;
52 offset *= 4;
53 if (((ULONG)board) & 0xff000000)
54 loffset = 0x100;
55 else
56 loffset = 0x002;
57 v = (p[offset + loffset] & 0xf0) >> 4;
58 v |= p[offset] & 0xf0;
59 return v;
61 AROS_LIBFUNC_EXIT
62 } /* ReadExpansionByte */