2020-04-19 01:40:27 +00:00
|
|
|
#include "libultra_internal.h"
|
|
|
|
#include <global.h>
|
|
|
|
|
2020-04-22 17:20:49 +00:00
|
|
|
s32 osAfterPreNMI(void) {
|
|
|
|
return __osSpSetPc(0);
|
|
|
|
}
|
2020-04-19 01:40:27 +00:00
|
|
|
|
2020-04-22 17:20:49 +00:00
|
|
|
/**
|
|
|
|
* osContStartQuery:
|
|
|
|
* Starts to read the values for SI device status and type which are connected to the controller port and joyport
|
|
|
|
* connector.
|
|
|
|
**/
|
2020-04-19 01:40:27 +00:00
|
|
|
s32 osContStartQuery(OSMesgQueue* mq) {
|
|
|
|
s32 ret;
|
|
|
|
ret = 0;
|
|
|
|
|
|
|
|
__osSiGetAccess();
|
|
|
|
if (_osCont_lastPollType != CONT_CMD_REQUEST_STATUS) {
|
|
|
|
__osPackRequestData(CONT_CMD_REQUEST_STATUS);
|
|
|
|
ret = __osSiRawStartDma(OS_WRITE, &_osPifInternalBuff);
|
|
|
|
osRecvMesg(mq, NULL, OS_MESG_BLOCK);
|
|
|
|
}
|
|
|
|
ret = __osSiRawStartDma(OS_READ, &_osPifInternalBuff);
|
|
|
|
_osCont_lastPollType = CONT_CMD_REQUEST_STATUS;
|
|
|
|
__osSiRelAccess();
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2020-04-22 17:20:49 +00:00
|
|
|
/**
|
|
|
|
* osContGetQuery:
|
|
|
|
* Returns the values from osContStartQuery to status. Both functions must be paired for use.
|
|
|
|
**/
|
|
|
|
void osContGetQuery(OSContStatus* data) {
|
|
|
|
u8 pattern;
|
|
|
|
__osContGetInitData(&pattern, data);
|
|
|
|
}
|