|
LUFA Library - CDC Class Bootloader
|
#include <avr/io.h>#include <avr/wdt.h>#include <avr/boot.h>#include <avr/eeprom.h>#include <avr/power.h>#include <avr/interrupt.h>#include <stdbool.h>#include "Descriptors.h"#include "BootloaderAPI.h"#include "Config/AppConfig.h"#include <LUFA/Drivers/USB/USB.h>#include <LUFA/Drivers/Board/LEDs.h>#include <LUFA/Platform/Platform.h>Macros | |
| #define | BOOTLOADER_VERSION_MAJOR 0x01 |
| #define | BOOTLOADER_VERSION_MINOR 0x00 |
| #define | BOOTLOADER_HWVERSION_MAJOR 0x01 |
| #define | BOOTLOADER_HWVERSION_MINOR 0x00 |
| #define | SOFTWARE_IDENTIFIER "LUFACDC" |
| #define | MAGIC_BOOT_KEY 0xDC42 |
Typedefs | |
| typedef void(* | AppPtr_t )(void) ATTR_NO_RETURN |
Functions | |
| static void | CDC_Task (void) |
| static void | SetupHardware (void) |
| void | Application_Jump_Check (void) ATTR_INIT_SECTION(3) |
| void | EVENT_USB_Device_ConfigurationChanged (void) |
| static void | ReadWriteMemoryBlock (const uint8_t Command) |
| static uint8_t | FetchNextCommandByte (void) |
| static void | WriteNextResponseByte (const uint8_t Response) |
Header file for BootloaderCDC.c.
| #define BOOTLOADER_HWVERSION_MAJOR 0x01 |
Hardware version major of the CDC bootloader.
| #define BOOTLOADER_HWVERSION_MINOR 0x00 |
Hardware version minor of the CDC bootloader.
| #define BOOTLOADER_VERSION_MAJOR 0x01 |
Version major of the CDC bootloader.
| #define BOOTLOADER_VERSION_MINOR 0x00 |
Version minor of the CDC bootloader.
| #define MAGIC_BOOT_KEY 0xDC42 |
Magic bootloader key to unlock forced application start mode.
| #define SOFTWARE_IDENTIFIER "LUFACDC" |
Eight character bootloader firmware identifier reported to the host when requested.
| typedef void(* AppPtr_t)(void) ATTR_NO_RETURN |
Type define for a non-returning pointer to the start of the loaded application in flash memory.
| enum AVR109_Commands |
Possible commands that can be issued to the bootloader.
| enum AVR109_Memories |
| void Application_Jump_Check | ( | void | ) |
Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application start key has been loaded into MagicBootKey. If the bootloader started via the watchdog and the key is valid, this will force the user application to start via a software jump.
|
static |
| void EVENT_USB_Device_ConfigurationChanged | ( | void | ) |
Event handler for the USB_ConfigurationChanged event. This configures the device's endpoints ready to relay data to and from the attached USB host.
|
static |
|
static |
|
static |
|
static |