dsp.h

Go to the documentation of this file.
00001 /*
00002         libbroadway - A general purpose library to control the Wii.
00003         DSP 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 __DSP_H__
00018 #define __DSP_H__
00019 
00020 #include <types.h>
00021 #include <broadway.h>
00022 
00025 typedef struct {
00026         void*   iram_src;       
00027         u16     iram_dst;       
00028         u16     iram_len;       
00029         void*   dram_src;       
00030         u16     dram_dst;       
00031         u16     dram_len;       
00032         u16     pc;             
00033 } dsp_ucode_t;
00034 
00042 int dsp_initialize(void);
00050 int dsp_shutdown(void);
00051 
00054 void dsp_reset(void);
00055 
00061 void dsp_send_mail(u32 data);
00067 u32 dsp_read_outbox(void);
00073 u32 dsp_recv_mail(void);
00079 BOOL dsp_check_inbox(void);
00085 BOOL dsp_check_outbox(void);
00086 
00092 BOOL dsp_halt(void);
00098 BOOL dsp_unhalt(void);
00099 
00108 int irq_dsp_register_handler(int (*exec)(u32 irq, void* data), void* data);
00115 irq_handler_t irq_dsp_get_handler(void);
00120 void irq_dsp_enable(void);
00125 void irq_dsp_disable(void);
00126 
00133 int dsp_upload_ucode(dsp_ucode_t ucode);
00134 
00135 #endif
00136 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated by  doxygen 1.6.3