2002-07-09 16:24:59 +04:00
|
|
|
/*
|
2010-04-15 16:42:10 +04:00
|
|
|
* Copyright 2002-2010, Axel Dörfler, axeld@pinc-software.de.
|
2005-04-27 05:08:35 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
|
|
|
* Distributed under the terms of the NewOS License.
|
|
|
|
*/
|
2003-05-03 18:12:16 +04:00
|
|
|
#ifndef KERNEL_ARCH_INT_H
|
|
|
|
#define KERNEL_ARCH_INT_H
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2003-10-08 01:56:32 +04:00
|
|
|
|
2008-07-19 03:19:41 +04:00
|
|
|
// config flags for arch_int_configure_io_interrupt()
|
|
|
|
#define B_EDGE_TRIGGERED 1
|
|
|
|
#define B_LEVEL_TRIGGERED 2
|
|
|
|
#define B_LOW_ACTIVE_POLARITY 4
|
|
|
|
#define B_HIGH_ACTIVE_POLARITY 8
|
2003-10-08 01:56:32 +04:00
|
|
|
|
2010-04-15 16:42:10 +04:00
|
|
|
|
2003-10-08 01:56:32 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2008-07-19 03:19:41 +04:00
|
|
|
struct kernel_args;
|
|
|
|
|
2010-04-15 16:42:10 +04:00
|
|
|
status_t arch_int_init(struct kernel_args* args);
|
|
|
|
status_t arch_int_init_post_vm(struct kernel_args* args);
|
2010-06-26 02:16:10 +04:00
|
|
|
status_t arch_int_init_io(struct kernel_args* args);
|
2010-04-15 16:42:10 +04:00
|
|
|
status_t arch_int_init_post_device_manager(struct kernel_args* args);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
void arch_int_enable_interrupts(void);
|
|
|
|
int arch_int_disable_interrupts(void);
|
2010-04-15 16:42:10 +04:00
|
|
|
void arch_int_restore_interrupts(int oldState);
|
2002-07-09 16:24:59 +04:00
|
|
|
void arch_int_enable_io_interrupt(int irq);
|
|
|
|
void arch_int_disable_io_interrupt(int irq);
|
2008-07-19 03:19:41 +04:00
|
|
|
void arch_int_configure_io_interrupt(int irq, uint32 config);
|
2003-10-28 20:55:20 +03:00
|
|
|
bool arch_int_are_interrupts_enabled(void);
|
2021-12-02 01:16:57 +03:00
|
|
|
int32 arch_int_assign_to_cpu(int32 irq, int32 cpu);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2003-10-08 01:56:32 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-10-01 18:33:10 +04:00
|
|
|
|
|
|
|
#include <arch_int.h>
|
|
|
|
|
|
|
|
|
2003-05-03 18:12:16 +04:00
|
|
|
#endif /* KERNEL_ARCH_INT_H */
|