Пример #1
0
void
main(void)
{
        flash_prepare_flashing();

        usb_init(&dfu_device);
#ifdef SHORT_ISR
        for (;;) {
                usb_poll();
        }
#else
        sys_yield_for_frogs();
#endif
}
Пример #2
0
void main()
{
	// Enabling LED to indicate we are in the bootloader
	GPIOA_PDDR |= (1<<19);
	// Setup pin - A19 - See Lib/pin_map.mchck for more details on pins
	PORTA_PCR19 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
	GPIOA_PSOR |= (1<<19);

        flash_prepare_flashing();

        usb_init( &dfu_device );
        for (;;)
	{
                usb_poll();
        }
}