9a1180443c8b214ee2b3ce3acde9f2069eac263e
[AROS.git] / arch / m68k-amiga / expansion / writeexpansionbyte.c
blob9a1180443c8b214ee2b3ce3acde9f2069eac263e
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_LH3(void, WriteExpansionByte,
17 /* SYNOPSIS */
18 AROS_LHA(APTR , board, A0),
19 AROS_LHA(ULONG, offset, D0),
20 AROS_LHA(ULONG, byte, D1),
22 /* LOCATION */
23 struct ExpansionBase *, ExpansionBase, 19, Expansion)
25 /* FUNCTION
27 INPUTS
29 RESULT
31 NOTES
33 EXAMPLE
35 BUGS
37 SEE ALSO
39 INTERNALS
41 HISTORY
42 27-11-96 digulla automatically created from
43 expansion_lib.fd and clib/expansion_protos.h
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
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 p[offset + loffset] = byte << 4;
58 p[offset] = byte;
60 AROS_LIBFUNC_EXIT
61 } /* WriteExpansionByte */