void Sys_Reboot(void) { /* Restart console */ STM_RebootSystem(); }
int main(void) { initialise(); checkhbc(); printf("Push button [A] to start switching to SD NAND\n"); printf("Push button [B] to start switching back to real NAND\n"); printf("Push button [Home] to exit now\n"); while(1){ WPAD_ScanPads(); u32 wpaddown = WPAD_ButtonsDown(0); if (wpaddown & WPAD_BUTTON_A){ switchnow = true; break; } if (wpaddown & WPAD_BUTTON_HOME){ printf("exiting now...OK\n"); sleep(5); exitme(); } if (wpaddown & WPAD_BUTTON_B){ switchback = true; break; } } initfat(); checkfiles(); if(switchback == true) { printf("\n"); if((switchmii == false) && (switchsneek == true)) { printf("It seems sneek is not running, check switchtosneek and switchtomii files\n\n"); sleep(5); exitme(); } if(armbootmii == false) { printf("No sneek v2 file in bootmii directory: armbootmii.bin\n\n"); sleep(5); exitme(); } printf("You have "); if( armbootsneek == true && armbootmii == true ) printf("sneek and bootmii setups"); if( armbootsneek == false && armbootmii == true ) printf("bootmii setups"); if( armbootsneek == false && armbootmii == true ) printf(" turn bootmii on"); if( armbootsneek == true && armbootmii == true ) printf(" switch to bootmii"); printf("\n"); miscinit(); renamefilesback(); removeswitchmii(); createswitchsneek(); miscdeinit(); sleep(5); WPAD_Shutdown(); STM_RebootSystem(); } if(switchnow == true) { printf("\n"); if((switchmii == true) && (switchsneek == false)) { printf("It seems bootmii is not running, check switchtosneek and switchtomii files\n\n"); sleep(5); exitme(); } if(armbootsneek == false) { printf("No sneek v2 file in bootmii directory: armbootsneek.bin\n\n"); sleep(5); exitme(); } printf("You have "); if( armbootsneek == true && armbootmii == true ) printf("sneek and bootmii setups"); if( armbootsneek == true && armbootmii == false ) printf("sneek setups"); if( armbootsneek == true && armbootmii == false ) printf(" turn sneek on"); if( armbootsneek == true && armbootmii == true ) printf(" switch to sneek"); printf("\n"); renamefiles(); removeswitchsneek(); createswitchmii(); sleep(5); WPAD_Shutdown(); STM_RebootSystem(); } return 0; }
void Sys_Reboot(void) { /* Restart console */ ExitApp(); STM_RebootSystem(); }
//--------------------------------------------------------------------------------- static void reset_cb() //--------------------------------------------------------------------------------- { STM_RebootSystem(); }