summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2020-04-27 19:11:59 -0400
committerGitHub <noreply@github.com>2020-04-27 19:11:59 -0400
commitece62fa4ba8e385809deff330c7d7a0b348c10ae (patch)
tree4eb423066318c6e83362152f83d3cf8364e78e98 /src
parent9f8f350da367a81114efe7f0286116e719ec7d8f (diff)
parent151f583f0c2c6cf52b29236b407a64588caa3740 (diff)
Merge pull request #333 from jiangzhengwenjz/librfu
fix librfu issues
Diffstat (limited to 'src')
-rw-r--r--src/librfu_rfu.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/librfu_rfu.c b/src/librfu_rfu.c
index aed851e95..3f5bd8b69 100644
--- a/src/librfu_rfu.c
+++ b/src/librfu_rfu.c
@@ -111,7 +111,7 @@ static const struct LLSFStruct llsf_struct[2] = {
#define xstr(s) str(s)
#define str(s) #s
-const char version_string[] = "RFU_V" xstr(LIBRFU_VERSION);
+static const char version_string[] = "RFU_V" xstr(LIBRFU_VERSION);
static const char str_checkMbootLL[] = "RFU-MBOOT";
@@ -155,16 +155,13 @@ u16 rfu_initializeAPI(u32 *APIBuffer, u16 buffByteSize, IntrFunc *sioIntrTable_p
gRfuStatic = (void *)APIBuffer + 0xb4; // + sizeof(*gRfuLinkStatus)
gRfuFixed = (void *)APIBuffer + 0xdc; // + sizeof(*gRfuStatic)
gRfuSlotStatusNI[0] = (void *)APIBuffer + 0x1bc; // + sizeof(*gRfuFixed)
- gRfuSlotStatusUNI[0] = (void *)APIBuffer + 0x37c; // + sizeof(*gRfuSlotStatusNI[0])
+ gRfuSlotStatusUNI[0] = (void *)APIBuffer + 0x37c; // + sizeof(*gRfuSlotStatusNI[0]) * RFU_CHILD_MAX
for (i = 1; i < RFU_CHILD_MAX; ++i)
{
gRfuSlotStatusNI[i] = &gRfuSlotStatusNI[i - 1][1];
gRfuSlotStatusUNI[i] = &gRfuSlotStatusUNI[i - 1][1];
}
- // TODO: Is it possible to fix the following 2 statements?
- // It's equivalent to:
- // gRfuFixed->STWIBuffer = &APIBuffer->intr;
- // STWI_init_all(&APIBuffer->intr, sioIntrTable_p, copyInterruptToRam);
+ // remaining space in API buffer is used for `struct RfuIntrStruct`.
gRfuFixed->STWIBuffer = (struct RfuIntrStruct *)&gRfuSlotStatusUNI[3][1];
STWI_init_all((struct RfuIntrStruct *)&gRfuSlotStatusUNI[3][1], sioIntrTable_p, copyInterruptToRam);
rfu_STC_clearAPIVariables();