2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _DOLPHIN_DSP
|
|
|
|
#define _DOLPHIN_DSP
|
2022-04-30 08:32:00 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
2022-09-10 20:32:26 +00:00
|
|
|
#include <dolphin/os.h>
|
2022-04-30 08:32:00 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
typedef void (*DSPCallback)(void* task);
|
2022-04-30 08:32:00 +00:00
|
|
|
|
|
|
|
typedef struct DSPTaskInfo DSPTaskInfo;
|
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
typedef struct DSPTaskInfo {
|
|
|
|
vu32 state;
|
|
|
|
vu32 priority;
|
|
|
|
vu32 flags;
|
|
|
|
u16* iram_mmem_addr;
|
|
|
|
u32 iram_length;
|
|
|
|
u32 iram_addr;
|
|
|
|
|
|
|
|
u16* dram_mmem_addr;
|
|
|
|
u32 dram_length;
|
|
|
|
u32 dram_addr;
|
|
|
|
|
|
|
|
u16 dsp_init_vector;
|
|
|
|
u16 dsp_resume_vector;
|
|
|
|
|
|
|
|
DSPCallback init_cb;
|
|
|
|
DSPCallback res_cb;
|
|
|
|
DSPCallback done_cb;
|
|
|
|
DSPCallback req_cb;
|
|
|
|
|
|
|
|
struct STRUCT_DSP_TASK* next;
|
|
|
|
struct STRUCT_DSP_TASK* prev;
|
|
|
|
|
|
|
|
OSTime t_context;
|
|
|
|
OSTime t_task;
|
2022-04-30 08:32:00 +00:00
|
|
|
|
|
|
|
} DSPTaskInfo;
|
|
|
|
|
|
|
|
void DSPInit();
|
|
|
|
void DSPReset();
|
|
|
|
void DSPHalt();
|
|
|
|
void DSPSendMailToDSP(u32 mail);
|
|
|
|
u32 DSPCheckMailToDSP();
|
|
|
|
u32 DSPCheckMailFromDSP();
|
|
|
|
u32 DSPGetDMAStatus();
|
|
|
|
|
|
|
|
DSPTaskInfo* DSPAddTask(DSPTaskInfo* task);
|
|
|
|
|
|
|
|
void __DSP_debug_printf(const char* fmt, ...);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _DOLPHIN_DSP
|