liberis
|
00001 /* 00002 liberis -- A set of libraries for controlling the NEC PC-FX 00003 00004 Copyright (C) 2011 Alex Marshall "trap15" <trap15@raidenii.net> 00005 00006 # This code is licensed to you under the terms of the MIT license; 00007 # see file LICENSE or http://www.opensource.org/licenses/mit-license.php 00008 */ 00009 00016 #ifndef _LIBERIS_V810_H_ 00017 #define _LIBERIS_V810_H_ 00018 00019 #include <eris/types.h> 00020 00021 /* Cache functions */ 00022 00026 void cache_enable(void); 00030 void cache_disable(void); 00036 void cache_clear(int entry, int count); 00037 /* Must be aligned to 256 byte boundary */ 00043 void cache_dump(void* dumpaddr); 00051 void cache_restore(void* restaddr); 00052 00053 /* IRQ functions */ 00054 00061 int irq_enable(void); 00068 int irq_disable(void); 00075 void irq_restore(int on); 00084 void irq_set_level(int lv); 00091 void irq_set_mask(int mask); 00099 void irq_set_priority(u32 prio); 00106 int irq_get_level(void); 00113 u16 irq_get_mask(void); 00121 u32 irq_get_priority(void); 00129 void irq_set_handler(int level, void (*fn)(void)); 00130 00131 /* Port functions */ 00132 00139 void out32(u32 port, u32 data); 00146 void out16(u32 port, u16 data); 00153 void out8(u32 port, u8 data); 00160 u32 in32(u32 port); 00167 u16 in16(u32 port); 00174 u8 in8(u32 port); 00175 00176 #endif 00177