/*
LUFA Library
- Copyright (C) Dean Camera, 2011.
+ Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
}
/** Configures all hardware required for the bootloader. */
-void SetupHardware(void)
+static void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
MCUCR = (1 << IVCE);
MCUCR = (1 << IVSEL);
- /* Initialize USB Subsystem */
+ /* Initialize the USB and other board hardware drivers */
USB_Init();
LEDs_Init();
-
+
/* Bootloader active LED toggle timer initialization */
TIMSK1 = (1 << TOIE1);
- TCCR1B = ((1 << CS11) | (1 << CS10));
+ TCCR1B = ((1 << CS11) | (1 << CS10));
}
/** ISR to periodically toggle the LEDs on the board to indicate that the bootloader is active. */
{
LowByte = FetchNextCommandByte();
}
-
+
HighByte = !HighByte;
}
else
/** Task to read in AVR910 commands from the CDC data OUT endpoint, process them, perform the required actions
* and send the appropriate response back to the host.
*/
-void CDC_Task(void)
+static void CDC_Task(void)
{
/* Select the OUT endpoint */
Endpoint_SelectEndpoint(CDC_RX_EPNUM);
if (Command == 'E')
{
RunBootloader = false;
-
+
/* Send confirmation byte back to the host */
WriteNextResponseByte('\r');
}