revert between 56095 -> 55830 in arch
[AROS.git] / rom / exec / chipset.h
blob8ea5003b6b248ad14adeac76e377e915c5cec3f7
1 /*
2 Copyright © 2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Amiga(tm) chipset control macros
6 Lang: english
7 */
9 #ifdef AROS_ARCH_amiga
11 #include <hardware/custom.h>
13 static inline void CUSTOM_ENABLE(ULONG intNumber)
15 if (intNumber < INTB_INTEN)
17 volatile struct Custom *custom = (struct Custom *)(void **)0xdff000;
19 custom->intena = (UWORD)(INTF_SETCLR|(1L<<intNumber));
23 static inline void CUSTOM_DISABLE(ULONG intNumber, struct List *list)
25 if (intNumber < INTB_INTEN)
27 /* disable interrupts if there are no more nodes on the list */
28 if (list->lh_TailPred == (struct Node *)list)
30 volatile struct Custom *custom = (struct Custom *)(void **)0xdff000;
32 custom->intena = (UWORD)((1<<intNumber));
37 static inline void CUSTOM_ACK(UWORD intBit)
39 volatile struct Custom *custom = (struct Custom*)0xdff000;
41 custom->intena = intBit;
42 custom->intreq = intBit;
45 static inline void CUSTOM_CAUSE(UWORD intBit)
47 volatile struct Custom *custom = (struct Custom*)0xdff000;
49 custom->intreq = INTF_SETCLR | intBit;
52 #else
54 struct Custom;
56 #define CUSTOM_ENABLE(intNumber)
57 #define CUSTOM_DISABLE(intNumber, list)
58 #define CUSTOM_ACK(intBit)
59 #define CUSTOM_CAUSE(intBit)
61 #endif