2 Copyright © 2002-2009, Chris Hodges. All rights reserved.
3 Copyright © 2009-2012, The AROS Development Team. All rights reserved.
14 #define SYNC asm volatile("eieio");
19 #define READMEM16_LE(rb) AROS_WORD2LE(*((volatile UWORD *) (rb)))
20 #define READMEM32_LE(rb) AROS_LONG2LE(*((volatile ULONG *) (rb)))
21 #define WRITEMEM32_LE(adr, value) \
22 *((volatile ULONG *) (adr)) = AROS_LONG2LE(value)
23 #define CONSTWRITEMEM32_LE(adr, value) \
24 *((volatile ULONG *) (adr)) = AROS_LONG2LE(value)
26 #define CONSTWRITEREG16_LE(rb, offset, value) \
27 *((volatile UWORD *) (((UBYTE *) (rb)) + ((ULONG) (offset)))) = \
29 #define CONSTWRITEREG32_LE(rb, offset, value) \
30 *((volatile ULONG *) (((UBYTE *) (rb)) + ((ULONG) (offset)))) = \
32 #define WRITEREG16_LE(rb, offset, value) \
33 *((volatile UWORD *) (((UBYTE *) (rb)) + ((ULONG) (offset)))) = \
35 #define WRITEREG32_LE(rb, offset, value) \
36 *((volatile ULONG *) (((UBYTE *) (rb)) + ((ULONG) (offset)))) = \
38 #define WRITEREG64_LE(rb, offset, value) \
39 *((volatile UQUAD *) (((UBYTE *) (rb)) + ((ULONG) (offset)))) = \
42 #define READREG16_LE(rb, offset) \
43 AROS_WORD2LE(*((volatile UWORD *) (((UBYTE *) (rb)) + ((ULONG) (offset)))))
44 #define READREG32_LE(rb, offset) \
45 AROS_LONG2LE(*((volatile ULONG *) (((UBYTE *) (rb)) + ((ULONG) (offset)))))
46 #define READREG64_LE(rb, offset) \
47 AROS_QUAD2LE(*((volatile UQUAD *) (((UBYTE *) (rb)) + ((ULONG) (offset)))))
49 #define READIO16_LE(rb, offset) \
50 AROS_WORD2LE(WORDIN((((UBYTE *) (rb)) + ((ULONG) (offset)))))
51 #define WRITEIO16_LE(rb, offset, value) \
52 WORDOUT((((UBYTE *) (rb)) + ((ULONG) (offset))), AROS_WORD2LE(value))
53 #define WRITEIO32_LE(rb, offset, value) \
54 LONGOUT((((UBYTE *) (rb)) + ((ULONG) (offset))), AROS_WORD2LE(value))