Import gx, PadClamp, rest of mtx, TRK 2.6 and MSL (#525)
* Match mtx and Padclamp.c * Match the rest of GX * Import TRK 2.6 * Import MSL headers and files * Merge some MSL headers into ours
This commit is contained in:
parent
a79294aac0
commit
cdb1d1fc37
113 changed files with 11219 additions and 394 deletions
40
src/TRK_MINNOW_DOLPHIN/notify.c
Normal file
40
src/TRK_MINNOW_DOLPHIN/notify.c
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#include "TRK_MINNOW_DOLPHIN/MetroTRK/Portable/notify.h"
|
||||
#include "TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msgbuf.h"
|
||||
#include "TRK_MINNOW_DOLPHIN/MetroTRK/Portable/support.h"
|
||||
#include "TRK_MINNOW_DOLPHIN/ppc/Generic/targimpl.h"
|
||||
#include "PowerPC_EABI_Support/MetroTRK/trk.h"
|
||||
|
||||
DSError TRKDoNotifyStopped(MessageCommandID cmd)
|
||||
{
|
||||
DSError err;
|
||||
int reqIdx;
|
||||
int bufIdx;
|
||||
TRKBuffer* msg;
|
||||
|
||||
err = TRKGetFreeBuffer(&bufIdx, &msg);
|
||||
if (err == DS_NoError) {
|
||||
if (msg->position >= 0x880) {
|
||||
err = DS_MessageBufferOverflow;
|
||||
} else {
|
||||
msg->data[msg->position++] = cmd;
|
||||
++msg->length;
|
||||
err = 0;
|
||||
}
|
||||
|
||||
if (err == DS_NoError) {
|
||||
if (cmd == DSMSG_NotifyStopped) {
|
||||
TRKTargetAddStopInfo(msg);
|
||||
} else {
|
||||
TRKTargetAddExceptionInfo(msg);
|
||||
}
|
||||
}
|
||||
|
||||
err = TRKRequestSend(msg, &reqIdx, 2, 3, 1);
|
||||
if (err == DS_NoError) {
|
||||
TRKReleaseBuffer(reqIdx);
|
||||
}
|
||||
TRKReleaseBuffer(bufIdx);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue