/* Configure Timer Counter 0 (TC0) to generate an interrupt every second.  */
static void demo_configure_tc0(void)
/* Configure Timer Counter 0 (TC0) to generate an interrupt every second.  */
static void demo_configure_tc0(void)
{
	pmc_enable_periph_clk(ID_TC1);
	tc_init(TC0, 1, 0x4 | TC_CMR_ACPC_SET | TC_CMR_WAVE
			| TC_CMR_ACPA_CLEAR | TC_CMR_WAVSEL_UP_RC);
	tc_write_ra(TC0, 1, 16384);
	tc_write_rc(TC0, 1, 32768);
}