summaryrefslogtreecommitdiff
path: root/arm9/lib/include/MB_mb.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-05-06 17:31:47 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2020-05-06 17:31:47 -0400
commit8781fb36e9f9a20d6af11c77cfd669e27067e279 (patch)
treea3926aa3df1b83d1cfd7f125162710fe99123054 /arm9/lib/include/MB_mb.h
parenta7fb32ea399ba1154733c2af184d296e5a245490 (diff)
parentd821fc7b1346576fd88d8ee0fd38ec36a2cd8305 (diff)
Merge branch 'master' of https://github.com/martmists/pokediamond into libfs
Diffstat (limited to 'arm9/lib/include/MB_mb.h')
-rw-r--r--arm9/lib/include/MB_mb.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/arm9/lib/include/MB_mb.h b/arm9/lib/include/MB_mb.h
new file mode 100644
index 00000000..128ea480
--- /dev/null
+++ b/arm9/lib/include/MB_mb.h
@@ -0,0 +1,45 @@
+//
+// Created by red031000 on 2020-05-06.
+//
+
+#ifndef POKEDIAMOND_MB_MB_H
+#define POKEDIAMOND_MB_MB_H
+
+#include "consts.h"
+
+#define MB_TYPE_ILLEGAL 0
+#define MB_TYPE_NORMAL 1
+#define MB_TYPE_MULTIBOOT 2
+
+typedef struct {
+ u16 length;
+ u16 rssi;
+ u16 bssid[3];
+ u16 ssidLength;
+ u8 ssid[32];
+ u16 capaInfo;
+ struct {
+ u16 basic;
+ u16 support;
+ } rateSet;
+ u16 beaconperiod;
+ u16 dtimPeriod;
+ u16 channel;
+ u16 cfpPeriod;
+ u16 cfpMaxDuration;
+} MBParentBssDesc;
+
+typedef struct {
+ u16 boot_type;
+ MBParentBssDesc parent_bss_desc;
+} MBParam;
+
+static inline const MBParam *MB_GetMultiBootParam() {
+ return (const MBParam *)HW_WM_BOOT_BUF;
+}
+
+static inline BOOL MB_IsMultiBootChild() {
+ return MB_GetMultiBootParam()->boot_type == MB_TYPE_MULTIBOOT;
+}
+
+#endif //POKEDIAMOND_MB_MB_H