Add a skeleton for the interrupt controller

This commit is contained in:
Godzil
2022-06-27 17:04:55 +01:00
parent d6a2a77303
commit 37e4b219d4
2 changed files with 135 additions and 0 deletions

View 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__ */