Skip to content

Instantly share code, notes, and snippets.

@jimsynz
Created July 19, 2011 23:52
Show Gist options
  • Save jimsynz/1094038 to your computer and use it in GitHub Desktop.
Save jimsynz/1094038 to your computer and use it in GitHub Desktop.
static inline void bootLoaderInit(void)
{
PORTB |= (1 << 5);
PORTD |= (1 << JUMPER_BIT); /* activate pull-up */
if(!(MCUCSR & (1 << EXTRF))) /* If this was not an external reset, ignore */
leaveBootloader();
MCUCSR = 0; /* clear all reset flags for next time */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment