Merge pull request #127 from infinicore/linklevel

OS: Add function to get wifi strength.
This commit is contained in:
yellows8 2015-06-23 16:06:38 -04:00
commit 2791ab4850
2 changed files with 23 additions and 0 deletions

View File

@ -9,3 +9,20 @@ const char* osStrError(u32 error);
u32 osGetFirmVersion();
u32 osGetKernelVersion();
u64 osGetTime();
/* @brief Returns the Wifi signal strength.
*
* Valid values are 0-3:
* - 0 means the singal strength is terrible or the 3DS is disconnected from
* all networks.
* - 1 means the signal strength is bad.
* - 2 means the signal strength is decent.
* - 3 means the signal strength is good.
*
* Values outside the range of 0-3 should never be returned.
*
* These values correspond with the number of wifi bars displayed by Home Menu.
*
* @return the Wifi signal strength
*/
u8 osGetWifiStrength();

View File

@ -149,3 +149,9 @@ const char* osStrError(u32 error) {
return "Unknown.";
}
}
//---------------------------------------------------------------------------------
u8 osGetWifiStrength(void) {
//---------------------------------------------------------------------------------
return *((u8*)0x1FF81066);
}