Add a skeleton for the interrupt controller
This commit is contained in:
32
source/includes/interrupt_controller.h
Normal file
32
source/includes/interrupt_controller.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*******************************************************************************
|
||||
* NewOswan
|
||||
* interrupt_controller.h:
|
||||
*
|
||||
* Created by mlt on 14/03/2022.
|
||||
* Copyright (c) 2022 986-Studio. All rights reserved.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __INTERRUPT_CONTROLLER_H__
|
||||
#define __INTERRUPT_CONTROLLER_H__
|
||||
|
||||
#include <device.h>
|
||||
|
||||
typedef enum hw_interrupt_type_t
|
||||
{
|
||||
/* They are in the same order as the hardware */
|
||||
HWI_SERIAL_TX = 0,
|
||||
HWI_KEY,
|
||||
HWI_CART,
|
||||
HWI_SERIAL_RX,
|
||||
HWI_LINE_COMPARE,
|
||||
HWI_VBLANK_TIMER,
|
||||
HWI_VBLANK,
|
||||
HWI_HBLANK_TIMER,
|
||||
} hw_interrupt_type_t;
|
||||
|
||||
extern device_t InterruptController;
|
||||
|
||||
void trigger_interrupt(hw_interrupt_type_t type);
|
||||
|
||||
#endif /* __INTERRUPT_CONTROLLER_H__ */
|
||||
Reference in New Issue
Block a user