exi.h

Go to the documentation of this file.
00001 /*
00002         libbroadway - A general purpose library to control the Wii.
00003         EXI support
00004 
00005 Copyright (C) 2010              Alex Marshall <trap15@raidenii.net>
00006 
00007 # This code is licensed to you under the terms of the GNU GPL, version 2;
00008 # see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
00009 */
00010 
00017 #ifndef __EXI_H__
00018 #define __EXI_H__
00019 
00020 #include <types.h>
00021 #include <broadway.h>
00022 
00025 typedef enum {
00026         EXI_CLOCK_1MHz = 0,             
00027         EXI_CLOCK_2MHz,                 
00028         EXI_CLOCK_4MHz,                 
00029         EXI_CLOCK_8MHz,                 
00030         EXI_CLOCK_16MHz,                
00031         EXI_CLOCK_32MHz,                
00032 } exi_clock_t;
00033 
00036 typedef enum {
00037         EXI_TRANSFER_READ = 0,          
00038         EXI_TRANSFER_WRITE,             
00039         EXI_TRANSFER_READ_WRITE,        
00040 } exi_transfer_t;
00041 
00047 void irq_exi_enable(u32 irq);
00053 void irq_exi_disable(u32 irq);
00063 int irq_exi_register_handler(u32 irqn, int (*exec)(u32 irq, void* data), void* data);
00072 irq_handler_t irq_exi_get_handler(u32 irqn);
00073 
00081 int exi_initialize(void);
00089 int exi_shutdown(void);
00095 BOOL exi_set_lock(BOOL locked);
00103 BOOL exi_set_clock(int chan, exi_clock_t clk);
00111 BOOL exi_device_select(int chan, int dev);
00119 BOOL exi_device_deselect(int chan, int dev);
00125 BOOL exi_device_connected(int chan);
00133 BOOL exi_set_dma_address(int chan, u32 addr);
00141 BOOL exi_set_dma_length(int chan, u32 len);
00148 BOOL exi_set_immediate_length(int chan, int len);
00157 BOOL exi_transfer(int chan, exi_transfer_t type, BOOL dma);
00164 BOOL exi_transfer_ended(int chan);
00171 u32 exi_immediate_recv(int chan);
00179 BOOL exi_immediate_send(int chan, u32 data);
00180 
00181 #endif
00182 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated by  doxygen 1.6.3