AppConfigHeaders: Merge in latest trunk.
This commit is contained in:
		
						commit
						5ec9d04bca
					
				
					 4 changed files with 21 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -106,11 +106,18 @@ uint32_t MagicBootKey ATTR_NO_INIT;
 | 
			
		|||
 */
 | 
			
		||||
void Application_Jump_Check(void)
 | 
			
		||||
{
 | 
			
		||||
	// If the reset source was the bootloader and the key is correct, clear it and jump to the application
 | 
			
		||||
	/* If the reset source was the bootloader and the key is correct, clear it and jump to the application */
 | 
			
		||||
	if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY))
 | 
			
		||||
	{
 | 
			
		||||
		/* Turn off the watchdog */
 | 
			
		||||
		MCUSR &= ~(1<<WDRF);
 | 
			
		||||
		wdt_disable(); 
 | 
			
		||||
 | 
			
		||||
		/* Clear the boot key and jump to the user application */
 | 
			
		||||
		MagicBootKey = 0;
 | 
			
		||||
		AppStartPtr();
 | 
			
		||||
 | 
			
		||||
		// cppcheck-suppress constStatement
 | 
			
		||||
		((void (*)(void))0x0000)();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue