libogc
v2.9.0
|
DSP subsystem. More...
#include <gctypes.h>
Data Structures | |
struct | _dsp_task |
Macros | |
#define | DSPTASK_ATTACH 0x00000001 |
#define | DSPTASK_CANCEL 0x00000002 |
#define | DSPTASK_CLEARALL 0x00000000 |
#define | DSPTASK_DONE 3 |
#define | DSPTASK_INIT 0 |
#define | DSPTASK_RUN 1 |
#define | DSPTASK_YIELD 2 |
Typedefs | |
typedef void(* | DSPCallback) (void) |
function pointer typedef for the user's DSP interrupt callback | |
typedef struct _dsp_task | dsptask_t |
forward typdef to struct _dsp_task. This struture holds certain DSP task information for execution. More... | |
typedef void(* | DSPTaskCallback) (dsptask_t *task) |
function pointer typedef for the user's DSP task callbacks More... | |
Functions | |
dsptask_t * | DSP_AddTask (dsptask_t *task) |
Add a DSP task to the tasklist and start executing if necessary. More... | |
void | DSP_AssertInt (void) |
Asserts the processor interface interrupt. More... | |
dsptask_t * | DSP_AssertTask (dsptask_t *task) |
void | DSP_CancelTask (dsptask_t *task) |
u32 | DSP_CheckMailFrom (void) |
Check for mail from DSP. More... | |
u32 | DSP_CheckMailTo (void) |
Check if mail was sent to DSP. More... | |
u32 | DSP_GetDMAStatus (void) |
void | DSP_Halt (void) |
void | DSP_Init (void) |
Initialize DSP subsystem. More... | |
u32 | DSP_ReadCPUtoDSP (void) |
Read back CPU->DSP mailbox. More... | |
u32 | DSP_ReadMailFrom (void) |
Read mail from DSP. 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... | |
void | DSP_Reset (void) |
void | DSP_SendMailTo (u32 mail) |
Send mail to DSP. More... | |
void | DSP_Unhalt (void) |
DSP subsystem.
forward typdef to struct _dsp_task. This struture holds certain DSP task information for execution.
state | current task state set |
prio | priority of the task |
flags | currnet task flag(s) set. |
init_vec | initialization vector. depends on the DSP code to execute. |
resume_vec | resume vector. depends on the DSP code to execute. |
iram_maddr | main memory address of i-ram image. NOTE: Has to be aligned on a 32byte boundery! |
iram_len | size of i-ram image. NOTE: Should be a multiple of 32 |
iram_addr | DSP i-ram address to load the image to. |
dram_maddr | main memory address of d-ram image. NOTE: Has to be aligned on a 32byte boundery! |
dram_len | size of d-ram image. NOTE: Should be a multiple of 32 |
dram_addr | DSP d-ram address to load the image to. |
init_cb | pointer to the user's init callback function. Called durring task initialization. |
res_cb | pointer to the user's resume callback function. Called when the task should resume. |
done_cb | pointer to the user's done callback function. Called when the task has finished. |
req_cb | pointer to the user's request callback function. Used to retrieve data from main application durring execution. |
next | pointer to the next task in the doubly linked list. |
prev | pointer to the previous task in the doubly linked list. |
void(* DSPTaskCallback)(dsptask_t *task) |
function pointer typedef for the user's DSP task callbacks
[in] | task | pointer to the dsp_task structure. |
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 | ( | void | ) |
Asserts the processor interface interrupt.
u32 DSP_CheckMailFrom | ( | void | ) |
Check for mail from DSP.
u32 DSP_CheckMailTo | ( | void | ) |
Check if mail was sent to DSP.
void DSP_Init | ( | void | ) |
Initialize DSP subsystem.
u32 DSP_ReadCPUtoDSP | ( | void | ) |
Read back CPU->DSP mailbox.
u32 DSP_ReadMailFrom | ( | void | ) |
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_SendMailTo | ( | u32 | ) |
Send mail to DSP.
[in] | value to send |