RetroArch
|
#include <stdlib.h>
#include <stdio.h>
#include "asm.h"
#include "processor.h"
#include "irq.h"
#include "dsp.h"
Macros | |
#define | DSPCR_DSPRESET 0x0800 |
#define | DSPCR_DSPDMA 0x0200 |
#define | DSPCR_DSPINTMSK 0x0100 |
#define | DSPCR_DSPINT 0x0080 |
#define | DSPCR_ARINTMSK 0x0040 |
#define | DSPCR_ARINT 0x0020 |
#define | DSPCR_AIINTMSK 0x0010 |
#define | DSPCR_AIINT 0x0008 |
#define | DSPCR_HALT 0x0004 |
#define | DSPCR_PIINT 0x0002 |
#define | DSPCR_RES 0x0001 |
#define | _SHIFTL(v, s, w) ((u32) (((u32)(v) & ((0x01 << (w)) - 1)) << (s))) |
#define | _SHIFTR(v, s, w) ((u32)(((u32)(v) >> (s)) & ((0x01 << (w)) - 1))) |
Functions | |
static void | __dsp_inserttask (dsptask_t *task) |
static void | __dsp_removetask (dsptask_t *task) |
static void | __dsp_boottask (dsptask_t *task) |
static void | __dsp_exectask (dsptask_t *exec, dsptask_t *hire) |
static void | __dsp_def_taskcb () |
static void | __dsp_inthandler (u32 nIrq, void *pCtx) |
void | DSP_Init () |
Initialize DSP subsystem. More... | |
DSPCallback | DSP_RegisterCallback (DSPCallback usr_cb) |
Register an user's interrupt callback. This may be used to handle DSP interrupts on its own. By default a system default callback is installed on DSP_Init(). More... | |
u32 | DSP_CheckMailTo () |
Check if mail was sent to DSP. More... | |
u32 | DSP_CheckMailFrom () |
Check for mail from DSP. More... | |
u32 | DSP_ReadMailFrom () |
Read mail from DSP. More... | |
void | DSP_SendMailTo (u32 mail) |
Send mail to DSP. More... | |
u32 | DSP_ReadCPUtoDSP () |
Read back CPU->DSP mailbox. More... | |
void | DSP_AssertInt () |
Asserts the processor interface interrupt. More... | |
void | DSP_Reset () |
void | DSP_Halt () |
void | DSP_Unhalt () |
u32 | DSP_GetDMAStatus () |
dsptask_t * | DSP_AddTask (dsptask_t *task) |
Add a DSP task to the tasklist and start executing if necessary. More... | |
void | DSP_CancelTask (dsptask_t *task) |
dsptask_t * | DSP_AssertTask (dsptask_t *task) |
Variables | |
static u32 | __dsp_inited = FALSE |
static u32 | __dsp_rudetask_pend = FALSE |
static DSPCallback | __dsp_intcb = NULL |
static dsptask_t * | __dsp_currtask |
static dsptask_t * | __dsp_lasttask |
static dsptask_t * | __dsp_firsttask |
static dsptask_t * | __dsp_rudetask |
static dsptask_t * | tmp_task |
static vu16 *const | _dspReg = (u16*)0xCC005000 |
#define DSPCR_AIINT 0x0008 |
#define DSPCR_AIINTMSK 0x0010 |
#define DSPCR_ARINT 0x0020 |
#define DSPCR_ARINTMSK 0x0040 |
#define DSPCR_DSPDMA 0x0200 |
#define DSPCR_DSPINT 0x0080 |
#define DSPCR_DSPINTMSK 0x0100 |
#define DSPCR_DSPRESET 0x0800 |
#define DSPCR_HALT 0x0004 |
#define DSPCR_PIINT 0x0002 |
#define DSPCR_RES 0x0001 |
|
static |
Add a DSP task to the tasklist and start executing if necessary.
[in] | task | pointer to a dsptask_t structure which holds all necessary values for DSP task execution. |
void DSP_AssertInt | ( | ) |
Asserts the processor interface interrupt.
u32 DSP_CheckMailFrom | ( | ) |
Check for mail from DSP.
u32 DSP_CheckMailTo | ( | ) |
Check if mail was sent to DSP.
u32 DSP_GetDMAStatus | ( | ) |
void DSP_Halt | ( | ) |
void DSP_Init | ( | ) |
Initialize DSP subsystem.
u32 DSP_ReadCPUtoDSP | ( | ) |
Read back CPU->DSP mailbox.
u32 DSP_ReadMailFrom | ( | ) |
Read mail from DSP.
DSPCallback DSP_RegisterCallback | ( | DSPCallback | usr_cb | ) |
Register an user's interrupt callback. This may be used to handle DSP interrupts on its own. By default a system default callback is installed on DSP_Init().
[in] | user_cb | pointer to the user's interrupt callback function. \ |
void DSP_Reset | ( | ) |
Send mail to DSP.
[in] | value to send |
void DSP_Unhalt | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |