1/*
2 * Copyright 2002-2010, Axel D��rfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 *
5 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
6 * Distributed under the terms of the NewOS License.
7 */
8#ifndef KERNEL_ARCH_INT_H
9#define KERNEL_ARCH_INT_H
10
11
12// config flags for arch_int_configure_io_interrupt()
13#define B_EDGE_TRIGGERED		1
14#define B_LEVEL_TRIGGERED		2
15#define B_LOW_ACTIVE_POLARITY	4
16#define B_HIGH_ACTIVE_POLARITY	8
17
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23struct kernel_args;
24
25status_t arch_int_init(struct kernel_args* args);
26status_t arch_int_init_post_vm(struct kernel_args* args);
27status_t arch_int_init_io(struct kernel_args* args);
28status_t arch_int_init_post_device_manager(struct kernel_args* args);
29
30void arch_int_enable_interrupts(void);
31int arch_int_disable_interrupts(void);
32void arch_int_restore_interrupts(int oldState);
33void arch_int_enable_io_interrupt(int32 irq);
34void arch_int_disable_io_interrupt(int32 irq);
35void arch_int_configure_io_interrupt(int32 irq, uint32 config);
36bool arch_int_are_interrupts_enabled(void);
37int32 arch_int_assign_to_cpu(int32 irq, int32 cpu);
38
39#ifdef __cplusplus
40}
41#endif
42
43
44#include <arch_int.h>
45
46
47#endif	/* KERNEL_ARCH_INT_H */
48