summaryrefslogtreecommitdiff
path: root/helpers.c
blob: a24e8fc1d91541bcd016b696078d347514d0f5fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

static void postinit_slowboot(void)
{
	sei();

	uart_puts("\nreset from");
	if (MCUSR & (1 << WDRF))
		uart_puts(" WDT");
	if (MCUSR & (1 << BORF))
		uart_puts(" BO");
	if (MCUSR & (1 << EXTRF))
		uart_puts(" EXT");
	if (MCUSR & (1 << PORF))
		uart_puts(" POR");
	MCUSR = 0;

	uart_puts("\nwdt_generation ");
	uart_puthex(wdt_generation);

	uart_puts("\ndelay...\n");
	wdt_reset();
	_delay_ms(1000);
	wdt_reset();
	uart_puts("\ninit done\n");
}