void cpu_device_reset(int bootloader)
{
    /* We don't support this on the Atmel part*/
    (void)bootloader;

    AT91F_RSTSoftReset(AT91C_BASE_RSTC, AT91C_RSTC_PROCRST|
                       AT91C_RSTC_PERRST|AT91C_RSTC_EXTRST);
}
Ejemplo n.º 2
0
Archivo: dbgu.c Proyecto: 12019/openpcd
//*----------------------------------------------------------------------------
//* Function Name       : DBGU_irq_handler
//* Object              : C handler interrupt function called by the sysirq
//*                       demultiplexer
//*----------------------------------------------------------------------------
static void DBGU_irq_handler(u_int32_t sr)
{
	static char value;

	AT91F_DBGU_Get(&value);
	switch (value) {
	case '0':		//* info
		AT91F_DBGU_Frame("Clear Pull up\n\r");
		// Set
		udp_pullup_on();
		break;
	case '1':		//* info
		udp_pullup_off();
		AT91F_DBGU_Printk("Set Pull up\n\r");
		// Reset Application
		Send_reset();
		break;
	case '2':
		AT91F_DBGU_Printk("Toggling LED 1\n\r");
		led_toggle(1);
		break;
	case '3':
		AT91F_DBGU_Printk("Toggling LED 2\n\r");
		led_toggle(2);
		break;
	case '9':
		AT91F_DBGU_Printk("Resetting SAM7\n\r");
		AT91F_RSTSoftReset(AT91C_BASE_RSTC, AT91C_RSTC_PROCRST|
				   AT91C_RSTC_PERRST|AT91C_RSTC_EXTRST);
		break;
	default:
		if (_main_dbgu(value) < 0)
			AT91F_DBGU_Printk("\n\r");
		break;
	}			// end switch
}