diff options
author | Made <made111@gmx.de> | 2020-05-08 23:06:05 +0200 |
---|---|---|
committer | Made <made111@gmx.de> | 2020-05-08 23:06:05 +0200 |
commit | ae744a2ea5a31f19330aedd1e264c88b97873c1c (patch) | |
tree | a30d34cbfba4e518eb6a7d4a52154ed86d41a428 /arm9/lib/include/MB_mb.h | |
parent | 6d3d11491cf6e8289822d2c5ba9cd7e309a5ce11 (diff) | |
parent | f76cec09f8a2995244256d4b097d9eed2bebd34a (diff) |
Merge branch 'master' of https://github.com/martmists/pokediamond
Diffstat (limited to 'arm9/lib/include/MB_mb.h')
-rw-r--r-- | arm9/lib/include/MB_mb.h | 45 |
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 |