summaryrefslogtreecommitdiff
path: root/src/libultra_code/osContStartReadData.c
diff options
context:
space:
mode:
authorfig02 <fig02srl@gmail.com>2020-03-23 06:57:38 -0400
committerfig02 <fig02srl@gmail.com>2020-03-23 06:57:38 -0400
commit1ea7fe816579e8cecfbe5b685afe6081b9ba9bb5 (patch)
treeac3d8bc784762f304aac39afdb44b01f12acac08 /src/libultra_code/osContStartReadData.c
parent8cd9a881d0f19926e0e066f7c384b1f3730af648 (diff)
parent7116cca243540dbf7ab3a398e9064cf49788bccd (diff)
merge master
Diffstat (limited to 'src/libultra_code/osContStartReadData.c')
-rw-r--r--src/libultra_code/osContStartReadData.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/libultra_code/osContStartReadData.c b/src/libultra_code/osContStartReadData.c
index a96bc6f28..9bd0bfbd2 100644
--- a/src/libultra_code/osContStartReadData.c
+++ b/src/libultra_code/osContStartReadData.c
@@ -3,12 +3,10 @@
#include <ultra64/controller.h>
-s32 osContStartReadData(OSMesgQueue *mq) //func_80100EF0
-{
+s32 osContStartReadData(OSMesgQueue* mq) {
s32 ret;
- __osSiGetAccess(); //__osSiGetAccess
- if (_osCont_lastPollType != 1)
- {
+ __osSiGetAccess(); // __osSiGetAccess
+ if (_osCont_lastPollType != 1) {
__osPackReadData();
__osSiRawStartDma(OS_WRITE, &_osPifInternalBuff);
osRecvMesg(mq, NULL, OS_MESG_BLOCK);
@@ -19,8 +17,8 @@ s32 osContStartReadData(OSMesgQueue *mq) //func_80100EF0
return ret;
}
-void osContGetReadData(OSContPad *pad) { //func_80100F74
- PIF_IO_slot_t *slot_ptr;
+void osContGetReadData(OSContPad* pad) {
+ PIF_IO_slot_t* slot_ptr;
PIF_IO_slot_t slot;
s32 i;
slot_ptr = _osPifInternalBuff.slots;
@@ -35,12 +33,12 @@ void osContGetReadData(OSContPad *pad) { //func_80100F74
};
}
-void __osPackReadData() { //func_80101000
- PIF_IO_slot_t *slot_ptr;
+void __osPackReadData() {
+ PIF_IO_slot_t* slot_ptr;
PIF_IO_slot_t slot;
s32 i;
slot_ptr = _osPifInternalBuff.slots;
- for(i = 0; i < 0xF; i++) {
+ for (i = 0; i < 0xF; i++) {
_osPifInternalBuff.words[i] = 0;
}
_osPifInternalBuff.status_control = 1;
@@ -51,7 +49,7 @@ void __osPackReadData() { //func_80101000
slot.button = 0xFFFF;
slot.rawStickX = 0xFF;
slot.rawStickY = 0xFF;
- for(i = 0; i < _osCont_numControllers; i++) {
+ for (i = 0; i < _osCont_numControllers; i++) {
*slot_ptr++ = slot;
}
slot_ptr->hdr.slot_type = 0xFE;